The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to have 'number of new PM's' using a style edit, *not* a template?
Ok, here's something I've been trying to achieve. I have a userbox (that's done through editing the style Header/Footer) that stays at the top of the browser (even when you scroll), and in the userbox I have the following data for the user:
User: username (which is done by using '$bbuserinfo[username]') Posts: post count (done through '$bbuserinfo[posts]') Those two both work fine, and display the correct values/info. However, there's also underneath those two: Local Time: users local time and You have number of new PM's new PM's. But these two don't seem to want to work. Either I have the wrong variables (so if that's my only problem, please let me know what the variables are !), or there's some other method of displaying such info when editing styles and not templates? Any help on the issue would be greatly appreciated, those two sets of info are driving me mad! |
#2
|
||||
|
||||
to display user's local time use this:
PHP Code:
PHP Code:
PHP Code:
|
#3
|
||||
|
||||
So how exactly would I go about showing the Local Time and the number of new PM's in the style?
I tried just copy/pasting those above snippets into the style footer where I want them, and the time ones both didn't show anything at all - but the PM chunk (I pasted that whole box of code) spat out all sorts of errors. I'm most likely missing something really simple, I'm no vB expert |
#4
|
||||
|
||||
These are PHP codes, you can not put them directly inside templates unless you dont want them to be displayed as a code. To parse them you have to put them in .php files. Since you are trying to use them inside header/footer, you may try to put them in global.php for instance. Assign their values in the file, then use the variable in your template.
eg. in global.php use: $users_date=vbdate("h:i",time()); Then in footer use $users_date You can also put them into phpinclude template, it's a template which is parsed.. |
#5
|
||||
|
||||
Quote:
Are you able to give me more info on how to go about creating one of these phpinclude templates? All I really need is for the user's local time and their number of new PM's to be displayed in an HTML box which is created in the Footer region of the style. Would that mean I'd have to make a template with a phpinclude, say a template named 'localtimeandpm', then do '$localtimeandpm' in the footer to make that template show? Or is it something totally different (I apologise for my knowledge, or lack thereof )? |
#6
|
||||
|
||||
phpinclude template is already exist (check the template list). Just put line
PHP Code:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|