![]() |
Open Anouncement?
Is it possible to have the Announcement or Sticky fully open when someone visits a thread, so they do not have to open it?
TIA!! K58 vBulletin® Version 3.7.4 |
Use a notice
|
Do you mean have them open when someone visits the forumdisplay? I'm not sure how you can have a thread open when you visit another thread. But, anyway, it sounds like maybe you want to use Notices. Those may do what you want.
|
Quote:
I want to have a different Announcement or Sticky on each thread. So when someone opens a thread, they will see the Announcement or Sticky open at the top of the thread. --------------- Added [DATE]1228590163[/DATE] at [TIME]1228590163[/TIME] --------------- I want to have a different Announcement or Sticky on each thread "open". So when someone opens a thread, they will see the Announcement or Sticky open at the top of the thread. There has to be a way!! I tried the "Notices" option, but table code is not as flexible as BB Code [table]!! |
Create a new phrase..... I'll call it 'new_phrase', and put your message in there using valid html
At the top of the SHOWTHREAD template where you want the message to appear, put in: HTML Code:
<if condition="in_array($forum[forumid], array(x,y,z))"> |
I don't think this will work since I have 12 Threads and I want a different message on top of each Thread.
|
ok what page exactly are u talking about here, can u give us a link to what page u want to show this on?
You keep saying thread, but then that would be the first post in a thread. |
Quote:
Threads: http://www.warfaith.com/forumdisplay.php?f=1 Top Thread: http://www.warfaith.com/forumdisplay.php?f=2 What I want open on top of the Thread (Sticky): http://www.warfaith.com/showthread.php?t=2 or What I want open on top of the Thread (Announcement): http://www.warfaith.com/announcement.php?f=2 On each Thread I want a different message. If you look at each of the Threads, you will notice a Sticky and Announcement, each different; that's what I want to appear open on each Thread. Thanks. |
Be creative.
HTML Code:
<if condition="in_array($forum[forumid], array(x,y,z))"> |
Do I still create a new phrase...where does the "if" statement go?
Thanks. |
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.
|
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 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. |
Quote:
HTML Code:
<if condition="$threadid=='2'"> |
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))"> |
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'"> |
OK, below is what I placed below $poll in the Styles SHOWTHREAD:
Code:
<if condition="$threadid=='2'"> |
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]. |
Quote:
http://www.warfaith.com/forumdisplay.php?f=2 Code:
</head> |
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'"> |
Still not working....
Style Manager Default Style Edit Templates Show Thread Templates SHOWTHREAD Code:
$header |
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.
|
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!! |
1 Attachment(s)
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 Attachment 90358 |
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 |
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. |
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] Example of one of the tables coded in BB Code [table]: https://vborg.vbsupport.ru/external/2008/12/1.bmp |
Just copy the html from your page source.
|
Quote:
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? https://vborg.vbsupport.ru/external/2008/12/77.jpg |
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] PHP Code:
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). |
Ohh no buddy, just when I thought It was safe to go back into the water, now I see sharks all around me again.
I thought it was just a matter of changing a word or two in the "if" statement, and it would appear on forumdisplay page. I'll tackle your sugestion in a few hours. After I do as you recommended, do I still "copy the html from your page source" as before and place it between the "if" statements? Really Lynne, thanks so much for your help. This forum means the world to me, and I want it close to perfect when it goes live. |
You can do it with just the template. It's just cleaner the other way. If you want to do it with the template then do what I posted here - https://vborg.vbsupport.ru/showpost....8&postcount=24 only do it to the FORUMDISPLAY template. (Put it right after $navbar like on there if that's where you want it).
|
At this point I just want the simplest road as possible, later I can play around, learn and fine tune things.
I did as you suggested, simple route, copied the "if" statement from SHOWTHREAD (where it was working perfectly) and posted it in FORUMDISPLAY, below $navbar. Nothing shows up. Do i need to change anything here? <if condition="$thread[forumid]=='2'"> |
In the post above yours, I said to use the condition posted in post 24 or this thread where I use $forum[forumid], not $thread[forumid]. You are not *in* a thread, therefore you do not have the variable $thread available to use.
|
After I post last post I made that change:
Code:
<if condition="$forum[forumid]=='2'"> Code:
$navbar |
Did you try it as you originally had it with Testing 2 showing up? What was the result with that?
|
Quote:
Code:
$navbar |
Use $foruminfo[forumid] or $forumid instead of $forum[forumid]
|
BINGO....$foruminfo[forumid] DID IT...PERFECT...I learned so much from your patience in helping me.
Thanks so much Lynne for sticking with it till the end. Thank You!!! :):D:up: https://vborg.vbsupport.ru/external/2008/12/76.jpg RESOLVED!!:up: |
All right - Looks good!
|
All times are GMT. The time now is 08:06 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|