Is ok - I create.
// Step 1
In includes/page_header.php file,
find:
"url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
replace:
"url_lightbox" => (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) ? $site_sess->url(ROOT_PATH."lightbox.php") : "",
"use_lightbox" => (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) ? true : false,
Find:
"lang_lightbox" => $lang['lightbox'],
replace:
"lang_lightbox" => (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) ? $lang['lightbox'] : "",
Find:
//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
if ($user_info['user_level'] >= USER) {
$msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "removefromlightbox" && $id) {
if ($user_info['user_level'] >= USER) {
$msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "clearlightbox") {
if ($user_info['user_level'] >= USER) {
$msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
replace:
//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
if ($user_info['user_level'] >= USER && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
$msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
}
elseif (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 0) {
$msg = $lang['lightbox_not_allowed'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "removefromlightbox" && $id) {
if ($user_info['user_level'] >= USER && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
$msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
}
elseif (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 0) {
$msg = $lang['lightbox_not_allowed'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "clearlightbox") {
if ($user_info['user_level'] >= USER && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
$msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
}
elseif (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 0) {
$msg = $lang['lightbox_not_allowed'];
}
else {
$msg = $lang['lightbox_register'];
}
}
// Step 2
In includes/constants.php file,
add top of ?>:
define('USE_LIGHTBOX', 1); // 1 for active. 0 for no active.
// Step 3
In includes/functions.php file,
find:
$num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";
if ($user_info['user_level'] != GUEST) {
replace:
$num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";
if ($user_info['user_level'] != GUEST && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
Find:
"lightbox_button" => $lightbox_button,
replace:
"lightbox_button" => (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) ? $lightbox_button : "",
// Step 4
In lightbox.php file,
find:
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
show_error_page($lang['lightbox_register']);
}
add after:
if (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 0) {
show_error_page($lang['lightbox_not_allowed']);
}
// Step 5
In details.php file,
find:
if (!empty($user_info['lightbox_image_ids'])) {
replace:
if (!empty($user_info['lightbox_image_ids']) && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
find:
if ($mode == "lightbox" && $in_mode) {
replace:
if ($mode == "lightbox" && $in_mode && defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
// Step 6
In download.php file,
find:
if (!check_download_token($user_info['lightbox_image_ids'])) {
redirect("index.php");
}
add after:
if (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 0) {
redirect("index.php");
}
// Step 7
In lang/english/main.php file,
find:
$lang['delete_lightbox_confirm'] = "Do you really want to delete the lightbox?";
add after:
$lang['lightbox_not_allowed'] = "Sorry. Lightbox is no active right now. Please check back later.";
// Step 8
In templates/your_template/user_logininfo.html file,
find:
» <a href="{url_lightbox}">{lang_lightbox}</a><br />
replace:
{if use_lightbox}» <a href="{url_lightbox}">{lang_lightbox}</a><br />{endif use_lightbox}
// Step 9
In templates/your_template/thumbnail_bit.html file,
find:
{lightbox_button}
replace:
{if use_lightbox}{lightbox_button}{endif use_lightbox}
// Step 10
In includes/sessions.php file,
find:
if ($user_info) {
add after:
if (defined('USE_LIGHTBOX') && USE_LIGHTBOX == 1) {
find:
$user_info['lightbox_lastaction'] = $this->current_time;
add after:
}
This is safe for HTML designer now. You can use
{if use_lightbox} {endif use_lightbox} in template and edit includes/constants.php file for active or no active.