PDA

View Full Version : How to add a message shows up in all threads to vistors and not to users?


thermax04
06-02-2011, 08:22 PM
Dear all,
I want to put a message in all threads and can be seen only for visitors and not the users?

Lynne
06-03-2011, 03:32 AM
Then just put a condition around it to only show to guests.

<vb:if condition="!$show['member']">message</vb:if>

thermax04
06-03-2011, 06:26 AM
Dear Lynne,
You did not say where to add this code

Lynne
06-03-2011, 05:49 PM
If you want it in the threads, then you should put it somewhere in the SHOWTHREAD template.

Boofo
06-04-2011, 01:50 AM
Why not use the Notices system?

thermax04
06-04-2011, 05:26 AM
If you want it in the threads, then you should put it somewhere in the SHOWTHREAD template.

Could not figure out where to put it, tried several places with no luck

--------------- Added 1307168864 at 1307168864 ---------------

Why not use the Notices system?

I want the message shows inside the thread, Can I do that by Notices system? and how?

Lynne
06-04-2011, 03:38 PM
Where exactly do you want it to show? We can make no recommendation on how to go about this without knowing *exactly* what you want. An image may help and a link to a thread on your site may also help.

thermax04
06-04-2011, 05:36 PM
Where exactly do you want it to show? We can make no recommendation on how to go about this without knowing *exactly* what you want. An image may help and a link to a thread on your site may also help.

Dear Lynne,
As I mentioned before I want the message shows inside the thread for instance at the end of the thread, the message for instance is to tell visitors that they must join the forum and put one reply to the thread to be allowed to download the attachments
So each visitor reading the thread will read the message as well, and this message shows only to visitors not members.
The message will be added automatically with each new thread since it will be inside the thread template with condition to shows only to visitors
I tried the code which you gave me in SHOWTHREAD and postbit_legacy , but no luck
my forum site is :
www.mobileguide-mea.com/vb

Lynne
06-05-2011, 04:00 AM
I put that exact code right under the poll and it worked just fine:

{vb:raw header}
{vb:raw navbar}
{vb:raw template_hook.showthread_above_posts}
{vb:raw poll}
<vb:if condition="!$show['member']">message</vb:if>

thermax04
06-05-2011, 03:52 PM
Dear Lynn

I did all what you said (look at the picture), but no message shows inside the thread !!

I Tried it for both member and guest

Iam using Vb 4.1.3

Lynne
06-05-2011, 04:39 PM
No, you didn't do what I said. You used !$show['guest'] and I said to use !$show['member'] !$show['guest'] means don't show to guests. !$show['member'] means don't show to members. If you want to use $show['guest'] then you need to not put the ! in front of it.

thermax04
06-05-2011, 05:07 PM
Dear Lynn
Thank you for your support
I also said that I tried the code for both guest and member
So, I used the code:
<vb:if condition="!$show['member']">message</vb:if>
and as you said : !$show['member'] means don't show to members
Here in the picture you will see that Iam not logged in (orange rectangle), and there is no message shows inside the thread, I want the message to be shows in any of the 2 red rectangles in the picture

Lynne
06-05-2011, 05:17 PM
I see it right above the Reply to Thread button.

thermax04
06-05-2011, 07:36 PM
I see it right above the Reply to Thread button.

I did not understand what you mean? what do you see? where?

Lynne
06-05-2011, 08:04 PM
I see the word "message" in the thread which shows that the condition works. Now go put it where you want it and use proper html to make it look how you want.

https://vborg.vbsupport.ru/attachment.php?attachmentid=129782&stc=1&d=1307307868

thermax04
06-05-2011, 08:21 PM
Oh My god, i need to change my glasses very soon :D:p
Thank You Lynn, I managed to make it center and changed the font color and size
now Is there any way to put it inside the thread as my picture in one of the 2 red rectangles?

nitra1000
06-05-2011, 11:53 PM
You might be better off searching for template modifications for Google absence after first post.... then instead of put Lynn if statement around it, and instead of the Google javascript your message.

thermax04
06-06-2011, 03:04 AM
You might be better off searching for template modifications for Google absence after first post.... then instead of put Lynn if statement around it, and instead of the Google javascript your message.

Thank You nitra1000,
will look for it