PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 10-10-2005, 02:25 PM   #1
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
how to stop search results being messed up all over page

Hey,

I just had a go a creating my first quick and basic template based on the simple.html template but with a little header. It looks nice, until you search and you see that the search results are muddled and confused all over the page and the header is repeated numerous times.

Any help is much appriciated, I'm thinking the fix must be reasonabley simple for one with an expirienced eye for this thing, the addy is: http://www.compulsivethinker.com/thi...ime/search.php

many thanks

Tom
supafunk is offline   Reply With Quote
Old 10-14-2005, 09:58 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hmm, that is strange. The cthinker.html template itself looks okay. How are you calling the template? In the config file, do you have the bold parts in the following code:
Code:
$templates_array = array('black.html','bluegrey.html','corporate.html','green.html','grey.html','lightgreen.html','linear.html','newspaper.html','phpdig.html','simple.html','terminal.html','yellow.html','gaagle.html');
if(isset($template_demo) && in_array($template_demo, $templates_array)) {
    $template = "$relative_script_path/templates/cthinker.html";
} else {
    $template = "$relative_script_path/templates/cthinker.html";
}
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 12:05 PM   #3
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
yep, the code I have there is:

Code:
$templates_array = array('black.html','bluegrey.html','corporate.html','green.html','grey.html  ','lightgreen.html','linear.html','newspaper.html','phpdig.html','simple.ht  ml','terminal.html','yellow.html','gaagle.html');
if(isset($template_demo) && in_array($template_demo, $templates_array)) {
    $template = "$relative_script_path/templates/cthinker.html";
} else {
    $template = "$relative_script_path/templates/cthinker.html";
}
the whole template code seems to be getting repeated over and over again for some reason....

any more help would be gratefully received.
cheers
supafunk is offline   Reply With Quote
Old 10-15-2005, 05:38 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
So I tested your template, and the PhpDig change I made was to set the cthinker.html template name like in my previous post. The results can be seen here. I'd suggest FTPing the original PhpDig files back over to the server, as it seems a code change was made somewhere to make it repeat on your site.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 07:27 PM   #5
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
that would seem to be the case...but i just uploaded a completely new download of phpDig, all i changed were the db connection details, the template appropriation code you mentioned above and the admin password and (as u can still see at http://www.compulsivethinker.com/thi...ime/search.php) i got the same result as i always get.

i'm tearing my hair out with this, you make it look so easy...

do you think the problem could lie with my host?

ta for all the help btw...

Last edited by supafunk; 10-15-2005 at 07:29 PM.
supafunk is offline   Reply With Quote
Old 10-15-2005, 07:42 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
What version of PhpDig are you using?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 08:45 PM   #7
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
i have just now tried it with both the latest experimental and stable releases. the one currently running is the stable one. Both editions I downloaded fresh today...
supafunk is offline   Reply With Quote
Old 10-15-2005, 08:59 PM   #8
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
I just set up a fresh database to work with the stable version and indexed three sites, but still the same messed up results...
supafunk is offline   Reply With Quote
Old 10-15-2005, 09:30 PM   #9
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
With PhpDig 1.8.7, you should not index multi-byte content or use UTF-8 in the following tag, as PhpDig 1.8.7 is not capable of properly understanding multi-byte content:
Code:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
The charset that you use with PhpDig 1.8.7 must match the charset of the pages that were indexed. PhpDig 1.8.7 is for one single-byte charset only. You could try using charset=ISO-8859-1 in the tag, but when you indexed sites, what PhpDig version did you use?

PhpDig 1.8.8 RC1 uses UTF-8, but if you are mixing and matching PhpDig versions, that might cause some weirdness in the templated page as encoding might be the issue, and though I'm not totally sure of the cause, I doubt it is your host.

First try using charset=ISO-8859-1 in the META tag, and if that doesn't work, try a fresh install, fresh tables, fresh index, and then see if the page looks okay. If you meet the PhpDig 1.8.8 RC1 requirements, I would suggest using that version.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 09:53 PM   #10
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
I can't thank you enough. changing the charset to ISO-8859-1 worked a treat on the install with both the new db I created and then again perfectly with the original database I was working with... I am now hoping it will work when i upgrade to 1.8.8 RC1.

now I can finally move on...

many, many, many thanks.
supafunk is offline   Reply With Quote
Old 10-15-2005, 10:03 PM   #11
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
I just upgraded to 1.8.8 RC1 and it seems to be fine still. Although I havent indexed any new sites with this version and I'm pretty sure the sites currently in the db were indexed with 1.8.7...

I'll try the template you attached now...
supafunk is offline   Reply With Quote
Old 10-15-2005, 10:04 PM   #12
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
oh it disappeared...
supafunk is offline   Reply With Quote
Old 10-15-2005, 10:11 PM   #13
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Oops, here is the template again. It was taken away as it looked like charset was the issue. Note that the template has UTF-8 in the META tag, so if you use it with PhpDig 1.8.7 of course change the tag.
Attached Files
File Type: zip cthinker.zip (1.3 KB, 6 views)
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 10:19 PM   #14
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
PS: For PhpDig 1.8.8 RC1, the META tag should have UTF-8 instead of ISO-8859-1, because once you do the conversion on the files and tables, everything should be in UTF-8 encoding.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-15-2005, 10:33 PM   #15
supafunk
Green Mole
 
Join Date: Oct 2005
Posts: 9
Yup cool. But the encoding on my original template was utf-8 and I'm sure I tried it with the updated tables after using the upgrade sql that comes with 1.8.8. Oh well, seems to be working okay now.
supafunk is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search results returns blank page Anton Troubleshooting 1 02-11-2006 11:20 PM
search results page lukemack How-to Forum 1 11-10-2005 10:48 PM
Search page problems, no results kalli Troubleshooting 1 09-03-2005 01:55 PM
Search on search results page not working bforsyth Troubleshooting 10 08-20-2004 10:35 PM
highlight search results on page? rediray How-to Forum 2 10-03-2003 04:40 AM


All times are GMT -8. The time now is 12:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.