PDA

View Full Version : how do I edit the private forum message for a specific forum?


wolfyman
01-26-2010, 03:27 PM
I want all non-VIP members to see "This forum is for VIP members only, click HERE to get access"

Lynne
01-26-2010, 03:39 PM
Find the template and then you could put a condition around the phrase to change it based on the users usergroupid.

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

wolfyman
01-29-2010, 10:48 AM
hmmm..

It looks like the template is FORUMDISPLAY, which is used at more places than just this error message.

Can conditionals be used in phrases?

I want this result:

if not registered show: please register or login
if registered but not VIP show: please upgrade to VIP
if VIP show: content

Thank you Lynne, I've read many of your posts on here - I wish there was a "Thank you" button on vb.org just for you!

Lynne
01-29-2010, 01:42 PM
You can't actually put a condition into a phrase. You can make a phrase that has variables in it and then pass a different variable depending on a condition though. But, then you are right back to where you started.

Where is this message/phrase that you are talking about? I'm not familiar with where it shows up (I don't have any private forums like that on my site).

wolfyman
01-29-2010, 02:03 PM
The message shows up to a user who is not logged in or is not a member of the forum, the phrase is "no_posts_in_this_forum"

Default text is:

There are no posts in this forum.

I have:

This forum is private, you must register and login to see the contents. <br /><br /><a href="register.php">Click here to register</a>, or enter your login details in the username and password fields.

Lynne
01-29-2010, 02:21 PM
Ah, OK. Well, I think what you will want to do is just put a condition around that phrase in the FORUMDISPLAY template. Something like...

<vb:if condition="$show['guest']">
- if not registered show: please register or login
<vb:elseif condition="!is_member_of($bbuserinfo, x)">
- if registered but not VIP show: please upgrade to VIP
<vb:else />
- if VIP show: content
</vb:if>