Change phrase for accessing a link in a hidden forum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gomjaba
    Senior Member
    • Jan 2005
    • 970
    • 3.5.x

    Change phrase for accessing a link in a hidden forum

    We have some forums for which you need to be in a usergroup.

    Lets say someone is not part of the usergroup but accesses a link which is posted which refers to a thread within that (currenty hidden for him) forum, it gives an access denied message.

    Is there a way to change that message without changing the message globally but only for that error produced by that forum ?

    I hope you know what I mean
    I'm not under the alkafluence of inkahol like some thinkle peep I am!
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Admin CP -> Styles & Templates -> Style Manager -> « » -> STANDARD_ERROR

    Use this code:

    Code:
    <if condition="$GLOBALS[forumid] == [color=red]X[/color]">
    	[color=red]MESSAGE HERE[/color]
    </if>
    Where X is the forumid of the forum.

    Comment

    • Gomjaba
      Senior Member
      • Jan 2005
      • 970
      • 3.5.x

      #3
      thanks, it does kinda work,

      I am now able to insert custom text, however, below my custom text, it shows the regular text as well ...

      this is the part :

      Code:
      <!-- main error message -->
      			
      			<if condition="$GLOBALS[forumid] == 169">
      	TEST
      </if>
      
      			<blockquote><p>$errormessage</p></blockquote>
      			
      				
      			<!-- / main error message -->
      I'm not under the alkafluence of inkahol like some thinkle peep I am!

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        You can use this structure:

        Code:
        <if condition="$GLOBALS[forumid] == [color=red]X[/color]">
        	[color=red]MESSAGE HERE[/color]
        <else />
        	STUFF FOR ALL OTHER FORUMS
        </if>

        Comment

        • Gomjaba
          Senior Member
          • Jan 2005
          • 970
          • 3.5.x

          #5
          Thats weird, I thought I tried that already

          Thanks Jake, it is working perfectly
          I'm not under the alkafluence of inkahol like some thinkle peep I am!

          Comment

          • Gomjaba
            Senior Member
            • Jan 2005
            • 970
            • 3.5.x

            #6
            One more question, how can I add a 2nd forumid ?
            Code:
            			<!-- main error message -->
            					
            <if condition="$GLOBALS[forumid] == 169">
            	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
            
            Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
            
             <else />
            
            <blockquote><p>$errormessage</p></blockquote>				
            <!-- / main error message -->	
            </if></if>
            Can I use something like OR or something like this ? Basicially when forumd ID 169 OR 284 then do the stuff below or the usuall stuff

            Or can I seperate them by comma ?
            I'm not under the alkafluence of inkahol like some thinkle peep I am!

            Comment

            • Jake Bunce
              Senior Member
              • Dec 2000
              • 46598
              • 3.6.x

              #7
              Code:
              <if condition="$GLOBALS[forumid] == 169 OR $GLOBALS[forumid] == 284">
              ...or:

              Code:
              <if condition="in_array($GLOBALS[forumid], array(169,284))">

              Comment

              • Gomjaba
                Senior Member
                • Jan 2005
                • 970
                • 3.5.x

                #8
                For some reason it does not work for a subforum in a subforum,do I have to use something else but forumid ?
                I'm not under the alkafluence of inkahol like some thinkle peep I am!

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  It will work for any forumid. It checks the current forum. For example, this is forumid 101:

                  Comment

                  • Gomjaba
                    Senior Member
                    • Jan 2005
                    • 970
                    • 3.5.x

                    #10
                    Ok, when using the OR it works. I thought I can simply add another section below it to change the text

                    But this will do it also ..
                    I'm not under the alkafluence of inkahol like some thinkle peep I am!

                    Comment

                    • Gomjaba
                      Senior Member
                      • Jan 2005
                      • 970
                      • 3.5.x

                      #11
                      Oh, and sorry for the duplicate ..
                      I'm not under the alkafluence of inkahol like some thinkle peep I am!

                      Comment

                      • Zachery
                        Former vBulletin Support
                        • Jul 2002
                        • 59097

                        #12
                        Show us the code you are trying to use now/

                        Comment

                        • Gomjaba
                          Senior Member
                          • Jan 2005
                          • 970
                          • 3.5.x

                          #13
                          The version which did NOT work :

                          Code:
                          			<!-- main error message -->
                          					
                          <if condition="$GLOBALS[forumid] == 169">
                          	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
                          
                          Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
                          
                           <else />
                          
                          <if condition="$GLOBALS[forumid] == 284">
                          	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
                          
                          Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
                          
                           <else />
                          
                          <blockquote><p>$errormessage</p></blockquote>				
                          <!-- / main error message -->	
                          </if></if></if>
                          And the version which does work (have to use same message though):

                          Code:
                          <if condition="$GLOBALS[forumid] == 169 OR $GLOBALS[forumid] == 284">
                          	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
                          
                          Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
                          
                           <else />
                          
                          <blockquote><p>$errormessage</p></blockquote>				
                          <!-- / main error message -->	
                          </if></if>
                          I'm not under the alkafluence of inkahol like some thinkle peep I am!

                          Comment

                          • Jake Bunce
                            Senior Member
                            • Dec 2000
                            • 46598
                            • 3.6.x

                            #14
                            Originally posted by utw-mephisto
                            Ok, when using the OR it works. I thought I can simply add another section below it to change the text

                            But this will do it also ..
                            You had the second check within the "else" such that it is not checked unless the first "if" is false.

                            Comment

                            • Gomjaba
                              Senior Member
                              • Jan 2005
                              • 970
                              • 3.5.x

                              #15
                              So the correct syntax would be :
                              Code:
                              			<!-- main error message -->
                              					
                              <if condition="$GLOBALS[forumid] == 169">
                              	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
                              
                              Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
                              
                              <if condition="$GLOBALS[forumid] == 284">
                              	Good day to you, you seem to have disabled the spam forums in your profile, but followed a link to a thread in there.
                              
                              Click <A HREF="http://ut2007world.com/profile.php?do=editusergroups">HERE</A> to enable spam forum viewing, or click <A HREF="http://ut2007world.com/forum.php">HERE</A> to return to the forum index. 
                              
                               <else />
                              
                              <blockquote><p>$errormessage</p></blockquote>				
                              <!-- / main error message -->	
                              </if></if></if>
                              ??

                              I'll try that ..
                              I'm not under the alkafluence of inkahol like some thinkle peep I am!

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...