The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Can anyone please tell me how to add an eval statement to this so I can put the information into a template? I know it's simple, I just can't see it.
![]() Code:
if (($bday[2]>=21 and $bday[1]==3) or ($bday[2]<=19 and $bday[1]==4)) { $zodiacsign="Aries"; } else if (($bday[2]>=20 and $bday[1]==4) or ($bday[2]<=20 and $bday[1]==5)) { $zodiacsign="Taurus"; } else if (($bday[2]>=21 and $bday[1]==5) or ($bday[2]<=20 and $bday[1]==6)) { $zodiacsign="Gemini"; } else if (($bday[2]>=21 and $bday[1]==6) or ($bday[2]<=22 and $bday[1]==7)) { $zodiacsign="Cancer"; } else if (($bday[2]>=23 and $bday[1]==7) or ($bday[2]<=22 and $bday[1]==8)) { $zodiacsign="Leo"; } else if (($bday[2]>=23 and $bday[1]==8) or ($bday[2]<=22 and $bday[1]==9)) { $zodiacsign="Virgo"; } else if (($bday[2]>=23 and $bday[1]==9) or ($bday[2]<=22 and $bday[1]==10)) { $zodiacsign="Libra"; } else if (($bday[2]>=23 and $bday[1]==10) or ($bday[2]<=21 and $bday[1]==11)) { $zodiacsign="Scorpio"; } else if (($bday[2]>=22 and $bday[1]==11) or ($bday[2]<=21 and $bday[1]==12)) { $zodiacsign="Sagittarius"; } else if (($bday[2]>=22 and $bday[1]==12) or ($bday[2]<=19 and $bday[1]==1)) { $zodiacsign="Capricorn"; } else if (($bday[2]>=20 and $bday[1]==1) or ($bday[2]<=18 and $bday[1]==2)) { $zodiacsign="Aquarius"; } else if (($bday[2]>=19 and $bday[1]==2) or ($bday[2]<=20 and $bday[1]==3)) { $zodiacsign="Pisces"; } else { $zodiacsign="Can not define without a birth month and day."; } if($zodiacsign=="Can not define without a birth month and day.") { $zodiacimage="NA.gif"; } else { $zodiacimage=$zodiacsign.".gif"; } Code:
<tr><td valign="top"><smallfont><B>Zodiac Sign: </B></smallfont></td><td valign="top"><smallfont>$zodiacsign </smallfont></td></tr> |
#2
|
|||
|
|||
![]()
Boofo is this what you're looking for?
PHP Code:
g-force2k2 |
#3
|
||||
|
||||
![]()
I had:
Quote:
![]() Quote:
|
#4
|
|||
|
|||
![]()
Boofo so the second code is the template (getinfo_zodiac) that you're trying to integrate into the getinfo templates? regards...
g-force2k2 |
#5
|
||||
|
||||
![]()
Yes. I want it to pull up the template if there is a zodiac sign and not do anything if there isn't. Here is the revised code that I need to have the template for.
PHP Code:
|
#6
|
|||
|
|||
![]()
okay Boofo try this code then ::
PHP Code:
|
#7
|
||||
|
||||
![]()
Nope, that didn't do it. Any other ideas? I know it is just a syntax problem I am missing here. I need to eval the template at the end of the code.
|
#8
|
|||
|
|||
![]()
umm... just a question Boofo when you tested my code did you replace my variables with yours?
g-force2k2 |
#9
|
||||
|
||||
![]()
I tried your code first and then my variables and neither one worked. here is what I had before with it all together:
PHP Code:
![]() Quote:
|
#10
|
|||
|
|||
![]()
well from that code you're showing me you can't use $zodiacsign in the eval because then you changed its original value of what it was to now define the template... maybe that maeks sense? regards
change this: PHP Code:
PHP Code:
![]() hopefully that helps somewhat? g-force2k2 |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|