![]() |
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Here it is, as talked about in this thread. {deleted} Please consider sending a donation to me for my time, PayPal details can be given out in PM upon request. Regards -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me Last edited by David; 06-13-2008 at 08:33 PM. | |
| |
| | #2 |
| Supporter Join Date: Oct 2005 Posts: 548 | it works very good. what must i change to give it to my users ? (external search) __________________ many thanks. thompson. |
| |
| | #3 |
| Give it to your users? What do you mean? The actual results, like you see in the admin? -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me | |
| |
| | #4 |
| Supporter Join Date: Oct 2005 Posts: 548 | i will give my users a site. on this site there are the search words of the last searches. example: {deleted} __________________ many thanks. thompson. Last edited by David; 06-13-2008 at 08:33 PM. |
| |
| | #5 |
| Sure that is fully possible. Just query the new table, and pull the results from there and sort as you wish. If you can't do that, then I can help. I've got to go, church get together. later! ![]() -Casey __________________ Casey Wilson / Ap0s7le Freelance Programmer http://www.ap0s7le.com Need help with PHPLD? PM me | |
| |
| | #6 |
| Supporter Join Date: Oct 2005 Posts: 548 | hi casey, i have it on a separate page and i works good. what i need is a link to the searchresults. (not the problem with index.php?p=searchresult) searchresult should be a html page. what i mean: i need a htaccess rewrite from index.php?.... to searchresult.html. do you know a answer ? thanks for helping. __________________ many thanks. thompson. |
| |
| | #7 |
| Join Date: Feb 2006 Location: Orlando, Florida Posts: 12 | Okay you were killing me with that blank m_statistics.gif. I thought the code was broken and was looking all over for it, until I thought maybe I uploaded a corrupted file and when I opened it found it was the same color as the background. If anyone needs a graphic, here is one; |
| |
| | #8 | |
| Supporter Join Date: Dec 2005 Posts: 487 | Quote:
Thanks for the gif had been meaning to sort a graphic for that. Net. | |
| |
| | #9 |
| Supporter | 3.04 friendly You still need the archive of the files in the first post. Do not follow the search-tracker.mod file if your using 3.04 follow this. There were no major changes I just want credit for taking the time to change one variable, and updating the instructions a little. Code:
##############################################################
## MOD Title: Internal Search Tracker
## MOD Author: Casey Wilson < at@ap0s7le.com > http://www.ap0s7le.com
## MOD Description: Enables the ability to track internal searches.
## MOD Version: 1.0.0
##
## Installation Level: Intermediate
## Installation Time: 15 Minutes
## Files To Edit:
## /admin/init.php
## /include/functions.php
## /include/tables.php
## /index.php
##
## Included Files:
## statistics.php
## statistics.tpl
## m_statistics.gif
##
##############################################################
## Author Notes:
## This MOD has been updated to 3.04.
## YMMV, if you have any issues feel free to email me.
## Paid services are also available.
##############################################################
## MOD History:
##
## 2006-5-17 - updated for 3.04
##
## 2005-12-17 - Version 1.0.0
##
## - Initial release.
##
##############################################################
## Before Adding This MOD To Your Directory, You Should Back Up All Files Related To This MOD
##############################################################
##
#
#-----[ SQL ]------------------------------------------
# Where 'PLD_' is your table prefix
CREATE TABLE `PLD_SEARCHES` (
`ID` int(11) NOT NULL auto_increment,
`QUERY` varchar(255) NOT NULL default '',
`NUM` int(11) NOT NULL default '0',
`TIME` timestamp(14) NOT NULL,
PRIMARY KEY (`ID`)
) TYPE=MyISAM;
#
#-----[ COPY ]------------------------------------------
#
copy statistics.php to /admin/statistics.php
copy statistics.tpl to /templates/admin/statistics.tpl
copy m_statistics.gif to /admin/images/m_statistics.gif
#
#-----[ OPEN ]------------------------------------------
#
/admin/init.php
#
#-----[ FIND ]------------------------------------------
#
),
'message' => array('label' => _L('Edit Email Templates'), 'url' => 'email_message.php'),
'payment' => array('label' => _L('Payments'), 'url' => 'conf_payment.php', 'disabled' => PAY_ENABLE!=='1'),
'profile' => _L('Profile'),
'users' => _L('Edit Users'),
)
),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'statistics' => _L('Statistics'),
#
#-----[ OPEN ]------------------------------------------
#
include/functions.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
function track_searches($db, $query)
{
global $tables;
$sql = "SELECT COUNT(*) FROM {$tables['searches']['name']} WHERE QUERY = " . $db->qstr($query) . "";
if ($db->GetOne($sql) > 0)
{
$db->Execute("UPDATE {$tables['searches']['name']} SET NUM=NUM+1 WHERE QUERY = " . $db->qstr($query) . "");
}
else
{
$db->Execute("INSERT INTO {$tables['searches']['name']} VALUES(NULL, " .$db->qstr($query) . ", 1, NULL)") or die (mysql_error());
}
}
#
#-----[ OPEN ]------------------------------------------
#
/include/tables.php
#
#-----[ FIND ]------------------------------------------
#
$tables['user_permission'] = array(
'name' => TABLE_PREFIX.'USER_PERMISSION',
'fields' => array(
'ID' => 'I KEY AUTO',
'USER_ID' => 'I NOTNULL',
'CATEGORY_ID' => 'I NOTNULL',
)
);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$tables['searches'] = array(
'name' => TABLE_PREFIX.'SEARCHES',
'fields' => array(
'ID' => 'I KEY AUTO',
'QUERY' => 'C(255) NOTNULL',
'NUM' => 'I NOTNULL',
'TIME' => 'T',
)
);
#
#-----[ OPEN ]------------------------------------------
#
/index.php
#
#-----[ FIND ]------------------------------------------
#
elseif (isset ($_REQUEST['search'])) // Search results
{
require_once 'search.php';
#
#-----[ AFTER, ADD ]------------------------------------------
#
track_searches($db, $_REQUEST['search']);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM __________________ droolingmonkey.com Last edited by droolingmnky; 05-17-2006 at 09:20 AM. |
| |
| | #10 |
| Supporter Join Date: Nov 2005 Posts: 182 | Thanks for this although i get Warning: Smarty error: unable to read resource: "admin/statistics.tpl" in /home/user/public_html/libs/smarty/Smarty.class.php on line 1095 in versison 3.0.5 anything I did wrong? does this still work with 3.0.5? |
| |
| | #11 |
| Supporter Join Date: Nov 2005 Posts: 182 | OK fixed though i should get some credit! :P Upload statistics.tpl into your /admin/ directory change the following in statistics.php Find: $tpl->assign('searched', $searched); $tpl->assign('requested', $requested); Then change the NEXT line to: $content = $tpl->fetch('/home/user/public_html/*/admin/statistics.tpl'); (where user is your username and * is your phpld directory location) worked for me in 3.0.5! by the way, what happened to Apostle?? |
| |
| | #12 | |
| Supporter Join Date: Apr 2006 Posts: 89 | Quote:
| |
| |
| | #13 | |
| Supporter Join Date: Apr 2006 Posts: 89 | Quote:
| |
| |
| | #14 |
| Join Date: May 2006 Posts: 29 | Thank you very much for this mod, I have implemented it in my directory and also made some changes so the last 10 searches appears on my front page for the users' benefit. You can see it at http://ipage.info/ |
| |
| | #15 | |
| Supporter Join Date: Apr 2006 Posts: 89 | Quote:
| |
| |
| | #16 |
| Supporter Moderator Join Date: Apr 2006 Posts: 1,721 | How can i get this mod for version 3.05???? __________________ Jetzt Neu: Immer aktuelle Gutscheine: http://www.gutscheinbase.de --- phpLD Services German --- |
| |
| | #17 |
| Supporter | The version I posted above is working for 3.05 __________________ droolingmonkey.com |
| |
| | #18 |
| Supporter Moderator Join Date: Apr 2006 Posts: 1,721 | ah ok. is not working for me ! __________________ Jetzt Neu: Immer aktuelle Gutscheine: http://www.gutscheinbase.de --- phpLD Services German --- |
| |
| | #19 |
| Supporter | What does it say or not say? Did you follow the instructions I posted or not? __________________ droolingmonkey.com |
| |
| | #20 |
| Supporter Join Date: Dec 2006 Posts: 12 | Hello, dcristo can you show the code you use to show stats of top searched on yours directory page, I tried to do it myself but with no good results, thx for all help mayby anyone else know how to do it and pase the code here |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|