Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1291)
This mod written by husmen73 and [Sinan]
search logs will log searching words on your web site
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=251428.0;attach=62453)
Thanx hüsmen =)
Very nice :)
good work
ncie mod
Hi,
Were does it log the words?
What changes does this mod make to the forum?
Ok, I download it and when I go to install the only error I get is this one.
QuoteExecute Modification ./Sources/Subs.php Test failed
I'm running SMF 1.1.5 and using dilbert theme.
I'm guessing that the ./Sources/Subs.php has nothing to do with any theme.
I run the manual instructions and see it say's to find this part in ./Sources/Subs.php
Quote// Set up the menu privileges.
$context['allow_search'] = allowedTo('search_posts');
$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
$context['allow_edit_profile'] = !$user_info['is_guest'] && allowedTo(array('profile_view_own', 'profile_view_any', 'profile_identity_own', 'profile_identity_any', 'profile_extra_own', 'profile_extra_any', 'profile_remove_own', 'profile_remove_any', 'moderate_forum', 'manage_membergroups'));
$context['allow_memberlist'] = allowedTo('view_mlist');
Would I be correct is saying that I get the above error because it can not find that code in ./Sources/Subs.php and the reason it can not find it is because ./Sources/Subs.php has already been changed by some other mod I have installed?
What options do I have here to install this mod?
I have attatched my ./Sources/Subs.php if it's of any help.
Thanks,
Quote from: ApplianceJunk on July 24, 2008, 07:55:17 PM
Hi,
Were does it log the words?
What changes does this mod make to the forum?
yes like to know where the log words can be viewed
Quote from: ApplianceJunk on July 24, 2008, 08:33:46 PM
Ok, I download it and when I go to install the only error I get is this one.
Find;
$context['allow_memberlist'] = allowedTo('view_mlist');
Replace with;
$context['allow_memberlist'] = allowedTo('view_mlist');
$context['allow_searchlog'] = allowedTo('searchlog');
Installation after you should give permissions to other members see
Congrats Aslanbac and Sinan
it seems like u will do great mods ;)
Where does it log the words?
Quote from: Aslanbac (husmen73) on July 26, 2008, 03:20:52 AM
Quote from: Kimmie on July 25, 2008, 08:07:20 PM
Where does it log the words?
on database
I know that...lol What I meant was, where does that page show up on the forum? The screenshot you have on the mod page really doesnt show much. Is this an Admin page, is this a page that you see when you click on a menu button, is it on the stats page?
showing on the menu
link - index.php?action=searchlog
Quote from: Aslanbac (husmen73) on July 26, 2008, 03:45:57 AM
showing on the menu
link - index.php?action=searchlog
Thanks :)
Thanks husmen73 and [Sinan] , good job.
very nice, i hope will be done for smf 2.0 i cannot wait
thx
By the way, this is a google mania mod, google indexes all searched logs :D
Quote from: edi67 on August 01, 2008, 03:33:34 AM
very nice, i hope will be done for smf 2.0 i cannot wait
thx
We will wait core package for 2.0
is it possible to make it work on 1.1.2 ? i've tried it manually but failed. it's for my site here http://www.engineeringserver.com/forum/
Quote from: ArkServer on August 02, 2008, 08:08:04 AM
is it possible to make it work on 1.1.2 ? i've tried it manually but failed. it's for my site here http://www.engineeringserver.com/forum/
You absolutely update to 1.1.5
SMF 1.1.2 have some security issues
Thanks i've taken yoru advice but when i install it it's succesful but when i click http://www.engineeringserver.com/forum/index.php?action=searchlog nothing shows up with the default and custom theme.
Did you search something on your site?
Quote from: Aslanbac (husmen73) on August 05, 2008, 01:54:27 PM
Did you search something on your site?
No but i figured out what the problem was, it didn't create the database tables for me so i had it done manually. ;D
Hi I look my error log every day and get this error stored for many time an hour.
http://forum.itacumens.com/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MTIsMTUsMjMsNjgsNzAsMzAsNDUsMzEsMzIsMzMsMTksMzUsMzYsMzcsMzgsMzQsNjcsNjYsMTYsNDksNTAsNzYsNTYsNTEsNTIsNTMsNTQsNTUsNjEsNzEsNzIsMTcsMjgsNzMsMzksMTQsNDAsNDEsMjksNDIsNDMsNzQsNDQsMjAsMjEsMjIsNjksNDgsNTcsMjcsMjQsMjUsNzUsNjAsNjMsNjQsNjUsNjIsMjYsNTksMTgsNDYsNDcsMTMsNTh8InxzaG93X2NvbXBsZXRlfCd8fCJ8c3ViamVjdF9vbmx5fCd8fCJ8c29ydHwnfHJlbGV2YW5jZXwifHNvcnRfZGlyfCd8ZGVzY3wifHNlYXJjaHwnfEJQTyBDT01QQU5ZIENIRU5OQUk=;start=120
Apply Filter: Only show the errors with the same message
8: Undefined index: searchlog_invalid_word
File: /home/itacumen/public_html/forum/Sources/Errors.php
Line: 337
Kindly have a check and help me to avoid this time of search error from users side.
Quote from: karlbenson on August 14, 2008, 10:05:46 AM
The search query isn't too big. It has been converted to base64.
The cause of the issue is due to a missing language string $txt['searchlog_invalid_word'] is being called in Errors.php
But that language string appears to be missing from whatever language set you are using.
Could anyone figure the error out.
Please add it into your Modifications.english.php file
$txt['searchlog_invalid_word'] = 'You haven\'t search anything, please write something';
Thanks for it.
Hope the error is no more.
Good Mod and very Useful for administrators to read what the users are searching for.
Great Mod Once.
Theres a bug in the mod a huge one ;) you can never open a second page at the moment *g*
You use $_REQUEST['search'] to check of something search but this is not correct you should use $search_params['search'], because if you go to the second page the $_REQUEST['search'] does not exist any more.
Search in the Search.php for
createSearchLog($_REQUEST['search'], ( db_affected_rows($request) ? 1 : 0 ));
replace it with
createSearchLog($search_params['search'], ( db_affected_rows($request) ? 1 : 0 ));
Than it should fix the problem ;).
And i little thing to make it more comfortable :D
<file name="$languagedir/ManagePermissions.turkish.php">
<operation>
<search position="end" error="skip" />
it's better to use
<file name="$languagedir/ManagePermissions.turkish.php" error="skip">
<operation>
<search position="end" />
The difference is that now if the file not exists he will skip this file, and i think that is what you want to do =).
Hope i could help you to make you mod better =)
Bye
DIN1031
Quote from: ディン1031 on August 15, 2008, 10:12:40 AM
Theres a bug in the mod a huge one ;) you can never open a second page at the moment *g*
You use $_REQUEST['search'] to check of something search but this is not correct you should use $search_params['search'], because if you go to the second page the $_REQUEST['search'] does not exist any more.
Search in the Search.php for
createSearchLog($_REQUEST['search'], ( db_affected_rows($request) ? 1 : 0 ));
replace it with
createSearchLog($search_params['search'], ( db_affected_rows($request) ? 1 : 0 ));
Than it should fix the problem ;).
Thanks for this bug ディン1031.
I have updated the mod in my forum.
Thank you ディン1031, I have updated it on ModSite
I got the latest version and no search log tab ever showed up at the top, even after searching.
:-\
Hi Currently it started showing all the logs.
This would be good , Shows the number of counts like.
1st time user searched for books.
2nd time user searched for books.
Shows like books, books.
Instead could you make books(2).
And if started going more than 100 pages in search log. Wil it be a problem for loading search page everytime.
xrunner:
Are you using a custom theme? If yes, you should make the theme file edits manually on your custom theme too.
asudhakar:
Not a bad idea actually, but I knew that it worked like that. Anyway, I'll check it again.
It wont be a problem if it reaches 100 pages; but if you like, you can delete old logs from admin panel. You can define the day and logs, before that day are deleted.
Quote from: [SiNaN] on August 16, 2008, 11:04:31 PM
Are you using a custom theme? If yes, you should make the theme file edits manually on your custom theme too.
No, it's the default theme. The installation script reported no errors when installing either.
Quote from: xrunner on August 17, 2008, 08:25:26 AM
No, it's the default theme. The installation script reported no errors when installing either.
Can you see SearchLog menu item on Search menu on Admin panel
Quote10. Execute Modification ./Sources/Subs.php Test failed
:(
xrunner:
What's your default language?
Basie:
We just have a one line addition in Subs.php, which you can make manually:
Subs.php
Find:
$context['allow_memberlist'] = allowedTo('view_mlist');
Replace:
$context['allow_memberlist'] = allowedTo('view_mlist');
$context['allow_searchlog'] = allowedTo('searchlog');
good job!
Quote from: Aslanbac (husmen73) on August 17, 2008, 12:07:18 PM
Quote from: xrunner on August 17, 2008, 08:25:26 AM
No, it's the default theme. The installation script reported no errors when installing either.
Can you see SearchLog menu item on Search menu on Admin panel
No. My default language is English
Is it utf-8? Can you attach your Modifications.english.php file here so that we can check it?
Quote from: [SiNaN] on August 18, 2008, 07:31:42 AM
Is it utf-8? Can you attach your Modifications.english.php file here so that we can check it?
You mean before or after the installation of the mod? It's not installed now because it wasn't working.
I meant after. Can you try installing it again and attach your Modifications.english.php file here?
Quote from: [SiNaN] on August 18, 2008, 07:41:33 AM
I meant after. Can you try installing it again and attach your Modifications.english.php file here?
I'm off to work, I'll have to do it later, thanks.
Okay, when you have time. ;)
Now I get two errors -
7. Execute Modification ./Sources/ManagePermissions.php Test failed
13. Execute Modification ./Themes/default/index.template.php Test failed
@xrunner
continue with installation and :
open and find this in Sources/ManagePermissions.php :
'who_view' => false,
'search_posts' => false,
Replace with :
'search_posts' => false,
'searchlog' => false,
'delete_searchlog' => false,
then, open and find this in index.template.php :
// Edit Profile... [profile]
replace with :
// Search Logs Page
if(!empty($modSettings['searchlog_enable']) && $context['allow_searchlog'])
echo ($current_action == 'searchlog' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'searchlog' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=searchlog">' , $txt['searchlog_menu'] , '</a>
</td>' , $current_action == 'searchlog' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile]
if you are using a different theme, u better put its index.temp file here and we check
good luck
i installed this mode and i am getting the following error message:
Fatal error: Function name must be a string in /home/themagi2/public_html/forum/Sources/Search.php on line 1869
line 1869 = $word = $funcx['htmlspecialchars'](stripslashes($word), ENT_QUOTES)
when i set up the site, i had to change $func to $funcx so it would play nice with joomla. any idea what else is going wrong?
After making it $func, do you still get error?
yes, that didnt work either.
I didn't understand the relation with Joomla? It should be $func.
joomla also uses $func and when i tried to run SMF within a joomla wrapper i had some problems.
$func variable has many uses in SMF. Don't you get errors on other pages?