Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=113)
-   -   [FTS 1.0] Enable disable Leftmenu for UserCP (http://www.bvlist.com/showthread.php?t=4180)

elvira 9th January 2010 00:07

[FTS 1.0] Enable disable Leftmenu for UserCP
 
What does this mod do?
With this mod user could set enable or disable leftmenu via User CP. (This mod only effect If lefmenu activated by administrator via settings panel).

SQL
Code:

ALTER TABLE `users` ADD `leftmenu` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'yes';
open include/functions.php
find
Code:

if ($leftmenu == "yes") {
replace with this
Code:

if ($leftmenu == "yes" AND $CURUSER["leftmenu"] == "yes") {
now for usercp.php:
find
Code:

tr("Torrents per page", " (0=use default setting)",1);
add below
Code:

tr("Show Left Menu", " Show left menu if enabled by administrator.",1);
find:
Code:

$emailnotif = $_POST["emailnotif"];
add below:
Code:

$leftmenu = ($_POST["leftmenu"] != "" ? "yes" : "no");
find:
Code:

$updateset[] = "notifs = " . sqlesc($notifs);
add below:
Code:

$updateset[] = "leftmenu = " . sqlesc($leftmenu);


All times are GMT +2. The time now is 00:48.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.