Log in

View Full Version : [vBulletin Input Cleaner] i can't get Postid of Who user Browse it


omardealo
02-27-2014, 09:56 AM
Hello ,

i used this code to know number of (postid | threaid) , when user Browse it

$vbulletin->input->clean_array_gpc('r', array(
'threadid' => TYPE_UINT ,
'postid' => TYPE_UINT
));

$thread_num = $vbulletin->GPC['threadid'];
$postid_num = $vbulletin->GPC['postid'];


works very good with Default links like this
vb/showthread.php?p=22#post22

but my problem with vbseo hack , when links like that
vb/t18/#post22

only works (threadid) , but (postid) not work and show me Result "0"

Any solution, or another way to know the number of the Post Who user Browse it At this moment?!

Thank !

omardealo
03-01-2014, 09:56 AM
Any solutions or suggestions ?

tbworld
03-01-2014, 10:04 AM
You need to explain where you are executing that code? If it is a plugin provide the complete plugin code and the related hook. :)

omardealo
03-01-2014, 10:27 AM
You need to explain where you are executing that code? If it is a plugin provide the complete plugin code and the related hook. :)

i make plugin for alert users about new posts in them threads
so , i need to know is user open this alert of post or not , to Delete it ..


hook : global_start

code :


$vbulletin->input->clean_gpc('r', 'postid', TYPE_UINT);
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . " alert_post WHERE ".intval($vbulletin->GPC['postid'])." in (postid) and userid = ".$vbulletin->userinfo['userid']." ");

Note :
this code work good when user open post whit Default links [vb/showthread.php?p=22] but with vbseo links [vb/t18/#post22] sometimes work ,sometimes not work ...
And in session table don't add number of postid , just add threadid [showthread.php?t=5] on filed location .
so i need any way to know if this user open this postid or not .

omardealo
03-06-2014, 04:47 PM
the code in above working with VBSEO links , but must refresh the page Each time to appears Postid ...
Any Solutions?

omardealo
03-12-2014, 04:01 PM
still wating , if there any another way to get number of postid from link .