Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 11-30-2009, 05:53 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I think you have not understood what I meant. I want contecnt above sections (that contain forums and don't act as forums themselves)

So I probably should be editing the forumdisplay template right?

Is there a different variation for the code?

I finally saw some content on showthread.php?2-null-thread when I added you last given code. But now I need to get it on top of a forumdisplay.php.
Reply With Quote
  #22  
Old 11-30-2009, 06:41 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make a new plugin and add something like this. The hook location for the plugin should be forumdisplay_start.
Code:
if (THIS_SCRIPT == forumdisplay) {
    $templater = vB_Template::create('your_template');
    $template_hook['navbar_end'] .= $templater->render();
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.
Reply With Quote
  #23  
Old 11-30-2009, 07:05 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BBR-APBT View Post
Make a new plugin and add something like this. The hook location for the plugin should be forumdisplay_start.
Code:
if (THIS_SCRIPT == forumdisplay) {
    $templater = vB_Template::create('your_template');
    $template_hook['navbar_end'] .= $templater->render();
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.
But how do I have it appear above a specific list of sub-forums? Not above all.
Reply With Quote
  #24  
Old 11-30-2009, 07:28 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pokash View Post
But how do I have it appear above a specific list of sub-forums? Not above all.
Go to your navbar template and add the following at the very end or where ever you want it to show.
Code:
{vb:raw template_hook.below_navbar}

Plugin Code
Code:
if (THIS_SCRIPT == forumdisplay) {
$BBRForumIDs = array(5,7,13); 

if(in_array($vbulletin->GPC['forumid'], $BBRForumIDs))
{
    $templater = vB_Template::create('your_template');
    $template_hook['below_navbar'] .= $templater->render();
}
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.


Don't forget to edit your forum id's you want it to show in.


Let me know how it works.
Reply With Quote
  #25  
Old 11-30-2009, 09:32 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it working!
Reply With Quote
  #26  
Old 11-30-2009, 09:40 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are missing an apostrophe in this line. It should be:

HTML Code:
$templater = vB_Template::create('contest');
Reply With Quote
  #27  
Old 11-30-2009, 09:47 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it working now. Thank you guys!

We're getting there:

How do I point the index page to a certain part of the forum? Or else I need to put specific content on the index.php page.

Can I remove the text:'forum:' under the 'post new thread' button?

Can I change the title: sub-forums?
Reply With Quote
  #28  
Old 12-06-2009, 11:35 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne and BBR,

I posted a few more questions in my last post which I haven't been able resolve yet. Could you please have a look?

Right now I have the homepage showing one part of the forum, and have got two tabs linking to the other parts of the forum. But the tabs don't highlight, is there an easy way to have them highlight?
Reply With Quote
  #29  
Old 12-07-2009, 03:11 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean point the index page to a certain part of the forum? You don't want your regular index page with the list of all the forums?

For the text "forum:" Look in the FORUMDISPLAY template for this line and modify how you want:
HTML Code:
    <h1>{vb:rawphrase forum}: <span class="forumtitle">{vb:raw foruminfo.title}</span></h1>
And sub-forums is probably just a phrase also, so do a Search in Phrases for it.

As for your tabs not highlighting, you probably need to put a condition around them to define when they should be highlighted otherwise how are they supposed to know they are supposed to be highlighted?
Reply With Quote
  #30  
Old 12-07-2009, 05:51 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well right now I only have 1 categorie of the forums showing on the home page, but I can't (or don't know how) assign a forum id in the code that BBR gave me so that specific content shows up on the home above this categorie of the forums, on the home page.

I'm using the mod from elmer to create these tabs and I don't think it's easy for me to give the tabs this condition, so I'll wait for this feature to be added to this mod.

Thanks
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 02:56 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.05370 seconds
  • Memory Usage 2,274KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete