The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
you have a real wierd board have ya?
it shows also 0 at my boards... |
#12
|
||||
|
||||
This is the code I have, with the origional variables in the templates and it works fine on 2.2.7 and 2.2.8 and displays 0 for me:
PHP Code:
|
#13
|
|||
|
|||
I have this:
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages, SUM(IF(dateline>$bbuserinfo[lastvisit] AND folderid=0,1,0)) AS newpm, SUM(IF(messageread=0 AND folderid=0,1,0)) AS unreadpm FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers"); $newpm['messages']=$allpm['newpm']; $unreadpm['messages']=$allpm['unreadpm']; Which looks the same! However it still doesn't show 0 for unread and new PMs! Why is it doing this? Is there anything in index.php that could cause this? [i have modified it a tiny bit, but not the PM bits :S] |
#14
|
||||
|
||||
hmm, depends on what you've changed
try PHP Code:
PHP Code:
|
#15
|
|||
|
|||
It works! Thankyou for putting up with me and my problems, keep up the good work
|
#16
|
||||
|
||||
you're welcome i'm glad finally it works btw. i think it's an php internal issue, can you tell me which php version you run? |
#17
|
||||
|
||||
Quote:
|
#18
|
||||
|
||||
well this part isn't a security risk part, so you can leave your code or change it, no problem...
intval is more secure, because strings are always converted into an int value. that'll take effect on inputboxes whenever a user should enter an intval but enters a string this could produce security problems as i can think of. hmm, is this understandable? perhaps an example: PHP Code:
UPDATE user SET posts=5,password=MD5('hello') if you use intval this cannot happen: PHP Code:
UPDATE user SET posts=5 |
#19
|
||||
|
||||
Thanks for the explaination Xenon I understand why and where intval should be used now
|
#20
|
||||
|
||||
Yes, I think that's why they did it - to avoid users entering in non-integer values and running the risk of corrupting the db or causing db errors.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|