PDA

View Full Version : [MOD] Advanced Search - for phpLD 3.2.0


Boby
08-09-2007, 09:10 PM
Hello to everyone!

This is something we are going to implement in the coming version of phpLD 3.3.0 (please don't ask when it's going to be released).

It's an advanced search page, where you can select more preferences for searching through your directory.

NOTE:
If you don't get any results for a known search term, deactivate boolean search from your admin panel since it could be possible it's not enabled on your server. But you would get much better search results if it's working ;)


Current Version: 1.0


Installation Instructions:
(are also available in the package as install.txt)

Step-1
Replace "/include/tables.php" with the file provided by this package.
If you have other changes made to that file, copy and paste the following PHP code into it:

Content visible to registered users only.


Step-2
You can either run the installer again and it will automatically create
the search table in your database according to the new "/include/tables.php" file,
or you can run the following SQL query via phpMyAdmin or phpLD's admin panel.
Content visible to registered users only.


Step-3
Replace "search.php" located in the root folder of your phpLD installation with the new file provided in this package.


Step-4
Add the file "/templates/Default/search.tpl" to your template folder.
If needed, make custom template changes to fit your theme.


Step-5
Access the advanced search page via the following URL:
Content visible to registered users only.

You can add a link on your page by adding the following HTML code:
Content visible to registered users only.


That's all :)
Enjoy!

Content visible to registered users only.

msolution
08-09-2007, 10:00 PM
Thanx Boby :D
Will surely try this out

Regards,
M.

bruleo
08-09-2007, 10:59 PM
For information....

Just installing this and for some reason when I tried the SQL in the Admin panel, I got this error:-
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; CREATE TABLE IF NOT EXISTS `PLD_SEARCH` ( `SEARCHID` int(11) NOT NULL auto' at line 1

However, it worked fine in phpMyAdmin.

Bruce.

Boby
08-09-2007, 11:09 PM
guess you have to remove the ";" for AdoDB

bruleo
08-09-2007, 11:14 PM
No problems at all. Got it installed and working in less than 5 minutes!!

Came as perfect timing as I was just installing PHPLD into my site at awayaway.com and was messing around with the search box and template designs just a short while ago. Should all be live in a day or two.

Bruce.

MyWebSearches
08-10-2007, 01:06 AM
Is there a demo? Or Can some one post your directory using advanced search?


Thanks!

bruleo
08-10-2007, 02:55 AM
Ok.... Here is where I have it installed....

http://www.awayaway.com/search.php?type=advanced

Be aware that this version of the site is not yet live and many of the functions and links do not currently work. DO NOT submit any links as they will be removed.

Site should be fully operational in a day or two.

Bruce.

David
08-10-2007, 04:24 AM
Nice, thanks for posting a demo.

pragent
08-10-2007, 04:35 AM
Thank you Boby .... this MOD is perfect

David
08-10-2007, 05:01 AM
I just installed it too.
Here is my demo:
http://www.directhoo.com/search.php?type=advanced

moonswamp
08-10-2007, 05:08 AM
great ,thx very much

daisukey
08-10-2007, 08:28 AM
Hi guys im stuck at step2 where i put the query in myphpadmin.

It says 'You have to choose at least one column to display'

Boby
08-10-2007, 09:08 AM
Content visible to registered users only.
Open the database where you have phpLD installed and somewhere on top you'll have a button "SQL". Post the query in that textarea and run it.
If you're not confortable with that, just copy the new /include/tables.php file and run the installer again. It will do that SQL query for you ;)

daisukey
08-10-2007, 09:14 AM
Awesome bobby. cheers. its working now.

Demo:
http://www.creativefx.org/search.php?type=advanced

PL_90
08-10-2007, 10:38 AM
Wow... Boby.. Thanks.. super! :)

regg
08-10-2007, 01:28 PM
GREAT Mod. Thank you Boby... For this Mod i have searched long…

Please addet this to phpLD 3.3/3.4

David
08-10-2007, 01:57 PM
Content visible to registered users only.

Yes, we will do this. :)

Simon
08-10-2007, 02:06 PM
Thanks for releasing this, just what I need. :)

regg
08-10-2007, 02:41 PM
Content visible to registered users only.

Cool :)

I have got a Question:

i have got 3 DB Fields:

Like this:
TYP = no.jpg
TYP1 = ppc.jpg
TYP2 = click.jpg

no.jpg shwos a place holder
click.jpg shwos a *Pay-Per-Click picture
ppl shwos a *Pay-Per-Lead pictue
ppc.jpg shows a *Pay-Per-Sale picture

The content of the Datebase are only no.jpg,click.jpg and so on...

Can i add this to the "Find results with"???

Thanks,
regg

smub
08-10-2007, 03:44 PM
this is an awesome mod .....

One thing i didn't get in the search.tpl file

why is the reset button have a transparent background ??? because at first when i uploaded it it showed me a transparent button ... with nothing on it ... Even though i fixed it just a thought you should have :)


Here is my demo


{link no longer in service}


hehe yes it is seo-friendly.

PHPLDrocks
08-10-2007, 08:59 PM
Looks gr8..

smub - you always create unique things :D

smub
08-11-2007, 02:54 AM
hehe yup ... seo friendly it is very easy... :)

mrbadgolf
08-12-2007, 01:45 AM
I folowed the instructions but I am getting an error

Warning: Smarty error: unable to read resource: "search.tpl" in /home/domainli/public_html/libs/smarty/Smarty.class.php on line 1095

mrbadgolf
08-12-2007, 01:47 AM
Never Mind, the .tpl went to the wrong directory. Thanks Its working

vegabond
08-14-2007, 02:09 PM
I will wait for the next release :D

Simon
08-14-2007, 03:04 PM
Just to say, I had to change a line in search.php from mysql_insert_id() to $db->Insert_Id(); to get it to display correctly. It was coming up with searchid=0 every time otherwise.

Boby
08-15-2007, 01:47 PM
@regg

You can add more fields to search in. For example if they are in the links table, edit search.php and look for the following code (lines #414-#421):
Content visible to registered users only.

It goes similar with categories and articles.

MadDog
08-16-2007, 07:03 AM
Great mod Boby! Thank you.
This was a much needed mod for the directories.
You included complete easy to understand instructions and it was a easy flawless install. Did 3 directories in about 15-20 minutes.
Thanks again.

Boby
08-16-2007, 05:24 PM
Thanks for the flowers guys :p
You are welcome!

regg
08-19-2007, 12:55 PM
Thank you Boby

CorinevM
11-20-2007, 09:41 PM
This is THE mod I wanted :)

I have only a problem, it doesn't work at my site. I have followed the instructions: added a new table, replace search.php. But when I do an advanced search I get the following error:

An error occured while saving search preferences.
Incorrect table name ''

Have you any idea what I did wrong?

James
11-20-2007, 09:45 PM
When added the table did you do it lower case?

Also when did you buy and downlaod 3.2?
I see you just signed up on the forums

I have a reason for asking

CorinevM
11-21-2007, 10:32 AM
Thanks for your quick reply!

I bought phpLD this week and use the phpLD_07-23-07 version.

I added the table by SQL, this way:

Content visible to registered users only.

James
11-27-2007, 01:53 AM
Didnt have to as it was already in it ;)

Sorry I missed the post

syscom
11-28-2007, 03:11 PM
I have a Problem:

MySQL meldet:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`SEARCHTERMS`

MrKing
12-02-2007, 03:34 PM
Brilliant - Thanks for this mod, its perfect for my needs