Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
831 florian 1
<?php
2
    // this Settings file was hacked together from the example module
3
    // kindly created by Chris Eaton (tridus@hiredgoons.ca)
4
    // Update history:
5
    // Checkboxes added for "links in window" and "anti-spam tags" by Adam Sheik (www.cantonese.sheik.co.uk)
6
 
7
    if(!defined("PHORUM_ADMIN")) return;
8
 
9
    // save settings
10
    if(count($_POST)){
11
        $PHORUM["mod_bb_code"]["links_in_new_window"]=$_POST["links_in_new_window"] ? 1 : 0;
12
        $PHORUM["mod_bb_code"]["rel_no_follow"]=$_POST["rel_no_follow"] ? 1 : 0;
13
        $PHORUM["mod_bb_code"]["quote_hook"]=$_POST["quote_hook"] ? 1 : 0;
14
 
15
        if(!phorum_db_update_settings(array("mod_bb_code"=>$PHORUM["mod_bb_code"]))){
16
            $error="Database error while updating settings.";
17
        }
18
        else {
19
            echo "Settings Updated<br />";
20
        }
21
    }
22
 
23
    include_once "./include/admin/PhorumInputForm.php";
24
    $frm =& new PhorumInputForm ("", "post", "Save");
25
    $frm->hidden("module", "modsettings");
26
    $frm->hidden("mod", "bbcode"); // this is the directory name that the Settings file lives in
27
 
28
    if (!empty($error)){
29
        echo "$error<br />";
30
    }
31
    $frm->addbreak("Edit settings for the BBCode module");
32
    $frm->addmessage("When users post links on your forum, you can choose whether they open in a new window.");
33
    $frm->addrow("Open links in new window: ", $frm->checkbox("links_in_new_window", "1", "", $PHORUM["mod_bb_code"]["links_in_new_window"]));
34
    $frm->addmessage("Enable <a href=\"http://en.wikipedia.org/wiki/Blog_spam\" target=\"_blank\">
35
        Google's new anti-spam protocol</a> for links posted on your forums.
36
        <br/>
37
        Note, this doesn't stop spam links being posted, but it does mean that
38
        spammers don't get credit from Google from that link.");
39
    $frm->addrow("Use 'rel=nofollow' anti-spam tag: ", $frm->checkbox("rel_no_follow", "1", "", $PHORUM["mod_bb_code"]["rel_no_follow"]));
40
    $frm->addmessage("As of Phorum 5.1, there is the option to have quoted text altered by modules.  Since it only makes sense to have one module modifying the quoted text, you can disable this one part of this module.");
41
 
42
    $frm->addrow("Enable quote hook", $frm->checkbox("quote_hook", "1", "", $PHORUM["mod_bb_code"]["quote_hook"]));
43
    $frm->show();
44
?>