The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
forumhome: PM Queries optimization!
I've seen people post about combining the "unread PMs, total PMs, new PMs" queries, into just one from three! How can this be achieved?! I would love to know because I need to combine them
|
#2
|
||||
|
||||
this are the codelines instead the original 3 queries:
PHP Code:
|
#3
|
||||
|
||||
I've always wondered why the vB team has never made this a standard thing in the latest versions of vB.
|
#4
|
||||
|
||||
good question...
i think they just wanted to fix all bugs, but leave their head free for working on vb3 if they had also optimizations for vb2 in the head they'll get confused *g* |
#5
|
|||
|
|||
What are the variables to put in forumhome_pmloggedin template with that code? I have Total PMs working, but not unread and new PMs since your last visit...
|
#6
|
||||
|
||||
You can't decrease queries in templates.
You need to edit the PHP files. Replace the PM query lines in index.php with the code that Xenon put up. |
#7
|
||||
|
||||
you don't have to change anything in your templates, it is just a code replace
|
#8
|
|||
|
|||
No, I understand that...however it seems the variable to place in forumhome_pmloggedin has changed, as no number shows up. I think it may be:
$allpm['newpm'] And: $allpm['unreadpm'] now? |
#9
|
||||
|
||||
this is the original part:
PHP Code:
|
#10
|
|||
|
|||
Ok I figured out what was confusing me! I had no unread messages, and no new PMs so it didn't show 0, it showed nothing at all...is there a way to make it say 0 if you don't have any, instead of not showing anything at all?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|