vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Thread Whois (https://vborg.vbsupport.ru/showthread.php?t=35712)

Admin 03-06-2002 04:08 PM

Twig Deez, that's correct. You *always* need to addslashes() when storing strings in database.

Neo 03-06-2002 04:32 PM

Ok Twig.

Instead of
PHP Code:

$timeoutsecondswhois 260000
$timestampwhois time(); 
$timeoutwhois $timestampwhois-$timeoutsecondswhois

$DB_site->query("INSERT INTO threadwhois SET timestamp='$timestampwhois',threadid='$thread[threadid]',threadname='".addslashes($thread[title])."',username='".addslashes($bbuserinfo[username])."', ip='$REMOTE_ADDR'");
$DB_site->query("DELETE FROM threadwhois WHERE timestamp<$timeoutwhois"); 

use
PHP Code:

if ($bbuserinfo[usergroupid]==XX) {
$timeoutsecondswhois 260000
$timestampwhois time(); 
$timeoutwhois $timestampwhois-$timeoutsecondswhois

$DB_site->query("INSERT INTO threadwhois SET timestamp='$timestampwhois',threadid='$thread[threadid]',threadname='".addslashes($thread[title])."',username='".addslashes($bbuserinfo[username])."', ip='$REMOTE_ADDR'");
$DB_site->query("DELETE FROM threadwhois WHERE timestamp<$timeoutwhois");



Make the XX the number of the group id you want to have use this.

Twig Deez 03-07-2002 01:35 AM

Quote:

Originally posted by FireFly
Twig Deez, that's correct. You *always* need to addslashes() when storing strings in database.
thanks firefly. i hadn't even read thru the code that thoroughly,
and i ended up with something like 400 database errors in my inbox from overnight, heh.
i remember the addslashes thing from a fix for another hack anyway,
so that's sorted that out. thanks for the confirmation!

and neo, thanks a lot for that addition! perfect for what i was thinking of.
i can also now figure out how to restrict the output to one particular user,
since i have it in mind to do something with that also.

again, thanks! :D

Joshua Clinard 03-08-2002 03:16 AM

This looks like a pretty good hack, with the exception of the load, and that's not your fault. Does anyone know if there would be a way to do this hack without adding so much to the database?

Neo 03-08-2002 11:59 AM

Twig Deez: No problem man.

Joshua Clinard: Make it for a specific user group, (like above)

LaNder 03-13-2002 12:21 PM

hi,

i found out, that the function "sort by Thread Name" or "sort by IP" isn't working.

it's always sorted by Username. is there a fix possible?

LaNder

Neo 03-13-2002 12:52 PM

I believe this is sorted by start date

Jawelin 05-16-2002 02:16 PM

Neo, very nice hack. Very very cool!
Simple but great idea.

I implemented it with a couple of enhancements. Just to give you an extend-idea... :D
- stored a little bit more infos coming from user and thread (for example: forumid, number of posts in thread that moment, proxyip, etc).
- I already have a weekly scheduled "dump, archive and flush" of all four (now five) log tables. So I removed the in-code delete timeout.
- To make that table not too fast grown up, I added a field to forum tables (managed in forum.php) to choose either if log accesses to that particular forum or not.
This way, I could focus the logging to most 'sensitive' areas of my board.

If someone needed, I could post the delta instructions.
Any way, many thanks to your idea and clear implementation.

Bye

StarBuG 05-24-2002 01:01 PM

Hmmm!

This hack could be usefull but not in this way for me!
Is it possible to change the hack to this?

If a user clicks on the Hit counter of a thread that a popup opens and shows the users who viewed this thread?

That is what I realy need!

Greetings

StarBuG

NeRilkA 06-14-2002 03:18 PM

Thanks a lot i was just looking for this hack !! great :)


All times are GMT. The time now is 06:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01146 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete