Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Jyaki (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-28-2001 Last Update: Never Installs: 0
 
No support by the author.

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")."\";");
}
I've inserted the above code in forumdisplay.php
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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-28-2001, 08:57 PM
Guest
 
Posts: n/a
Default

Where did you put the code at?
Reply With Quote
  #3  
Old 03-28-2001, 09:00 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #4  
Old 03-28-2001, 09:08 PM
Guest
 
Posts: n/a
Default

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
to
Code:
  $templatesused .= "crnamail"; // Add one more template to the cache
Otherwise you wiped out the pre-cached templates and increase the resources needed by your system.
Reply With Quote
  #5  
Old 03-28-2001, 09:40 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #6  
Old 03-30-2001, 01:34 AM
Guest
 
Posts: n/a
Default

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")."\";");
}
any PHP experts, please help!!
Thanks

-Hideki
Reply With Quote
  #7  
Old 03-30-2001, 02:05 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #8  
Old 03-30-2001, 12:50 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03940 seconds
  • Memory Usage 2,248KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete