Using Search Method 4 - Tags will not work

Register an Account
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 06-23-2008, 01:52 PM
hotsitez's Avatar
Casual Pligger
Pligg Version: 9.x
 
Join Date: Jun 2007
Posts: 30
chuckroast -

Thank you for getting back to me and also for confirming this is a BUG. I am willing to pay / contribute $50 fro this bug fix - If any one is interested please let me know. Once the bug fix is corrected you (or I) will post the solution here for all members to be able to use.

So ChuckRoast has given a Lead to fixing this error - anyone up for making $50
Reply With Quote
  #12 (permalink)  
Old 11-29-2008, 08:54 PM
New Pligger
 
Join Date: Aug 2008
Posts: 13
So I have a solution for 9.9.5 and yget that works without modifying any php files, just tpl. You can use Google search, have the results on a page on your site, and still have tag search working.

Make sure the configuration for search is NOT set to 4 (Google) -- if you set it to 4 this solution does not work and tag search does NOT work as reported above.

in header.tpl
Change {if $SearchMethod eq 4}
to
{if $SearchMethod eq 4 OR 0 eq "0"}

This forces the search box to have Google search no matter what search method you configure.
Put in your Google search box code

In Pligg.tpl add this code:
=======================
{php}
if (strpos($_SERVER['QUERY_STRING'], "cx=partner-pub") !== false) {
$isFromG = 1;
}
else{
$isFromG = 0;
}
$this->assign('isFromG',$isFromG);
{/php}
============
This gives variable $isFromG to use in the template file. If 1 then the page called is from a google search.

In search_center.tpl

Change:
{if $SearchMethod eq 4}
to
{if $isFromG eq 1}

Put in your Google display search code to display search results

===============
Now Google search will work (set it up to display on your site in the search.php page AND tag search is uneffected.

The reason I did this is because the Pligg search methods are not very good with mulitple words (like this forum) and Google gives better results.

Last edited by ortho; 11-29-2008 at 09:59 PM. Reason: typo
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tags, tag range and .htaccess rewrite on URL Method 2 Type40 Questions and Comments 6 10-13-2008 02:31 AM
Search Method 3 and 4 in Pligg version 9.8.2 broke Iceburg Questions and Comments 3 11-03-2007 08:03 PM
plz help: search not work any more fwebz Questions and Comments 7 02-02-2006 01:59 AM
Folksonomy (Tagging) Yankidank Questions and Comments 7 01-15-2006 02:33 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development