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

Reply
 
Thread Tools Display Modes
  #11  
Old 12-08-2008, 03:03 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just suggested a phrase cuz it's easy and looks cleaner to me in the template. You don't have to do it that way. There are a ton of different ways you could do it - you could even use templates. If I were to do it, I'd use a plugin. I'd have the condition, and based on which thread it is, I'd do a query and grab the first post in the Sticky thread that you want at the top of the thread and then spit it out. I don't know how comfortable you are coding, but that is a nice clean, simple way to do it. The easy way if you don't want to code is to do what I suggested and just write that condition at the top of the SHOWTHREAD template where you want the message/announcement to appear. You probably don't need the first condition regarding the forumid, you just need the condition regarding the thread id. So, you check to see if it's thread id xxxx, and if so, you spit out 'whatever'. If this were me putting the message at the top of the page, I'd put it either right above or right below the $poll.
Reply With Quote
  #12  
Old 12-08-2008, 03:54 AM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Getting this error when placing above $poll.
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ']' in /home/jlee1958/public_html/includes/adminfunctions_template.php(3772) : eval()'d code on line 26

2. Correct santax would be?
<if condition="$threadid]=='2'">

Thank you.
Reply With Quote
  #13  
Old 12-08-2008, 12:08 PM
cono1717 cono1717 is offline
 
Join Date: Sep 2008
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not too sure about this as I am not a expert with this but wouldn't it be.
<if condition="[$threadid]=='2'"> ? Again I am not too sure though.
Reply With Quote
  #14  
Old 12-08-2008, 02:41 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ghost Shadow View Post
1. Getting this error when placing above $poll.
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ']' in /home/jlee1958/public_html/includes/adminfunctions_template.php(3772) : eval()'d code on line 26

2. Correct santax would be?
<if condition="$threadid]=='2'">


Thank you.
I mistyped the second line. It should just be:

HTML Code:
<if condition="$threadid=='2'">
Reply With Quote
  #15  
Old 12-08-2008, 11:41 PM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put this bellow $poll to just test things and nothing happened when I went into the Thread.

Code:
<if condition="in_array($forum[forumid], array(x,y,z))">
<if condition="$threadid=='2'">
html message here or contents from post maybe - could require plugin
</if>
<if condition="$threadid=='yyyyyy'">
html message here
</if>
<if condition="$threadid=='zzzzzz'">
html message here
</if>
etc.

</if>
Thank you for helping and being patient with me.
Reply With Quote
  #16  
Old 12-09-2008, 12:05 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remove the part about the forumid (especially since you didn't replace x, y, z with any forumids). So:
HTML Code:
<if condition="$threadid=='2'">
html message here or contents from post maybe - could require plugin
</if>
<if condition="$threadid=='yyyyyy'">
html message here
</if>
<if condition="$threadid=='zzzzzz'">
html message here
</if>
etc.
Also, make sure you replace yyyyy and zzzzz with actual thread ids.
Reply With Quote
  #17  
Old 12-09-2008, 03:30 AM
Ghost Shadow's Avatar
Ghost Shadow Ghost Shadow is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, below is what I placed below $poll in the Styles SHOWTHREAD:


Code:
<if condition="$threadid=='2'">
Testing 2
</if>
<if condition="$threadid=='7'">
Testing 3
</if>
<if condition="$threadid=='8'">
Testing 8
</if>
Still nothing shows in the 2, 7 and 8t Thread.
Reply With Quote
  #18  
Old 12-09-2008, 03:34 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have threads numbered 2, 7, and 8? Perhaps a link to one of these threads would help.

You could try replacing $threadid with $thread['threadid'] and see if that works. And you didn't place this inside the condition that is right below the poll, right? If what you really mean is forum 2 and forum 7, then you need to replace $threadid with $thread[forumid].
Reply With Quote
  #19  
Old 12-09-2008, 03:52 AM
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
You have threads numbered 2, 7, and 8? Perhaps a link to one of these threads would help.

You could try replacing $threadid with $thread['threadid'] and see if that works. And you didn't place this inside the condition that is right below the poll, right? If what you really mean is forum 2 and forum 7, then you need to replace $threadid with $thread[forumid].
Did not work.

http://www.warfaith.com/forumdisplay.php?f=2

Code:
</head>
<body onload="$onload">
$header
$navbar


$poll

<if condition="$threadid=='2'">
Testing 2
</if>
<if condition="$threadid=='7'">
Testing 3
</if>
<if condition="$threadid=='8'">
Testing 8
</if>


<if condition="$show['inlinemod']">
$spacer_close
<form action="inlinemod.php?threadid=$threadinfo[threadid]&amp;p=$postid" method="post" id="inlinemodform">
$spacer_open
</if>

<a name="poststop" id="poststop"></a>
Reply With Quote
  #20  
Old 12-09-2008, 03:54 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is forumid 2, not threadid 2. As I said, if you are using forumids, then you need to use $thread[forumid] instead of $threadid.

HTML Code:
<if condition="$thread[forumid]=='2'">
Testing 2
</if>
<if condition="$thread[forumid]=='7'">
Testing 3
</if>
<if condition="$thread[forumid]=='8'">
Testing 8
</if>
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:11 AM.


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.04219 seconds
  • Memory Usage 2,285KB
  • Queries Executed 14 (?)
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
  • (3)bbcode_code
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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