The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Reset Notices
I am trying to reset notices I removed on my forum I have a code here:
PHP Code:
|
#2
|
|||
|
|||
Can anyone help me at all?
|
#3
|
|||
|
|||
Are you sure those are the correct cookie names? The code for determining the cookie prefix is:
Code:
define('COOKIE_PREFIX', (empty($this->config['Misc']['cookieprefix']) ? 'bb' : $this->config['Misc']['cookieprefix']) . '_'); Maybe it would be better to include config.php before the check and use the above code, like: Code:
include('includes/config.php'); define('COOKIE_PREFIX', (empty($config['Misc']['cookieprefix']) ? 'bb' : $config['Misc']['cookieprefix']) . '_'); if ($_COOKIE[COOKIE_PREFIX . 'userid']==0 || $_COOKIE[COOKIE_PREFIX . 'userid']==null) { die('You must be logged in to reset dismissed notices.'); } Also, where is the script that you're running? If it's not in the same directory as the vb scripts then you need to have "Path to Save Cookies" (under Cookies and HTTP Header Options) set to / or else the cookies won't be sent to your script. Checking the cookies doesn't give you much security - anyone could send a fake cookie and it only needs to have a non-zero userid. If this is a concern you could include the vb global.php in your script then check to see if the user is actually logged in. |
Благодарность от: | ||
chrissyplum79 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|