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

Reply
 
Thread Tools Display Modes
  #21  
Old 12-09-2008, 05:09 AM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working....

Style Manager
Default Style
Edit Templates
Show Thread Templates
SHOWTHREAD


Code:
$header
$navbar

<if condition="$thread[forumid]=='2'">
Testing 2
</if>
<if condition="$thread[forumid]=='7'">
Testing 3
</if>
<if condition="$thread[forumid]=='8'">
Testing 8
</if>


$poll

<if condition="$show['inlinemod']">
Reply With Quote
  #22  
Old 12-09-2008, 03:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could try $forum[forumid] instead of $thread[forumid]. I just looked at my SHOWTHREAD template and I use $forum[forumid] in a condition for a couple of my forums, so I know that works.
Reply With Quote
  #23  
Old 12-09-2008, 04:24 PM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working!!
Do I need to do anything elsewhere to make it work?
Is the location correct where I placed it, inserted it?
Can you please post your "condition" with the top and bottom line where it was inserted?

Thanks!!
Reply With Quote
  #24  
Old 12-09-2008, 04:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure you are changing the template for the correct style you are using? Put an X above it so you can see that it is there:

HTML Code:
$header
$navbar

<if condition="$forum[forumid]=='2'">
Testing 2
</if>
<if condition="$forum[forumid]=='7'">
Testing 3
</if>
<if condition="$forum[forumid]=='8'">
Testing 8
</if>


$poll
<if condition="$show['inlinemod']">
I just put that exact condition in the template on my website, only with forumid 12 instead of 2 (I don't have a forumid 2) and it worked just fine. It also worked fine with $thread[forumid] and with $forumid.

Attachment 90358
Reply With Quote
  #25  
Old 12-10-2008, 12:44 AM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My BAD...it is working but in the wrong area, that is why I could never see it.

It is showing up when you open a post, but I need it when you open a thread; back one page. Is it possible??

Followup:
Looks like it's not going to do what I need to do anyway. I have a table code that appears to only work in Posts, Announcement, and Sticky. BB Code [table] does not work with the above method.

https://vborg.vbsupport.ru/showthrea...57#post1467357
Reply With Quote
  #26  
Old 12-10-2008, 04:01 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think a problem we are having here is terminology. A thread is made up of lots of posts. A thread is like what we are in right now - it is on the page showthread.php. Perhaps you are talking about the forumdisplay page which is a page that lists the child forums and the thread titles of the threads in that forum - like this page https://vborg.vbsupport.ru/forumdisplay.php?f=111

You could do something like we were discussing here for on the top of the FORUMDISPLAY page if you wanted.
Reply With Quote
  #27  
Old 12-10-2008, 04:31 AM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne: Correct!! That is the location I want it to appear, the forumdisplay page!!!

Now I face a problem. Posts, Announcement, and Stickys appears to be the only means that BB Code [table] works in. If I wanted to use Notices or if statements, then BB Code [table] code would not work. Since I have it perfectly done in BB Code [table], and am not able to duplicate it using regular html table code.

Example of BB Code [table] code:
Code:
[table="width=100%"]SACRED TEXTS: Tripitaka: 'The Baskets' canon of Buddhist literature; discourses of the Buddha and/or his desciples.|GODHEAD: No omnipotent creator God. Many God-like beings subject to the law of rebirth (Dharma).|COSMOLOGY: Cyclical, endless becoming & dissolving. No point of creation.|ON TIME: Cyclical & not Important as cycle at rebirth continues forever.|ON THE NATURE OF THE SOUL: Life continues after death In another form. The cycle of birth / death can only be broken by achieving Enlightenment.[/table]
If you paste this code into a post, sticky or anouncement and you have BB Code [table] hack; it will look perfect, use it anywhere else, such as Notice or IF statement and it will not work.
Example of one of the tables coded in BB Code [table]:
Reply With Quote
  #28  
Old 12-10-2008, 02:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just copy the html from your page source.
Reply With Quote
  #29  
Old 12-10-2008, 03:55 PM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Just copy the html from your page source.

IT WORKED!!!!!!!!!!! FINALLY!!!
THANK YOU..THANK YOU.....THANK YOU Lynne!!!!!!!!

Three final questions:

1. How do I get it to show up on forumdisplay page now, one page up from here?
2. How do I put a quarter inch space between the bottom of the table and the "Closed" icon?
3. Can I reduce the space a bit at the top?

Reply With Quote
  #30  
Old 12-10-2008, 04:13 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I'd do.....

put in a template_hook in FORUMDISPLAY where you want this stuff to appear:
HTML Code:
$template_hook[forumdisplay_notice]
Then, create a plugin using the 'forumdisplay_start' hook location:
PHP Code:
if ($forumid == '2') {
eval(
'$template_hook[forumdisplay_notice] .= "<table><tr><td>Your HTML here - remember if you have link you need to escape it <a href=\"yourlink.php\">Your Link</a></td></tr></table>";');
}
if (
$forumid == '7') {
eval(
'$template_hook[forumdisplay_notice] .= "<table><tr><td>Your HTML here - remember if you have link you need to escape it <a href=\"yourlink.php\">Your Link</a></td></tr></table>";');
}
if (
$forumid == '8') {
eval(
'$template_hook[forumdisplay_notice] .= "<table><tr><td>Your HTML here - remember if you have link you need to escape it <a href=\"yourlink.php\">Your Link</a></td></tr></table>";');


You'll need to pretty that up, but that is how I'd go about it. Actually, if you wanted to do it prettier, your eval a template, but you can go look into that in the articles forum (read up on hooks).

I tested that exact code, only with forumids I use, and it works (but I'd change it to look nicer).
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 09:10 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.04835 seconds
  • Memory Usage 2,281KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_php
  • (1)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