PDA

View Full Version : Show recent searches on a page other than list.php


Gam-Man
06-04-2005, 07:13 PM
Hey, I am new to PhpDig. It is great scripting, but I cannot seem to find a way to show recent searches on my homepage. Has anyone done this before? How would I do this?

Thanks!
-Gam

Charter
06-04-2005, 10:39 PM
Upzip the attachment and FTP recentqueries.php to your PhpDig directory, the one that contains the search.php and list.php files.

In the PHP page that you wish to show the last ten PhpDig queries, place the following code, changing the two paths as needed:


chdir("/full/path/to/phpdig/dir");
include("recentqueries.php");
chdir("/full/path/to/return/dir");

Note that you may have to edit the HREF tag in the attached file, or SEARCH_PAGE in the PhpDig config file, to correctly link to your search page. It is up to you to edit to your preferences.