Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search Plugin
#26
Waow! Works, thanks
Reply
#27
Thanks for this plugin.

I'm gettting a non-fatal PHP error 'Notice: Undefined variable: outputlist ... in gs_search.php on line 50' at the beginning of the search page's output.

The line is this:
$outputlist .= '<ul id="serp_list">';

Perhaps my host server uses a stricter version of PHP. Can I work around this by initialising $outputlist in the line above, perhaps by:
$outputlist = ""; ?

[EDIT] Later: I changed the line 50 to a straight initialisation rather than a concatenation and it seems to work fine now.

Thanks,
Nick
Reply
#28
hello, excuse my English.
Nice plugin ... thanks.
Reply
#29
Works for my needs ... Thank you!
Reply
#30
Hello NickC .... can you explain this further?

I am still a bit of a novice when it comes to PHP and I am receiving the same error message when debug mode is on. Thank you. Much appreciated! Smile






NickC Wrote:Thanks for this plugin.

I'm gettting a non-fatal PHP error 'Notice: Undefined variable: outputlist ... in gs_search.php on line 50' at the beginning of the search page's output.

The line is this:
$outputlist .= '<ul id="serp_list">';

Perhaps my host server uses a stricter version of PHP. Can I work around this by initialising $outputlist in the line above, perhaps by:
$outputlist = ""; ?

[EDIT] Later: I changed the line 50 to a straight initialisation rather than a concatenation and it seems to work fine now.

Thanks,
Nick
Reply
#31
simpledeconstruction Wrote:Hello NickC .... can you explain this further?

I am still a bit of a novice when it comes to PHP and I am receiving the same error message when debug mode is on. Thank you. Much appreciated! Smile

Just a warning that I haven't tested it, but with a quick read through the source code it seems to make sense.

Change line 50 ( or near abouts ) from:
$outputlist .= '<ul id="serp_list">';
to:
$outputlist = '<ul id="serp_list">';
by removing the dot before the = sign.

'.=' is the concatenation assignment operator, e.g. $a .= $b means $a = $a . $b

If $a, or $outputlist, doesn't yet exist, $a . $b can't be done, which is what PHP is complaining about.

HTH,
Nick
Reply
#32
Thank you Nick for the explanation .... this solution worked for me! I appreciate your time.




Just a warning that I haven't tested it, but with a quick read through the source code it seems to make sense.

Change line 50 ( or near abouts ) from:
$outputlist .= '<ul id=
Reply
#33
hello....
I have tried this plugin, but there is a problem, the search results is not appear. and I want to ask, whether a template SERP is based on our own desire, or what?

thank u
Reply
#34
Please turn on DEBUG mode in your gsconfig file, maybe PHP is giving an error that can help us find out why the results do no appear.

All the templates can be changed to however you want it, I haven’t used this plugin before but I believe you might need to change the actual plugin code to make it happen though.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#35
intan Wrote:hello....
I have tried this plugin, but there is a problem, the search results is not appear.

Have you created a blank page called 'search'? That tripped me up at first. I kept getting "503 page not found" errors.

Nick
Reply
#36
interesting plugin, thanks for this, i will test it.
Reply
#37
NickC Wrote:Have you created a blank page called 'search'? That tripped me up at first. I kept getting "503 page not found" errors.

Hi NickC,
no, i not have created a blank page,,,must i have?
when typing keywords that I want to search, yielding 404 pages "We Are sorry, but the page you are looking for does not exist."
Reply
#38
intan Wrote:Hi NickC,
no, i not have created a blank page,,,must i have?
when typing keywords that I want to search, yielding 404 pages "We Are sorry, but the page you are looking for does not exist."

Yes, use the admin feature "Create new page" to create a page called "search". You can leave it blank as the plugin will fill it in. (By the way, the error I got was 404, not 503.)

You get the error because the search function tries to display the "search" page, but GetSimple can't find it so displays the "Not found" error message.

Nick
Reply
#39
A little mod for fancy (and not) URLs:

On line 72, replace:
Code:
$outputlist .= "<h3><a href='".$SITEURL.$data->url."' />".$data->title."</a><br /><br /></h3>";
with:
Code:
if($PRETTYURLS == 1) {
  $outputlist .= "<h3><a href='".$SITEURL.$data->url."' />".$data->title."</a><br /><br /></h3>";
} else {
  $outputlist .= "<h3><a href='".$SITEURL.'/index.php?id='.$data->url."' />".$data->title."</a><br /><br /></h3>";
}

And, on line 95 replace:
Code:
$outputlist .= "<li><a href='".$SITEURL.$data->url."' />".$data->title."</a><br />{$resbev}<br /><br /></li>";
with:
Code:
if($PRETTYURLS == 1){
  $outputlist .= "<li><a href='".$SITEURL.$data->url."' />".$data->title."</a><br />{$resbev}<br /><br /></li>";
} else {
  $outputlist .= "<li><a href='".$SITEURL.'/index.php?id='.$data->url."' />".$data->title."</a><br />{$resbev}<br /><br /></li>";
}
Reply
#40
Seen one potential problem - it searches the text content as is. So if you had any PHP code it would search that rather than the code that is generated. Example: search for 'news' and it will find 'news manager' rather than the actual content.

I think this will fix it though (untested), on line 145 add
Code:
$data = eval('?>' . $data . '<?');
-- Sam
Reply
#41
Does not work with the latest RC of GS. It stops the site from running.
Reply
#42
trilulilu17 Wrote:Does not work with the latest RC of GS. It stops the site from running.

GS 2.02 RC1 had the new canonical redirection option enabled by default, which messed with the search plugin (and probably with other plugins that use url parameters). This was fixed in later beta revisions (since r161).

I suggest you try the newest one (other issues have been fixed too). Download here:
http://code.google.com/p/get-simple-cms/downloads/list
Reply
#43
Ok. So i retried with the latest GS r165 and it gives me a blank page when i try to load the website. I can't even go into the admin section, but as soon as I remove the plugin everything comes back to normal.

Carlos Wrote:
trilulilu17 Wrote:Does not work with the latest RC of GS. It stops the site from running.

GS 2.02 RC1 had the new canonical redirection option enabled by default, which messed with the search plugin (and probably with other plugins that use url parameters). This was fixed in later beta revisions (since r161).

I suggest you try the newest one (other issues have been fixed too). Download here:
http://code.google.com/p/get-simple-cms/downloads/list
Reply
#44
Carlos Wrote:
trilulilu17 Wrote:Does not work with the latest RC of GS. It stops the site from running.

GS 2.02 RC1 had the new canonical redirection option enabled by default, which messed with the search plugin (and probably with other plugins that use url parameters). This was fixed in later beta revisions (since r161).

I suggest you try the newest one (other issues have been fixed too). Download here:
http://code.google.com/p/get-simple-cms/downloads/list

that's what shows GetSimple r171

Code:
Warning: Missing argument 1 for search_show() in Z:\home\get7.ru\www\plugins\gs_search.php on line 32

Notice: Undefined variable: log in Z:\home\get7.ru\www\plugins\gs_search.php on line 34

Notice: Undefined index: s in Z:\home\get7.ru\www\plugins\gs_search.php on line 36

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 64

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 71

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 64

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 71

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 64

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 71

Warning: stripos() [function.stripos]: needle is not a string or an integer in Z:\home\get7.ru\www\plugins\gs_search.php on line 64

Ничего не найдено.

На ваш запрос нашлось 0 результатов:


Notice: Undefined variable: outputlist in Z:\home\get7.ru\www\plugins\gs_search.php on line 101

Notice: Undefined variable: log in Z:\home\get7.ru\www\plugins\gs_search.php on line 105
Reply
#45
@trilulilu17

I have no idea what might be happening... I've tested this plugin (downloaded from 1st post) on r163, 165 and r171, both with PHP 5.3 (XAMPP) and PHP 5.2 (shared hosting), and it works.

Is it the only plugin you have installed? Have you enabled debug mode?


@Oleg06

If I enable debug mode, I get some notices and warnings like those (more errors with PHP 5.2 than with 5.3), but still the plugin works (more or less... I get duplicate results, but doesn't crash)

Does it work in your r171 install, besides the errors?
Reply
#46
In general, it works Smile
Reply
#47
Ok. So I retried with r171 and now it works.
Reply
#48
I've installed and it work fine.

Thanks
Reply
#49
it works.. but gives to me an error, by debug:

Code:
Notice: Undefined variable: outputlist in E:\internet\EasyPHP-5.3.2i\www\GetSimple\plugins\gs_search.php on line 51

Someone could tell me why??

sorry my english Smile
Reply
#50
is it possible to somehow make search for text within the news and blogs Dominion Blog/News ?
Reply




Users browsing this thread: 2 Guest(s)