The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can someone teach me how to do this?
In showthread, there's the alternating colours...firstaltcolor secondaltcolor and they alternate on each post, now what I want to do is create a second variable...I have userinfo boxes, ie. boxes around Location, Posts, etc. and I want the bgcolor of the boxes to be the opposite of the backcolour of the post the boxes are in.
Example: First post, the background colour of the post is firstaltcolor. The boxes in the post, these should be secondaltcolor And vice versa for a post with secondaltcolor as the background colour of the post... In fact, maybe if someone has that much time on their hands, could teach me how to integrate this into the style setting page? Ie. add two extra options, asking for firstboxcolor and secondboxcolor? Anyway, what should happen is, say I set something for firstboxcolor, in a post which has firstaltcolor, the box colour should be secondboxcolor and vice versa... Hope that made sense and it would be really interesting and helpful if someone posted up some tips as to how I can create this..I have an ok-ish idea of how to add it into the style settings, as I know how to enter fields into a query, so it will update the settings, but things i'm unsure about are the fields to be created in the DB, etc. and how to do this alternating code...maybe I could look at the postbackcolor code and change it |
#2
|
||||
|
||||
in admin/functions.php
you find this part in the getpostbitsection: PHP Code:
|
#3
|
|||
|
|||
looks easy , thanks for the code, I'll look into it later when I have time...I might release it as a hack too...I could make it dynamic and people would be able to use it for anything they want...
A question: if some code is included in global.php, would it mean the variable would work in any template? |
#4
|
||||
|
||||
not in every template.
it depends on where the template is called. if you call it from within a function you have to globalize the variables before |
#5
|
||||
|
||||
Header & Footer templates : Yes
Other templates : No idea Satan |
#6
|
|||
|
|||
Oh ok..thanks for the help
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|