Read-only mode and cache rebuild

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Azzurra
    New Member
    • Sep 2004
    • 1
    • 3.0.3

    Read-only mode and cache rebuild

    Greetings,
    we are trying to keep a backup of our vbulletin web board, in "read-only mode".

    The backup forum, located on another server, gets in sync with the original once in a while. So if the original goes down, we change DNS and people gets redirected on the backup forum.

    However, we do not want people to be able to post on the backup forum (since we are not committing backup forum changes back to the original), so the best solution would be to keep the backup forum in read only mode (users would only be able to browse the forum without making modifications like making posts, editing profiles, and so on..)
    Sadly, it seems there's no read-only mode feature in vbulletin, right now.
    Am I correct?

    So we created the read-only feature by changing the permissions of "registered users" group with a SQL command, like this:
    UPDATE `usergroup` SET `pmpermissions` = '0', `forumpermissions` = '4103', `calendarpermissions` = '0', `genericpermissions` = '1', `genericoptions` = '8' WHERE `title` = 'Registered Users' LIMIT 1 ;

    This is automatically launched in a script, after the database sync, but there's a problem:
    the forum permission cache would need to be rebuilt in order to make these changes effective. But since this is intended as an automatical operation, we can't go in admincp and update the permission every time.
    If there's not a read-only mode available, is there some way to rebuild the cache using a shell script, without going in the admincp?

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

    #2
    Originally posted by Azzurra
    If there's not a read-only mode available, is there some way to rebuild the cache using a shell script, without going in the admincp?
    That is handled by the build_forum_permissions() function in the includes/adminfunctions.php file. You would need to run a PHP script that calls that function. For help with this I recommend you post on www.vbulletin.org, the official vB hacking site.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎