|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Mod Name: Advanced IP Logging Description: Adds new IP logging feature to your board. It also adds Recent Activities section with date/time/IP to member profiles. Adds "View User IP History" link to users profiles (admins only, Control Panel). Adds a new search option to the Extended Search Options in the UBB Control Panel (User IP History). Updates: v1.2 - Adds a new link next to "View User Posts" named View User IPs in profiles viewed from within the UBB™ Control Panel. It lists all recorded IPs for users, and provides three links for IP lookup on ARIN, RIPE and APNIC (America, Europe and Asia). v2.0 - Only "unique" IPs are recorded. That is, if the IP already exists in the user's log, it won't be recorded again. IPs are recorded on submission of new topics/replies as well. "View User IP History" links added to "New Members", and search results pages within the UBB Control Panel. Added a new option to the "Extended Search Options" page (Control Panel, View/Edit Member Records) which enables you to search for specific IP addresses in the IP logs created by this mod. It is an exact IP matching, so entering an incomplete IP will do no good. v2.0.1 - Bug fix: Directory created if it doesn't exist. Only administrators are allowed to view the "Recent Activities" part of member profiles. Version: 2.0.1 Author: Idle E-mail: [email protected]Date: May 23rd, 2002 Requirements: 6.3.0.0 Beta Release 1 or newer. Compatibility: 6.3.0.0 Beta Release 1 and any version higher. Tested On: 6.3.0.0 Beta Release 1 & 6.3.0.0 (full release) Download: ZIP File Note: Due to time restrictions I won't be updating the MultiHack file anymore.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Idle, Thank you very much!
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Hack seems to work beautifully! Just one question... I get the following error using MH.
public_display_profile.pl ERROR this is for "public_display_profile.pl" located in "NonCGI/Templates/JCTemplates"
I am not using the JCTemplates on my board so I assume this makes no differance?
Thanks Idle.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
That's right, it doesn't matter if you're not using JCTemplates.
Not sure why MH gives that error though, it didn't when I tried it on my test boards. I'll have a better look at it. :rolleyes:
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Nice work Idle
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Danke schöne!
Still have to update the MultiHack files though... they're still at v1.2.2 or something. :rolleyes:
|
|
|
|
Joined: Nov 2001
Posts: 159
Member
|
Member
Joined: Nov 2001
Posts: 159 |
ok?? ============================================= An error has occured:
Undefined subroutine &main::GetLastLoginInfo called at CGIPath/ubb_profile.cgi line 607. =============================================
This happend when trying to view a profile right after installing this.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Did you uppload "ubb_lib_idle.cgi" to your CGI Directory and CHMOD to 755?
|
|
|
|
Joined: Nov 2001
Posts: 159
Member
|
Member
Joined: Nov 2001
Posts: 159 |
either something happened in my download or i accidently deleted those files, but i got them and uploaded and it is working fine now, thanks
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
That's good to hear.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Found a problem... it doesn't capture ALL IP's. Some users it captures and others it doesn't. All users have the same access rights. Any ideas on this one?
Thanks!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Did you install the updated mod?
If so, are you sure it doesn't capture the IPs for everyone? You know it only does when people log in & register. Some people rely on cookies and don't login for even weeks... thus, the IPs of those won't be recorded until they login the next time after logging out/cookie expire.
I'm running it on a board with 3000+ members, and it's working fine so far... except, it doesn't record the IP of those who are already logged in.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Thanks Idle, Its probably just what you explained. Not logging in each time. I will keep an eye on it!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Alright. If you want to log the IP when people post as well, then all you have to do is: [code][/code]I wouldn't recommend this if your members are very active posters... but it should be fine, nevertheless.
|
|
|
|
Joined: Feb 2000
Posts: 49
Member
|
Member
Joined: Feb 2000
Posts: 49 |
I got an error when I tried this guys. This is what it showed when I tried to log back in myself.
"Sorry, UBB has encountered an unexpected, fatal error. This error is extremely abnormal. Please contact the board administration. The error text is:
Can't open 'CGIPath/Members/user_ips/00000002.cgi'. I was unable to find that file or directory. Please check the paths.
The exact error returned by the operating system is: No such file or directory"
Any ideas what needs to be corrected.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Tiny "typo" in ubb_lib_idle.cgi. Ugh... I've updated the MHP and ZIP files, so you should be fine with just re-uploading (and overwriting) the existing ubb_lib_idle.cgi.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Just did a test registration and confirmed the IP was not captured during the registration process. Idle do I need to rehack the files? I installed it immediately after you ported it for 6.3. Thanks
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
quote: Originally posted by Eaglecrew: Just did a test registration and confirmed the IP was not captured during the registration process.
Idle do I need to rehack the files? I installed it immediately after you ported it for 6.3.
Thanks
I think you should be fine by just re-uploading the newest files, but I'd have a look at the instructions and compare them with your files that need to be modified.
IP logging on registration wasn't added until v1.2.3, so if you're using the initial release, you'll probably get away with editing "ubb_lib_registration.cgi".
Again, just to be sure I'd read the instructions as well and have a look at previous changes in your files.
|
|
|
|
Joined: May 2002
Posts: 18
Junior Member
|
Junior Member
Joined: May 2002
Posts: 18 |
quote: Originally posted by ak: I got an error when I tried this guys. This is what it showed when I tried to log back in myself.
"Sorry, UBB has encountered an unexpected, fatal error. This error is extremely abnormal. Please contact the board administration. The error text is:
Can't open 'CGIPath/Members/user_ips/00000002.cgi'. I was unable to find that file or directory. Please check the paths.
The exact error returned by the operating system is: No such file or directory"
Any ideas what needs to be corrected.
Create a directory named "user_ips" in your Members folder and I think your problem is fixed.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
No need to if you upgrade. In last update, I added a check in ubb_lib_idle.cgi which checks if the directory exists, and if it doesn't, it will create it.
|
|
|
|
Joined: Feb 2000
Posts: 49
Member
|
Member
Joined: Feb 2000
Posts: 49 |
Thanks, I will re-check this, right now I am switching host, I am going with Infopop as my host. Hope i am making the right choice.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Couple of new, interesting features in v2.0, which you might want to check out. I recall IP searching being quite popular request, and that's one of the new features in this release. Extremely useful for the admins of big boards with hordes of people who don't bother reading the board's policies.
|
|
|
|
Joined: Oct 2001
Posts: 114
Content Kidman
|
Content Kidman
Joined: Oct 2001
Posts: 114 |
You've got a typo in cp_user_ips.pl, it says "Europian" rather than "European". I also had to create the directory "user_ips" to avoid a problem. Did you miss the little enhancement in "ubb_lib_idle.cgi"? I couldn't find a test for directory existing. Great hack though.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Great work Idle! Any chance of listing the files changed since 1.2.4 to save me a little time? Following this hack to the final!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Thanks Paulus Magnus, I've fixed my typo (incredible how those always manage to sneak in!) and the directory checking should work now (for some reason I had placed it outside of the routine where the IPs are logged). Eaglecrew: The changes are in the following files: ubb_registration.cgi ubb_new_reply.cgi ubb_new_topic.cgi cp_users.cgi ubb_lib_idle.cgi (just overwrite your old one) And all of the templates listed in the text file (you can safely overwrite cp_user_ips.pl with the new one ). ZIP has been updated with the fixes mentioned above.
|
|
|
|
Joined: Feb 2000
Posts: 62
Member
|
Member
Joined: Feb 2000
Posts: 62 |
Idle - love the hack - I have a challenge however. Due to some "people issues", I've had to un-install it because on my board, it's a problem if my moderators can view ip's. Is there a way of excluding moderators from viewing the output of the hack and restrict the info to admin only - if necessary through the CP only? Then I could re-install it - it's a very good hack!
I'm depriving a village somewhere of an idiot.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Sure there is! I assume you don't want your moderator being able to view it in member profiles (Bonus Information), right? Let me see... Alright, open up "ubb_profile.cgi". [code][/code]I believe that should do the trick.
|
|
|
|
Joined: Feb 2000
Posts: 62
Member
|
Member
Joined: Feb 2000
Posts: 62 |
Thanks Idle - great work
I'm depriving a village somewhere of an idiot.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
I tried it and it still shows IP info to the mods if they click on the Moderator name in the far right column of the forum summary page. One other note... it works correctly if you click on the IP link for a post but the message says this information is only available to Admins/Mods. Can we remove the Mods text so the message is accurate? Thanks again idle for your work on this mod!!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Oh lord... no wonder it doesn't work, if you used my code posted above. There's some tiny "typo" in it. :rolleyes: Anyways, this one I just tested, and it works just fine: View code changes And finally... save 'n upload, remember to backup your stuff, clear your cache, sit back and enjoy!
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
It wasn't as bad as you thought Idle. I didn't just copy and paste! Ok made the changes and logged in as a mod. I can still view all the extra info if I click on the moderator link on the forum summary page.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
When you say "all the extra info", are you referring to the section Bonus Information (Forum Leaders Only) and/or the one added by my mod, Recent Activities (Administrators Only)?
Anyway, I can have a look at your board if you want me to, just PM/email me the info. If not, then I completely understand you.
I'm getting pretty clueless... works fine for some people, but not everyone. :rolleyes:
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Idle, here is what I see when I login as a mod...
Bonus Information (Forum Leaders Only): Login Name: EMJFLYR Recent Activities Date/Time: 05-29-2002 11:12 PM Recent Activities IP: 66.169.???.208 Last Login Date/Time: 05-29-2002 11:12 PM Last Login IP: 66.169.???.208
This is the additional info I see logged in as an Admin... Recent Activities (Administrators Only): Date/Time: 05-29-2002 11:12 PM IP: 66.169.???.208
Govner requested "Is there a way of excluding moderators from viewing the output of the hack and restrict the info to admin only?"
Basically my mods see the same info I see as a admin and thought this was a cure for that?
Thx!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
I assumed you had removed the previous changes to "public_display_profile.pl", before. Alright... I've decided to make this a part of the mod, and have updated the text instructions accordingly. Since you've got everything else done, re-hacking public_display_profile.pl should do the trick.
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Sorry Idle, guess I'm having trouble keeping up.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
No problem, not at all! I guess I'm having a problem being clear in my isntructions and posts. Just tell me everything's working as you want it to be, and you'll make me the happiest Idle on Earth! Well, for some time, at least.
|
|
|
|
Joined: Jan 2002
Posts: 27
Junior Member
|
Junior Member
Joined: Jan 2002
Posts: 27 |
MultiHack worked fine! Works great all in all.
I'm still having problem with my sites IP's though. Thought this may help, but it didnt. Lots of people share the same IP.
example.
Joe, sally, matt, blah, blah, blah, blah, blah, blah
click there logged IP, Brings up list of IP 1.10.11.10 (used as example)
1.10.11.10 underneath this ussually get a list of 10-15 names
site members = 500
this is the case for all the members. I dont even think my IP is correct that it logged.
Even after i installed the Advanced IP logging hack. Cleared cache. Deleted my internet cache and relogged onto the board. The same IP showed up. The wrong one, the one that is shared.
Im lost on this one and totally stumped.
anyways. Your hack worked fine. Great work, look forward to getting more use out of it when i get my IP thing straightened out.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
I replied to your other topic in v6.3 Mod Ideas forum. As for the MultiHack file... it isn't up to date and doesn't include the latest fixes, if memory serves. I was going to remove those, both because I don't have the time to update them every time, and I find MH to be too unreliable when dealing with already modified boards.
|
|
|
|
Joined: Jun 2002
Posts: 17
Junior Member
|
Junior Member
Joined: Jun 2002
Posts: 17 |
Hello,
I installed this mod and it is recording ips in the user_ips directory.
But when I goto display them under the Control Panel, it does not display the ips.
The control panel only displays:
User IP History: Teleri (number 00000571)
But then it does not list any IP's, even though that user has a file with IP's in it in the user_ips directory. Also, it is displaying that line above the control panel drop down menu's (primary settings, members, maintenance, etc).
Any ideas? I am using release 6.3.0, I am not using JC Templates.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Check the permissions on the directory (MembersPath/user_ips) and on the files within user_ips. It should be 777. As for the line containing the member's public name and number being above everything else, I have no clue. I had a quick look at the files included with the mod, and changed couple of things... You should download the archive again and overwrite the existing ubb_lib_idle.cgi (CGIPath) and cp_user_ips.pl (Templates). I hope that fixes your problem.
|
|
|
|
Joined: Jun 2002
Posts: 17
Junior Member
|
Junior Member
Joined: Jun 2002
Posts: 17 |
I checked the permissions on the user_ips directory and it is 777.
I installed the two new files and I still have the same problem.
No ips are displayed when I click on the "View User IP History" in the "Update Member Info" screen.
Any other ideas?
|
|
|
|
Joined: Jun 2002
Posts: 17
Junior Member
|
Junior Member
Joined: Jun 2002
Posts: 17 |
I think I know why it's not working. I was using the code from the adv_iplog.txt dated 6/11/02.
I just downloaded that new one and noticed adv_iplog.txt is dated 7/2/02.
Do you know what was changed offhand Idle?
edit: nm. I ran compare on them and it appears nothing was changed. If I am wrong let me know, thanks.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Drop me a PM, I'm sure we can work something out.
|
|
|
|
Joined: Sep 2001
Posts: 38
Member
|
Member
Joined: Sep 2001
Posts: 38 |
Just installed this mod and it seems to be working great!
Do I understand correctly that if a user goes away long enough for their user session to completely time-out, even for a days or more, and then comes back to the UBB with a different IP, that their new IP is not logged?
Since virtually nobody actually logs out or logs in after registering, is there any way to capture new ip's upon returning from a timed-out session? That would make this mod hugely valuable.
Thanks!
|
|
|
|
Joined: Sep 2001
Posts: 38
Member
|
Member
Joined: Sep 2001
Posts: 38 |
Thinking more about this it occurred to me that on a fairly large board with thousands of user sessions per day, the size the IP log files might get huge if every new IP is captured and recorded.
Maybe in addition to capturing new unique IP's from each new session on the website (new sessions after old session time-outs in addition to new log-ins), it could maintain the last 10 or 15 IP's only, rather than all that were ever recorded. This would provide all of the value of IP capture since it is the more recent ones that are most relevant.
Furthermore, it would provide the last visit date for everybody regardless of whether they log out or not.
Is this doable? Thanks again!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Sorry for a late reply, work is eating all of my time these days. Sure, it's all possible, and to get the latest visit date, you can simply read the user's cookie. Uhm, I'll see what I can do when workload drops back to normal.
|
|
|
|
Joined: Sep 2001
Posts: 38
Member
|
Member
Joined: Sep 2001
Posts: 38 |
Thanks Idle, that would be great!! Wouldn't you also need to write (instead of reading) the cookie when the user views the forum summary or some other common stop in the UBB? I'll poke around to to see if I can figure out a way, but I really don't know what I'm doing so will probably not get very far. Thanks again!
|
|
|
|
Joined: May 2001
Posts: 50
Member
|
Member
Joined: May 2001
Posts: 50 |
Hmm well I have a problem When I tried to implememnt this mod on UBB 6.3.1.1 one of the instructions says: code:
======================================== In cp_edit_profile.pl Find: ======================================== | <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_posts&u=$in{u}">View User Posts</a>
However when I looked in that file I couldn't find the entry The closest match I could find was: code: [qb]| <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_posts&u=$in{u}">$vars_wordlets_cp{edit_profile_user_posts}</a> [/qb] Although somehow I don't think that's it Any ideas on how to get this to work or is it going to be incompatible with higher UBB 6.3 verions? Thanks in advance
|
|
|
|
Joined: Sep 2001
Posts: 38
Member
|
Member
Joined: Sep 2001
Posts: 38 |
Fahd, I had the same issue -- that "Find" line you identified is the wordletized version of the line in the instructions. Just add the hack's new line in the instructions after the one you identified above and it'll work (the new one will just not be wordletized, but who cares).
There are a couple other spots where new wordletized changes require you to identify the equivalent of the old non-wordletized version (e.g., in the user search and the search results) -- but the "add after" or the "replace" code all works if you can find the spot to add it (which is not that difficult). Just have backups before experimenting!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
No, the cookie wouldn't have to be rewritten, it's already done by UBB.classic, if memory serves. Uhm, I never tried this add-on on 6.3.1.x, as I primarily made it for 6.3.0.x. UBB.classic went through lots of changes (especially all the Control Panel templates) in 6.3.1. I still have to "port" this to the newer UBB.classic. Somewhere at UBBDesign.com is a simple script to read the user's cookie and to retrieve the last date/time of visit. I just don't have any URL, but my bet is on the archives.
|
|
|
|
Joined: May 2001
Posts: 50
Member
|
Member
Joined: May 2001
Posts: 50 |
Hmm I might just wait till you do the port then since there's too many different entries where I have to guess at the moment
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
True. I'll start working on it soon, even tonight or tomorrow.
|
|
|
|
Joined: May 2001
Posts: 50
Member
|
Member
Joined: May 2001
Posts: 50 |
Updating this would make my head admin a very happy person. So thanks for taking the time to do it
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
Joined: Oct 2000
Posts: 743 |
When do you expect a 6.3.1.1 version to be available, looking forward to it.
Cheers
I can't afford a good signature editor
|
|
|
|
Joined: Jun 2002
Posts: 111
Member
|
Member
Joined: Jun 2002
Posts: 111 |
Just been testing it with 6.5.0 And it works, all u need is to find the new rewritten thinks fromt he text file: ****************************************************************************** ****************************************************************************** * Mod Name: Advanced IP Logging * ****************************************************************************** * Description: Adds new IP logging feature to your board. * * It also adds Recent Activities section with date/time/IP * * to member profiles. * * Adds "View User IP History" link to users profiles * * (admins only, Control Panel). * * Adds a new search option to the Extended Search Options in * * the UBB Control Panel (User IP History). * ****************************************************************************** * Updates: v1.2 - * * Minor code changes and a bug fix. * * * * v1.2.1 - * * Code cleanup. * * * * v1.2.2 - * * MultiHack support. Ported to v6.2 and v6.3 series. * * "N/A" displayed instead of nothing if no IP has been * * recorded for someone (profile only). * * * * v1.2.3 - * * More code cleanup. IP recorded on initial login (right * * after registration). * * * * v2.0 - * * New features and changes include: * * IPs are only logged if they are "unique". That is, if * * haven't been logged for that user before. * * It is possible to search user IP history from the control * * panel (View/Edit Member Records - Extended Search Options)* * * * v2.0.1 - * * Bug fix: Directory created if it doesn't exist. * * Only administrators are allowed to view the * * "Recent Activities" part of member profiles. * * * * v2.0.2 - * * Bug fix: Directory created if it doesn't exist. * * Only administrators are allowed to view the * * "Recent Activities" part of member profiles. * ****************************************************************************** * By: Idle * * Email: [email protected] * * Date: Nov 10th, 2003 * * Version: 2.0.2 * ****************************************************************************** * Requirements: 6.5.0 Beta Release 1 or newer. * * Compatability: 6.5.x * * Tested On: 6.5.0 Beta Release 1 and 6.3.0.3 * ****************************************************************************** * Files Modified: ultimatebb.cgi, ubb_profile.cgi, cp.cgi, * * ubb_registration.cgi, ubb_new_reply.cgi, * * ubb_new_topic.cgi, cp_users.cgi * * * * Templates: public_display_profile.pl, cp_edit_profile.pl, * * cp_user_search_form.pl, cp_user_search_results.pl * * cp_new_members.pl * * * * New Files: ubb_lib_idle.cgi, cp_user_ips.pl * ****************************************************************************** ****************************************************************************** * Disclaimer: By using this mod, the user implicitly agrees that they * * are willingly modifying any and all files at their own * * risk. Should any errors occur either as a direct or * * indirect result of said modifications the user agrees not * * to hold Infopop Corporation or any of the individuals * * listed above accountable. * * * * * * In Other Words: Please make backup copies of every file you plan to * * modify prior to modification! * * * * * * For more tips and tricks for use with the Ultimate Bulletin Board * * please visit us at: * * * * https://ubbdev.com * * * ****************************************************************************** ******************************************************************************
======================================== In ultimatebb.cgi Find: ======================================== chomp($mod_q);
#6.1.0 - now forbidding login without queue approval
======================================== BELOW that paste: ======================================== #append to IP log &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &AppendIPLog($profile_number);
======================================== In ubb_registration.cgi Find: ======================================== $username = $user_name;
print header( -cookie => [$cookie], -charset => "$masterCharset", -type => "text/html", );
======================================== BELOW that paste: ======================================== #append to IP log &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &AppendIPLog($next_number);
======================================== In ubb_profile.cgi Find: ======================================== sub get_profile { local (@user_profile, $user_public_name, $user_status, $count, $chompee, $date_registered, $reg_month, $reg_day, $reg_year, @themonths, @viewer_profile, $is_admin_mod, $u, $rating_line, $overall_rating, $admin_view_rating, %user, $personal_line, $personal_rating, $user_ratings_off, %votes, %totals, %avg, %weighted_avg, $pm_line, %pm_ignore, %pm_buddy, $total_votes, $add_2_list);
======================================== BELOW that paste: ======================================== local (@mylast, $is_admin);
======================================== In ubb_profile.cgi Find: ======================================== # viewing your own record.. if so, can't rate yourself
======================================== ADD above: ======================================== if ($viewer_profile[8] eq 'Administrator') { $is_admin = 'true'; } else { $is_admin = 'false'; }
======================================== In ubb_profile.cgi Find: ========================================
} # end pm check
if ($rating_line eq '') { $rating_line = ' '; }
======================================== BELOW that paste: ========================================
# retrieve last login stuff &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &GetLastLoginInfo("$in{u}");
======================================== In cp.cgi Find: ======================================== if (($ubb eq 'user_posts') && ($status eq 'Administrator')) { &RequireCode("$vars_config{CGIPath}/cp_users.cgi"); &recent_user_posts_for_admin; exit(0); } #end user_settings
======================================== BELOW that paste: ======================================== if (($ubb eq 'user_ips') && ($status eq 'Administrator')) { &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &recent_user_ips_for_admin; exit(0); } #end user_ips
======================================== In ubb_new_reply.cgi Find: ======================================== &WriteMemberProfile($user_number, @user_profile); # Now update the user posts file &AppendFileAsString("$vars_config{MembersPath}/user_posts/$user_number.cgi", "$GotTime{YMDRunonDate}|$in{f}|$in{t}|$post_number|$ipaddyn"); } # end update user profile
======================================== BELOW that paste: ======================================== #append to IP log &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &AppendIPLog($user_number);
======================================== In ubb_new_topic.cgi Find: ======================================== &WriteMemberProfile($user_number, @user_profile);
# Now update the user posts file &AppendFileAsString("$vars_config{MembersPath}/user_posts/$user_number.cgi", "$GotTime{YMDRunonDate}|$in{f}|$new_topic_number|000000|$ipaddyn"); } # end update user profile
======================================== BELOW that paste: ======================================== #append to IP log &RequireCode("$vars_config{CGIPath}/ubb_lib_idle.cgi"); &AppendIPLog($user_number);
======================================== In cp_users.cgi Find: ======================================== $searchparams{'regip'} = $in{'regip'};
======================================== BELOW that paste: ======================================== $searchparams{'loggedip'} = $in{'loggedip'};
======================================== In cp_users.cgi Find: ======================================== if (($params{'canwrite'} eq "") && #if none of the extended options ($params{'privforum'} eq "") && #are selected, just go straight to the results screen ($searchparams{'posts'} eq "") && ($searchparams{'status'} eq "") && ($searchparams{'permiss'} eq "") && ($searchparams{'lastpost'} eq "") && ($searchparams{'regdate'} eq "") && ($params{'bdaymath'} eq "") && ($searchparams{'regip'} eq "") && ($searchparams{'lpostip'} eq "") && ($searchparams{'pemail'} eq "") && ($searchparams{'nobday'} eq "") && ($searchparams{'currentposts'} !~ m/^(yes|no)$/) ) {
$searchparams{'skipprocess'} = 1; # if $searchparams{'number'} =~ m/^d{1,}$/; } ======================================== REPLACE with: ======================================== #if none of the extended options (other than email) are selected, just go straight to the results screen if (($params{'canwrite'} eq "") && ($params{'privforum'} eq "") && ($searchparams{'posts'} eq "") && ($searchparams{'status'} eq "") && ($searchparams{'permiss'} eq "") && ($searchparams{'lastpost'} eq "") && ($searchparams{'dname'} eq "") && ($searchparams{'regdate'} eq "") && ($params{'bdaymath'} eq "") && ($searchparams{'regip'} eq "") && ($searchparams{'lpostip'} eq "") && ($searchparams{'pemail'} eq "") && ($searchparams{'loggedip'} eq "") && ($searchparams{'pemail'} eq "") && ($searchparams{'nobday'} eq "") && ($searchparams{'currentposts'} !~ m/^(yes|no)$/) ) {
$searchparams{'skipprocess'} = 1; # if $searchparams{'number'} =~ m/^d{1,}$/; }
======================================== In cp_users.cgi Find: ======================================== if ($searchparams{'pemail'} ne "") { #print "10"; next CHECKER unless exists $memberslist{$user}; my $returned = &SearchForEmail($profile[9]); &CheckReturn($returned, $user); }
======================================== BELOW that paste: ======================================== if ($searchparams{'loggedip'} ne "") { #print "11"; next CHECKER unless exists $memberslist{$user}; my $userips = &OpenFileAsHash("$vars_config{MembersPath}/user_ips/$user.cgi", "|"); my $returned = &SearchIPHistory($userips, $searchparams{'loggedip'}); &CheckReturn($returned, $user); }
======================================== In cp_users.cgi Find: ======================================== sub SearchForIP { my $field = shift; my $what = shift; my $match = 2;
# Don't match invalid IPs return $match unless $field =~ m/^d{1,3}.d{1,3}.d{1,3}.d{1,3}$/; return $match unless $what =~ m/^[d.\]+$/;
return 1 if $field =~ m/$what/; return $match; }
======================================== BELOW that paste: ======================================== sub SearchIPHistory { my $iplist = shift; my $what = shift; my $match = 2;
my %iplist = %$iplist;
$crap = $what; # 128.110.34.27 $crap =~ s/\//g; # 128.110.34.27
# Don't match invalid IPs return $match unless $crap =~ m/^d{1,3}.d{1,3}.d{1,3}.d{1,3}$/;
return 1 if exists($iplist{"$crap"});
return $match; }
======================================== In public_display_profile.pl Find: ======================================== extra_info
======================================== ADD above: ======================================== $TBB
======================================== In public_display_profile.pl Find (same as above): ======================================== extra_info
======================================== ADD below: ======================================== if ($is_admin eq 'true') { print <<recent_stuff; $TBT <tr bgcolor="$vars_style{TableColorStrip}"> <td colspan="2"> <font size="$vars_style{TextSize}" color="$vars_style{TableStripTextColor}" face="$vars_style{FontFace}"> <b>Recent Activities (Administrators Only)</b>: </font> </td> </tr>
<tr bgcolor="$vars_style{AltColumnColor1}"> <td colspan="2"> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>Date/Time</b>: $mylast[1] </font> </td> </tr>
<tr bgcolor="$vars_style{AltColumnColor1}"> <td colspan="2"> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>IP</b>: $mylast[0] </font> </td> </tr> recent_stuff }
======================================== In cp_edit_profile.pl Find: ======================================== | <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_posts&u=$in{u}">$vars_wordlets_cp{edit_profile_user_posts}</a>
======================================== Replace with: ======================================== | <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_posts&u=$in{u}">$vars_wordlets_cp{edit_profile_user_posts}</a> | <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_ips&u=$in{u}">View User IP History</a></B>
========================================
======================================== In cp_new_members.pl Find: ======================================== <td valign="bottom"><span class="autorow-description" style="font-weight: bold;"> $vars_wordlets_cp{newmembers_header_status} </span></td>
======================================== BELOW that paste: ======================================== <td valign="bottom"><span class="autorow-description" style="font-weight: bold;"> IP History </span></td>
======================================== In cp_new_members.pl Find: ======================================== <td class="autorow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-description"> $title </span></td>
======================================== BELOW that paste: ======================================== <td class="autorow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-description"> <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_ips&u=$un">View IP History</a> </span></td>
======================================== In cp_user_search_form.pl Find: ========================================
<tr bgcolor="$vars_style_cp{AltColumnColorCurrent}"> <td class="autorow"><span class="autorow-title"> <label for="lpostip">$vars_wordlets_cp{memsearch_last_ip}</label></span>
<span class="autorow-description"> $vars_wordlets_cp{memsearch_last_ip_explained} </span></td> <td class="autorow"><span class="autorow-options"> <input type="text" size="15" maxlength="15" id="lpostip" name="lpostip" /> </span></td></tr>
======================================== BELOW that paste: ======================================== ~; &AlternateColors; print qq~
<tr bgcolor="$vars_style_cp{AltColumnColorCurrent}"> <td class="autorow"><span class="autorow-title"> <label for="lpostip"><b>User IP Histories</b></label></span>
<span class="autorow-description"> This will search all logged IP addresses. This is an <b>exact</b> IP match, so you will need to supply a complete and valid IP address for accurate results (<b>127.0.0.1</b>, but not <b>127.0</b>). </span></td> <td class="autorow"><span class="autorow-options"> <input type="text" size="15" maxlength="15" id="lpostip" name="lpostip" /> </span></td></tr>
======================================== In cp_user_search_results.pl Find: ======================================== <td valign="bottom" class="secondheaderrow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-options"> $vars_wordlets_cp{memsearch_results_header_stauts} </span></td>
======================================== BELOW that paste: ======================================== <td valign="bottom" class="secondheaderrow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-options"> IP History </span></td>
======================================== In cp_user_search_results.pl Find: ======================================== <td class="autorow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-description"> $title
$user_profile[31] </span></td>
======================================== BELOW that paste: ======================================== <td class="autorow" style="border-left: 1px solid $vars_style_cp{AltBorderColor};"><span class="autorow-description"> <a href="$vars_config{CGIURL}/cp.cgi?ubb=user_ips&u=$match">View IP History</a>
</span></td>
========================================
If you're using JCTemplates, complete the next step as well.
=============================================================== In noncgi/Templates/JCTemplates/public_display_profile.pl Find: =============================================================== extra_info
======================================== ADD above: ======================================== $TBB
=============================================================== In noncgi/Templates/JCTemplates/public_display_profile.pl Find (same as above): =============================================================== extra_info
======================================== BELOW that paste: ======================================== if ($is_admin eq 'true') { print <<recent_stuff $TBT <tr bgcolor="$vars_style{TableColorStrip}"> <td colspan="2" class="normal-font" background="$vars_config{NonCGIURL}/$vars_style{jc_title_bar}">Recent Activities (Administrators Only):</td> <td background="$vars_config{NonCGIURL}/$vars_style{jc_title_bar}"> </td> </tr>
<tr bgcolor="$vars_style{AltColumnColor1}"> <td colspan="2" class="normal-font" width="35%"><b>Date/Time</b>:</td> <td colspan="2" class="normal-font" width="65%" align="left">$mylast[1]</td> </tr>
<tr bgcolor="$vars_style{AltColumnColor1}"> <td colspan="2" class="normal-font" width="35%"><b>IP</b>:</td> <td colspan="2" class="normal-font" width="65%" align="left">$mylast[0]</td> </tr> recent_stuff } ========================================
UPLOAD all hacked files. UPLOAD ubb_lib_idle.cgi to your CGI Directory and CHMOD to 755. UPLOAD cp_user_ips.pl to your NonCGI/Templates directory.
Now clear your cache. Enjoy the hack! Any problems post in the hack thread: https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=31;t=000033
|
|
|
|
Joined: Dec 2003
Posts: 5
Junior Member
|
Junior Member
Joined: Dec 2003
Posts: 5 |
I'm using 6.3.0.1 and I would love to use this mod but I need a way to force users to reauthorize every 24 hours (so it captures a new IP for them). Is there a way to set an expiration on their login cookie?
|
|
|
|
Joined: May 2001
Posts: 55
Member
|
Member
Joined: May 2001
Posts: 55 |
I agree with August. Its more important to log their ip's with their last SESSION(last viewing of the board)because nobody logs in and out anymore(with cookies) Because otherwise this is just a duplicate of the 'LAST POST' hack which I already have. in other words, I already know when their last post was and what their ip address was for that post. I NEED to know the date/time/ip of the last 10-15 times that they viewed the board but DIDNT post AND DIDNT login Originally posted by August:
Thinking more about this it occurred to me that on a fairly large board with thousands of user sessions per day, the size the IP log files might get huge if every new IP is captured and recorded.
Maybe in addition to capturing new unique IP's from each new session on the website (new sessions after old session time-outs in addition to new log-ins), it could maintain the last 10 or 15 IP's only, rather than all that were ever recorded. This would provide all of the value of IP capture since it is the more recent ones that are most relevant.
Furthermore, it would provide the last visit date for everybody regardless of whether they log out or not.
Is this doable? Thanks again!
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
Did you guys get the table header right? Mine doesnt look properly.
Know where the mistake is?
Thank you
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Looks like you need to adjust a colspan= in the td with the 'additional members' line.
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
right you are. because he added a new column in the table the spans had to be adjusted. They are pretty now, here, if somebody else needs the change: in cp_user_search_results.pl ###############################
Find: #######
<tr bgcolor="#ffffff"> <td colspan="3" align="left" class="smallrow"> $vars_wordlets_cp{memsearch_results_matches} $sp - $ep [$search_count $vars_wordlets_cp{memsearch_results_total}] </td>
<td colspan="3" align="right" valign="bottom" class="smallrow"> $previous $current $more </td> </tr>
replace with: #############
<tr bgcolor="#B6C7E5"> <td colspan="4" align="left" class="smallrow"> $vars_wordlets_cp{memsearch_results_matches} $sp - $ep [$search_count $vars_wordlets_cp{memsearch_results_total}] </td>
<td colspan="4" align="right" valign="bottom" class="smallrow"> $previous $current $more </td> </tr>
in cp_user_ips ################
find: #########
# UBB CONTROL PANEL - IP HISTORY PAGE
&TBT; #Table Border Top in cp_common.pl
&HeaderRow("User IP History: $user_public_name (number $user_number)", "4", "#FFFFFF", "#000000", "left", "1", "1"); &HeaderRow("Total IPs: $total", "4", "#5d7790", "#FFFFFF", "center", "2");
print <<recent_ips_for_user;
<tr bgcolor="#5d7790"> <td> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>IP Address</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>Date/Time</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>ARIN</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>RIPE</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>APNIC</b> </font> </td> </tr>
recent_ips_for_user
$counter = 0; foreach (@ips) {
$nextitem = $ips[$counter]; @thisitem = split (/|/, $nextitem); # Login Name, IP, Date/Time
print <<this_ip;
<tr> <td bgcolor="#5d7790"> </td> <td valign="top" bgcolor="#ffffff"> <font size="1" face="Verdana, Arial"> <b>$thisitem[0]</b> </font> </td>
replace with: ##############
# UBB CONTROL PANEL - IP HISTORY PAGE
&TBT; #Table Border Top in cp_common.pl
&HeaderRow("User IP History: $user_public_name (number $user_number)", "6", "#B6C7E5", "#000000", "left", "1", "1"); &HeaderRow("Total IPs: $total", "6", "#5d7790", "#FFFFFF", "center", "2");
print <<recent_ips_for_user;
<td> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>IP Address</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>Date/Time</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>ARIN</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>RIPE</b> </font> </td> <td> <font color="#ffffff" size="1" face="Verdana, Arial"> <b>APNIC</b> </font> </td> </tr>
recent_ips_for_user
$counter = 0; foreach (@ips) {
$nextitem = $ips[$counter]; @thisitem = split (/|/, $nextitem); # Login Name, IP, Date/Time
print <<this_ip;
<tr> <td bgcolor="#ffffff"> </td> <td valign="top" bgcolor="#ffffff"> <font size="1" face="Verdana, Arial"> <b>$thisitem[0]</b> </font> </td>
In cp_new_members.pl #####################
Find: ######
my $thiscount = scalar(@new_members);
&HeaderRow("$vars_wordlets_cp{total_members} $total_members | $vars_wordlets_cp{last_50_registrations}", "4", $vars_style_cp{AltColumnColor1}, $vars_style_cp{TextColor}, "left", "1", "1");
&HeaderRow("$vars_wordlets_cp{new_members}", "4", $vars_style_cp{HeaderColor}, $vars_style_cp{HeaderTextColor}, "center", "2");
CHANGE #######
"4" to "5" on both lines
However, it is a great mod, thanks BassTeQ.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|