The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Simple Request... Yet Seems Difficult
I've been struggling for months now in trying to basically excluse the pieces of code that do the following on a non-vb page:
a) Keeps the user logged in (so it can say Welcome Whoever) b) Gets all of the user table information (so I can check if they are a certain usergroup id) Thats all I want... and I cant find any way of doing this without including global, which runs tons of un-neccessary queries. Can anyone help me out here? I want to be efficient, I tried just doing global.php but now there are so many queries being run my host is starting to complain lol. |
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
Looking at the output of a typical "explain", global.php seems to run six queries, at least half of which I would say are necessary to do what you want (one is for templates, you may not need them, two more are style info and calendar permissions - again, you may not want them). However, it would be very hard to pick out the bits of code you need (from config.php, functions.php, class_core.php, init.php etc etc) - not really worth the effort.
Also, global.php is called on every vb page, so adding it to an external page should not cause a dramatic rise in queries, unless most members are not actually in your forums, but in the external pages. Any host that moans about the number of queries here is being a bit petty - possibly you should be looking for a better host, not trying to re-invent the wheel. |
#4
|
||||
|
||||
Well right now I get about 15 queries a second, which is pretty high. Also 90% of my visitors are for the non-vb pages, my forum makes up about 10% of my hits.
I also have a lot of non-vb pages, upwards of 1000, so if you're browsing my site you're running a lot of queries. Ill try stopping those three queries and see if it makes a big difference, thank you. |
#5
|
|||
|
|||
Quote:
|
#6
|
||||
|
||||
its a PHP structure of my own creation. I use PHP, CSS, and HTML to make up the main site, the database only comes in for the user session and for downloading things (checks to see if they're logged in).
Also the news script, which is a blog script basically, uses the database as well. |
#7
|
|||
|
|||
You could read the cookie yourself and then run your own quries to fetch the user data you need....
|
#8
|
||||
|
||||
Alright then, I know nothing about cookies lol, so my request is for a script that reads the cookies vbulletin makes >.> hahaa.
And writing a query to get the usergroup isnt difficult, I can manage that on my own, the cookie part is the only real tricky part. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|