Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Forum warning/disclaimer/rules
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #1
Forum warning/disclaimer/rules
This is a simple modification which is useful for:
  • Forums in which you want to display a warning/disclaimer before people enter
  • Forums in which you want to force users to view some rules before doing anything in them

This makes use of the rarely used password feature of MyBB.



  1. Edit the forum you wish to force a message display; set a template prefix if there isn't one set (in this example, we'll use the prefix fwarn_)
  2. Set the forum password to agree
  3. Add a template named fwarn_forumdisplay_password (change if you're using a different prefix)

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$lang->password_required} </title>
    {$headerinclude}
    </head>
    <body>
    {$header}
    <form action="{$_SERVER['REQUEST_URI']}" method="post">
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" align="center"><strong>
    
    
    
    
    Warning
    
    
    
    
    
    </strong></td>
    </tr>
    <tr>
    <td class="trow2">
    
    
    
    
    You are entering a forum which may be too awesome for you. If you continue, you implicitly acknowledge that we are not responsible for any harm caused by excessive awesomeness.
    
    
    
    
    
    </td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="pwverify" value="agree" />
    <div align="center"><input type="submit" class="button" name="submit" value="Agree" /></div>
    </form>
    {$footer}
    </body>
    </html>

    Edit the above message to suit your needs.  I've spaced out the parts which you may be interested in editing (title and body).



Now when users try to enter this forum through any means, they'll be brought up with a simple message before they enter.  Once they've clicked the "Agree" button, they'll be able to view the forum.  Works for guests too.

My Blog
10-05-2010 04:12 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #2
RE: Forum warning/disclaimer/rules
Very neat - I just tested this. It does appear to be added to cookies though - like once I entered it in a session, then I could keep entering. However, once I logged out and logged back in again then I had to agree again. Also, as a guest (from same PC and IP address) the sessions work. This is good, because otherwise it COULD get very annoying.

Very coolSmile


[Image: leelink.gif]
MYBB1.6 & XThreads
10-05-2010 09:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #3
RE: Forum warning/disclaimer/rules
Hmm, I guess maybe a MyBB plugin which enters in the password once a user already has done so should be made...

My Blog
10-05-2010 10:33 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Forum warning/disclaimer/rules
(10-05-2010 04:12 PM)ZiNgA BuRgA Wrote:  This makes use of the rarely used password feature of MyBB.

It is very very rare (I think never) for me to use the feature Biggrin
But now, with this modification, I can use it in that way.
Thank you very much, Yumi Smile

10-07-2010 04:42 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #5
RE: Forum warning/disclaimer/rules
Tongue I amused at this;
Yumi Wrote:ou are entering a forum which may be too awesome for you. If you continue, you implicitly acknowledge that we are not responsible for any harm caused by excessive awesomeness.

Nice tip Yumi ! Smile

[Image: logo.png]

[Image: twitter.png]
10-07-2010 07:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Codyy Offline
Junior Member
**
Posts: 3
Joined: Aug 2011
Post: #6
RE: Forum warning/disclaimer/rules
Can someone help me out here? Every time I try and follow the instructions for this mod, when I go to the forum I set it up for, I just get a request to enter the password from MyBB - no warning. How come?

Thanks!
08-24-2011 05:04 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: Forum warning/disclaimer/rules
I presume you actually have XThreads installed?

My Blog
08-24-2011 09:18 PM
Find all posts by this user Quote this message in a reply
Codyy Offline
Junior Member
**
Posts: 3
Joined: Aug 2011
Post: #8
RE: Forum warning/disclaimer/rules
(08-24-2011 09:18 PM)ZiNgA BuRgA Wrote:  I presume you actually have XThreads installed?

Yes, MyBB says the plugin is correctly installed.
(08-24-2011 09:18 PM)ZiNgA BuRgA Wrote:  I presume you actually have XThreads installed?

Yes, MyBB says the plugin is correctly installed.

Let me just verify I am doing things right. I go to configuration->thread prefixes to add the prefix. Then in the templates area under default templates, add new template and copy/paste the code. Then set the forum password to "agree".
(This post was last modified: 08-25-2011 06:21 AM by Codyy.)
08-25-2011 06:20 AM
Find all posts by this user Quote this message in a reply
x-Treme Offline
Member
***
Posts: 68
Joined: May 2010
Post: #9
RE: Forum warning/disclaimer/rules
(08-25-2011 06:20 AM)Codyy Wrote:  Let me just verify I am doing things right. I go to configuration->thread prefixes to add the prefix. Then in the templates area under default templates, add new template and copy/paste the code. Then set the forum password to "agree".

You need to create the templates under Global Templates...not Default.

Forum Freebies
08-25-2011 06:58 AM
Find all posts by this user Quote this message in a reply
Codyy Offline
Junior Member
**
Posts: 3
Joined: Aug 2011
Post: #10
RE: Forum warning/disclaimer/rules
Got it!
Thanks guys!

Two things - turns out I was using the forum's built in thread prefix thing, not that of Xthread's. And I also needed to move the template to global.

I've been out of the web/forum game for a few years so I appreciate your patience and guidance. Thanks for the awesome plugin.
08-25-2011 07:04 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: