The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
I am trying to have certain template display only in forumid=5.
I don't know any php, but from the little experience that I do have from working with vB, I've created this: Code:
if ($forumid=='5') {
$templatesused = "crnamail"; // Only one template used so load it when called
eval("\$crnamail .=\"".gettemplate("crnamail")."\";");
}
Now, the code actually did work, Woohoo! But the template does not show up when you start viewing individual threads that are under froumid 5. What do I need to add so my $crnamail template will also show up in the threads of forumid 5? Thanks guys! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Where did you put the code at?
|
|
#3
|
|||
|
|||
|
I inserted it toward the bottom of forumdisplay.php
Does this answer your question? This is the forum The $crnamail template is the box in the upperleft that is asking for the email login |
|
#4
|
|||
|
|||
|
yep...
You need to place it in showthread as well. Also change the line: Code:
$templatesused = "crnamail"; // Only one template used so load it when called Code:
$templatesused .= "crnamail"; // Add one more template to the cache |
|
#5
|
|||
|
|||
|
OK, I changed the code like you said, and added it in showthread.php as well. I also added $crnamail in the showthread template.
It displays in forumid 5, but still doesn't show up in the threads under it. What am I doing wrong? thanks -Hideki |
|
#6
|
|||
|
|||
|
Is this legitimate PHP?
Code:
if ($thread[forumid]==5) {
$templatesused .= "crnamail"; // Add one more template to the cache
eval("\$crnamail .=\"".gettemplate("crnamail")."\";");
} else {
eval("\$forumrules .=\"".gettemplate("forumrules")."\";");
}
Thanks ![]() -Hideki |
|
#7
|
|||
|
|||
|
Yes that's "legitimate"
PHP. I'm not sure why it wouldn't display, though, if you've put it in both the template and the PHP file.
|
|
#8
|
|||
|
|||
|
Hey tubedogg, it worked!
![]() I added that last code into forumdisplay.php and it worked perfectly. I wanted to make sure that it was legitimate PHP before attempting to use it. I basically looked around other PHP files, saw some similar code, changed it a bit and came up with it. It sounded like it would work, but since I just pulled it out of my a$$, I wasnt' sure. Thanks for your help though! -Hideki |
![]() |
|
|