vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   how do I edit the private forum message for a specific forum? (https://vborg.vbsupport.ru/showthread.php?t=234212)

wolfyman 01-26-2010 03:27 PM

how do I edit the private forum message for a specific forum?
 
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:

Quote:

There are no posts in this forum.
I have:

Quote:

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...

HTML Code:

<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>



All times are GMT. The time now is 03:50 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.01004 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete