Mit dieser Modifikation ist es möglich, Einstellungen vorzunehmen die im Grunde unsichtbar sind bzw. in den Dateien direkt editiert werden müssen.
Diese Modifikation erspart diesen Eingriff und kann demnach einfach über das Admin Control Panel abgewickelt werden.Features:- Volle Captcha- Konfiguration
- Volle Cache- Konfiguration
- Volle CSRF- Konfiguration
- Spezielle Einstellungen
- Registration sperren/entsperren
- Wartungsmodus + Informationstexteingabe
- Header und Footer Script für das einfügen von weiteren Codes wie z.B Layer
- Mehr Bilder auf der Startseite anzeigen. Einstellbar im Admin Control Panel
- Weitere Links in die user_loginform.html und user_logininfo.html anlegen
- User Begrüßung einschalten/ausschalten (http://www.4homepages.de/forum/index.php?topic=26932.msg145954#msg145954)
- Neuesten Kategorien auf der Startseite ein/aus + Optionen (http://www.4homepages.de/forum/index.php?topic=27253.msg148352#msg148352)
- Überschrift bei Kommentaren einschalten/ausschalten
- Anzahl der Punkte für die Bewertung erhöhen
- Bilderbeschreibung und Schlüsselwörter wahlweise als Pflichtfeld
[Google-Translate]
With this modification it is possible to make adjustments that are basically invisible and must be edited directly in the files.
This modification eliminates this interference, and thus can easily be handled via the Admin Control Panel.
Features:Step #1Öffne/Open:
global.phpSuche / Search:
// Initialize CAPTCHA configuration
$captcha_enable = 1;
$captcha_enable_comments = 1;
$captcha_enable_upload = 1;
$captcha_enable_registration = 1;
$captcha_enable_postcards = 1;
$captcha_ttf = 1;
$captcha_path = ROOT_PATH.'captcha';
$captcha_chars = "abcdefghijklmnopqrstuvwxyz123456789";
$captcha_length = 6;
$captcha_wordfile = 0;
$captcha_width = 200;
$captcha_height = 70;
$captcha_text_color = '#000000';
$captcha_text_size = 20;
$captcha_text_transparency = 50;
$captcha_filter_text = 1;
$captcha_filter_bg = 1;Ersetze mit / Replace with:
/*/ Initialize CAPTCHA configuration
$captcha_enable = 1;
$captcha_enable_comments = 1;
$captcha_enable_upload = 1;
$captcha_enable_registration = 1;
$captcha_enable_postcards = 1;
$captcha_ttf = 1;
$captcha_path = ROOT_PATH.'captcha';
$captcha_chars = "abcdefghijklmnopqrstuvwxyz123456789";
$captcha_length = 6;
$captcha_wordfile = 0;
$captcha_width = 200;
$captcha_height = 70;
$captcha_text_color = '#000000';
$captcha_text_size = 20;
$captcha_text_transparency = 50;
$captcha_filter_text = 1;
$captcha_filter_bg = 1; */Suche / Search:
// Initialize CSRF protection configuration
$csrf_protection_enable = 1;
$csrf_protection_frontend = 1;
$csrf_protection_backend = 1;
$csrf_protection_expires = 7200;
$csrf_protection_name = '__csrf';
$csrf_protection_xhtml = 1;Ersetze mit / Replace with:
/*/ Initialize CSRF protection configuration
$csrf_protection_enable = 1;
$csrf_protection_frontend = 1;
$csrf_protection_backend = 1;
$csrf_protection_expires = 7200;
$csrf_protection_name = '__csrf';
$csrf_protection_xhtml = 1; */Suche / Search:
// Initialize cache configuration
$cache_enable = 0;
$cache_lifetime = 3600; // 1 hour
$cache_path = ROOT_PATH.'cache';
$cache_page_index = 1;
$cache_page_categories = 1;
$cache_page_top = 1;
$cache_page_rss = 1;Ersetze mit / Replace with:
/*/ Initialize cache configuration
$cache_enable = 0;
$cache_lifetime = 3600; // 1 hour
$cache_path = ROOT_PATH.'cache';
$cache_page_index = 1;
$cache_page_categories = 1;
$cache_page_top = 1;
$cache_page_rss = 1; */Suche / Search:
//-----------------------------------------------------
//--- Generate Setting --------------------------------
//-----------------------------------------------------
$sql = "SELECT setting_name, setting_value
FROM ".SETTINGS_TABLE;
$result = $site_db->query($sql);
if (!$result) {
echo $lang['no_settings'];
exit;
}
while ($row = $site_db->fetch_array($result)) {
$config[$row['setting_name']] = $row['setting_value'];
}
$site_db->free_result();Füge danach ein / Add after:
$captcha_enable = $config['captcha_enable'];
$captcha_enable_comments = $config['captcha_enable_comments'];
$captcha_enable_upload = $config['captcha_enable_upload'];
$captcha_enable_registration = $config['captcha_enable_registration'];
$captcha_enable_postcards = $config['captcha_enable_postcards'];
$captcha_ttf = 1;
$captcha_path = ROOT_PATH.''.$config['captcha_path'].'';
$captcha_chars = "".$config['captcha_chars']."";
$captcha_length = $config['captcha_length'];
$captcha_wordfile = $config['captcha_wordfile'];
$captcha_width = $config['captcha_width'];
$captcha_height = $config['captcha_height'];
$captcha_text_color = ''.$config['captcha_text_color'].'';
$captcha_text_size = $config['captcha_text_size'];
$captcha_text_transparency = $config['captcha_text_transparency'];
$captcha_filter_text = $config['captcha_filter_text'];
$captcha_filter_bg = $config['captcha_filter_bg'];
$csrf_protection_enable = $config['csrf_protection_enable'];
$csrf_protection_frontend = $config['csrf_protection_frontend'];
$csrf_protection_backend = $config['csrf_protection_backend '];
$csrf_protection_expires = $config['csrf_protection_expires'];
$csrf_protection_name = ''.$config['csrf_protection_name'].'';
$csrf_protection_xhtml = $config['csrf_protection_xhtml'];
$cache_enable = $config['cache_enable'];
$cache_lifetime = $config['cache_lifetime'];
$cache_path = ROOT_PATH.''.$config['cache_path'].'';
$cache_page_index = $config['cache_page_index'];
$cache_page_categories = $config['cache_page_categories'];
$cache_page_top = $config['cache_page_top'];
$cache_page_rss = $config['cache_page_rss'];Step #2Öffne / Open:
member.phpSuche / Search:
if (!compare_passwords($current_user_password, $user_info['user_password'])) {
$msg .= (($msg != "") ? "<br />" : "").$lang['update_password_error'];
$error = 1;
}Füge danach ein / Add after:
if($config['password_minimum_onoff'] == 1) {
if (strlen($HTTP_POST_VARS['user_password']) < 8 || !preg_match("#[0-9]#", $HTTP_POST_VARS['user_password']))
{
$msg .= (($msg != "") ? "<br />" : "").$lang['update_password_minimum_error'];
$error = 1;
}
}Suche / Search:
if ($cat_id == 0) {Davor einfügen / Add before:
if($config['image_description_required'] == 1) {
if ($image_description == "") {
$error = 1;
$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_description_required']), $lang['field_required']);
$msg .= (($msg != "") ? "<br />" : "").$field_error;
}
}
if($config['image_keywords_required'] == 1) {
if ($image_keywords == "") {
$error = 1;
$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_keywords_required']), $lang['field_required']);
$msg .= (($msg != "") ? "<br />" : "").$field_error;
}
}Step 3Öffne / Open:
register.phpSuche / Search:
if ($user_password == "") {
$msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['password']), $lang['field_required']);
$error = 1;
}Füge danach ein / Add after:
if($config['password_minimum_onoff'] == 1) {
if (strlen($user_password) < $config['password_minimum'] || !preg_match("#[0-9]#", $user_password)) {
$msg .= (($msg != "") ? "<br />" : "").$lang['update_password_minimum_error'];
$error = 1;
}
}Step #4Öffne / Open:
lang/your-lang/main.php und/and
lang/your-lang/admin.phpSuche / Search:
?>Füge davor ein / Add above:
admin.phpinclude(ROOT_PATH.'mods/invisible_settings/lang_de.php');main.phpinclude(ROOT_PATH.'mods/invisible_settings/lang_de_main.php');Step #5Öffne / Open:
config.phpSuche / Search:
$table_prefix = '4images_';Füge danach ein / Add after:
$cache_enable = $config['cache_enable'];
$cache_lifetime = $config['cache_lifetime'];
$cache_path = ROOT_PATH.''.$config['cache_path'].'';
$cache_page_index = $config['cache_page_index'];
$cache_page_categories = $config['cache_page_categories'];
$cache_page_top = $config['cache_page_top'];
$cache_page_rss = $config['cache_page_rss'];Step #6Öffne / Open: admin/settings.php
Suche / Search:
show_form_footer($lang['save_changes'], "", 2);Füge davor ein / Add above:
include(ROOT_PATH.'mods/invisible_settings/settings.php');Step #7Öffne / Open:
includes/page_header.phpSuche / Search:
//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------
Füge davor ein / Add before:
include(ROOT_PATH.'mods/invisible_settings/page_header.php');
Suche / Search:
$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
Ersetze mit / Replace with:
if($config['user_gruss_onoff'] == 1) {
$site_template->register_vars( "lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", format_text($user_info['user_name'], 2), "<center>".$welcome."<br /><strong>". format_text($user_info['user_name'])."</strong></center>"));
}else{
$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
}
Suche / Search:
$user_box = $site_template->parse_template("user_loginform");Füge darüber ein / Add before:
$site_template->register_vars( "lang_loggedin_msg", "<center>".$welcome."<br><br><b>". $lang['userlevel_guest']."</b></center>");
Suche / Search:
if ($action == "rateimage" && $id) {
$rating = intval($HTTP_POST_VARS['rating']);Füge davor ein / Add before:
if($config['rating_button_disabled_after_vote_suffix'] == 1) {
$rate_suffix = "_".$user_info['user_id'];
} else {
$rate_suffix = "";
}Suche / Search:
if ($rating && $rating <= MAX_RATING && $id) {Ersetze mit / Replace with:
if ($rating && $rating <= $config['max_rating_number'] && $id) {Step #8Öffne / Open:
templates/**TEMPLATE**/user_loginform.htmlSuche / Search:
» <a href="{url_register}">{lang_register}</a><br> </td>
Ersetze mit / Replace with:
{is_url_register}</td>
Suche / Search:
<form action="{url_login}" method="post">
Davor einfügen / Add before:
{lang_loggedin_msg}
Step #9Öffne / Open:
register.phpSuche / Search:
//-----------------------------------------------------
//--- Signup ------------------------------------------
//-----------------------------------------------------
if ($action == "signup") {
$site_template->register_vars(array(
"lang_agreement" => $lang['agreement'],
"lang_agreement_terms" => $lang['agreement_terms'],
"lang_agree" => $lang['agree'],
"lang_agree_not" => $lang['agree_not']
));
$content = $site_template->parse_template("register_signup");
}
Ersetze mit / Replace with:
//-----------------------------------------------------
//--- Signup ------------------------------------------
//-----------------------------------------------------
if ($config['register_onoff'] == 0 && $action == "signup") {
$site_template->register_vars(array(
"lang_agreement" => $lang['agreement'],
"lang_agreement_terms" => $lang['agreement_terms'],
"lang_agree" => $lang['agree'],
"lang_agree_not" => $lang['agree_not']
));
$content = $site_template->parse_template("register_signup");
} else {
show_error_page($lang['register_onoff_error']);
}
Step #10Öffne / Open:
index.php + lightbox.php + categories.php + details.php + member.php + postcards.php + search.php + top.phpSuche / Search:
$site_template->print_template($site_template->parse_template($main_template));Ersetze mit / Replace with:
if($config['wartung_onoff'] == 0) {
$site_template->print_template($site_template->parse_template($main_template));
}elseif ($user_info['user_level'] == ADMIN){
$site_template->print_template($site_template->parse_template($main_template));
}else{
$site_template->print_template($site_template->parse_template("wartung"));
}Step #11Öffne / Open:
templates/**TEMPLATE**/header.htmlSuche / Search:
</head>
Füge davor ein / Add before:
{site_header}
Step #12Öffne / Open:
templates/**TEMPLATE**/footer.htmlSuche / Search:
</body>
Füge davor ein / Add before:
{site_footer}
Step #13Öffne / Open:
index.phpSuche / Search:
$num_new_images = $config['image_cells'];Ersetze mit / Replace with:
$num_new_images = $config['more_images_home'];Step #14Öffne / Open:
templates/**TEMPLATE**/user_logininfo.htmlSuche / Search:
</table>
Füge danach ein / Add after:
{more_links_logininfo}
Suche / Search:
{lang_loggedin_msg}<br /><br />
Ersetze mit / Replace with:
{lang_loggedin_msg}<br />
Step #15Öffne / Open:
templates/**TEMPLATE**/user_loginform.htmlSuche / Search:
</table>
Füge danach ein / Add after:
{more_links_loginform}
Step #16Öffne / Open: index.php
Suche / Search:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
Füge davor ein / Add before:
if($config['new_cat_on_home_onoff'] == 1) {
$num_new_cat = $config['new_cat_on_home_menge'];
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
GROUP BY i.cat_id DESC
ORDER BY i.cat_id DESC
LIMIT $num_new_cat";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$new_cat = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$new_cat .= $lang['no_new_images'];
$new_cat .= "</td></tr></table>";
}
else {
$new_cat = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_cat .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_cat .= "<td valign=\"top\">\n";
show_image($image_row);
$new_cat .= $site_template->parse_template("thumbnail_bit");
$new_cat .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$new_cat .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$new_cat .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$new_cat .= "</tr>\n";
}
}
$new_cat .= "</table>\n";
} // end else
$site_template->register_vars(array(
"new_cat_on_home" => ' <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1" valign="top">'.$lang['new_cat_on_home'].'</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">'.$new_cat.'</td>
</tr>
</table>
<br />',
));
$site_template->register_vars("new_cat", $new_cat);
unset($new_cat);
}
Suche / Search:
$site_template->register_vars("new_images", $new_images);
unset($new_images);Füge danach ein / Add after:
if($config['cat_bycat_onoff'] == 1) {
//-----------------------------------------------------
//--- Show New Images By Category ---------------------
//-----------------------------------------------------
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
$imgtable_width .= "%";
}
$additional_sql = "";
if (!empty($additional_image_fields)) {
foreach ($additional_image_fields as $key => $val) {
$additional_sql .= ", i.".$key;
}
}
$num_news_images_bycat = $config['cat_bycat_number'];
// Option Start
$bycat_in = array($config['cat_bycat']); // Change the Number in your category-id - ID ripping by commas
// Ändere die Nummer in deine Kategorie-ID - ID trennen durch Komma
// Option Ende
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").") AND i.cat_id IN (".implode(", ", $bycat_in).")
ORDER BY i.image_date DESC
LIMIT $num_news_images_bycat";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$news_images_bycat = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$news_images_bycat .= $lang['no_news_images_bycat'];
$news_images_bycat .= "</td></tr></table>";
}
else {
$news_images_bycat = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$news_images_bycat .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$news_images_bycat .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$news_images_bycat .= $site_template->parse_template("thumbnail_bit");
$news_images_bycat .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$news_images_bycat .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$news_images_bycat .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$news_images_bycat .= "</tr>\n";
}
}
$news_images_bycat .= "</table>\n";
} // end else
$site_template->register_vars("news_images_bycat", $news_images_bycat);
$site_template->register_vars(array(
"news_images_bycat_home" => ' <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1" valign="top">'.$config['news_images_bycat_name'].'</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">'.$news_images_bycat.'</td>
</tr>
</table>
<br />',
));
unset($news_images_bycat);
}Step #17Step #5
Öffne / Open: includes/functions.php
Suche / Search:
$rate_form = "";
if (check_permission("auth_vote", $image_row['cat_id'])) {
$site_template->register_vars("rate", $lang['rate']);
$rate_form = $site_template->parse_template("rate_form");
}
$site_template->register_vars("rate_form", $rate_form);
$site_template->register_vars(array(
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view),
));
return true;
}
Ersetze mit / Replace with:
$rate_form = "";
if($config['rating_button_disabled_after_vote_onoff'] == 0) {
if($config['rating_disable_for_author'] == 1) {
if (check_permission("auth_vote", $image_row['cat_id'])) {
$site_template->register_vars("rate", $lang['rate']);
$rate_form = $site_template->parse_template("rate_form");
}
}else{
if (check_permission("auth_vote", $image_row['cat_id']) && $user_info['user_id'] != $image_row['user_id']) {
$site_template->register_vars("rate", $lang['rate']);
$rate_form = $site_template->parse_template("rate_form");
}
}
$site_template->register_vars("rate_form", $rate_form);
$site_template->register_vars(array(
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view),
));
} else {
if($config['rating_disable_for_author'] == 1) {
if (check_permission("auth_vote", $image_row['cat_id'])) {
$rate_form = rate_form($image_row['image_id'], $rate_suffix, $rating);
}
}else{
if (check_permission("auth_vote", $image_row['cat_id']) && $user_info['user_id'] != $image_row['user_id']) {
$rate_form = rate_form($image_row['image_id'], $rate_suffix, $rating);
}
}
$site_template->register_vars("rate_form", $rate_form);
$site_template->register_vars(array(
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view),
));
}
return true;
}
function rate_form($id, $rate_suffix = "", $rating = ""){
global $site_template, $session_info, $lang, $site_sess, $HTTP_COOKIE_VARS, $rate_suffix, $config;
$rate_show = $config['rating_button_disabled_after_vote_show_rate'];
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
$cookie_rated_array = isset($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'.$rate_suffix])) : array();
$split_list_array = array();
if (!empty($session_info['rated_imgs'.$rate_suffix])) {
$split_list_array = explode(" ", $session_info['rated_imgs'.$rate_suffix]);
}
$cookie_rated = array();
foreach ($cookie_rated_array as $key) {
$split = explode(",", $key);
$cookie_rated[] = $split[0];
if ($id == $split[0]) {
$rating = $split[1];
}
}
$split_list = array();
foreach ($split_list_array as $key) {
$split = explode(",", $key);
$split_list[] = $split[0];
if ($id == $split[0]) {
$rating = $split[1];
}
}
$no_rateform = (in_array($id, $split_list) || in_array($id, $cookie_rated)) ? "disabled" : 0;
$rate_options = "<option value=\"\">--</option>\n";
for ($i = $config['max_rating_number']; $i; $i--){
$rate_options .= "<option value=\"".$i."\"".(($i == $rating && $rate_show) ? "selected" : "").">".$i."</option>\n";
}
$site_template->register_vars(array(
"rate" => ($no_rateform && !(check_permission("auth_vote", $image_row['cat_id']) && $no_rateform)) ? $lang['rating_finish'] : $lang['rate'],
"rate_options" => $rate_options,
"rate_button" => ($no_rateform) ? $no_rateform : ""
));
$rate_form = $site_template->parse_template("rate_form_disable");
return $rate_form;
}Suche / Search:
if (check_permission("auth_vote", $image_row['cat_id'])) {
$old_votes = $image_row['image_votes'];
$old_rating = $image_row['image_rating'];
$new_rating = (($old_rating * $old_votes) + $rating) / ($old_votes + 1);
$new_rating = sprintf("%.2f", $new_rating);
$sql = "UPDATE ".IMAGES_TABLE."
SET image_votes = ($old_votes + 1), image_rating = '$new_rating'
WHERE image_id = $image_id";
$site_db->query($sql);
}
Ersetze mit / Replace with:
if($config['rating_disable_for_author'] == 1) {
if (check_permission("auth_vote", $image_row['cat_id'])) {
$old_votes = $image_row['image_votes'];
$old_rating = $image_row['image_rating'];
$new_rating = (($old_rating * $old_votes) + $rating) / ($old_votes + 1);
$new_rating = sprintf("%.2f", $new_rating);
$sql = "UPDATE ".IMAGES_TABLE."
SET image_votes = ($old_votes + 1), image_rating = '$new_rating'
WHERE image_id = $image_id";
$site_db->query($sql);
}
}else{
if (check_permission("auth_vote", $image_row['cat_id']) && $user_info['user_id'] != $image_row['user_id']) {
$old_votes = $image_row['image_votes'];
$old_rating = $image_row['image_rating'];
$new_rating = (($old_rating * $old_votes) + $rating) / ($old_votes + 1);
$new_rating = sprintf("%.2f", $new_rating);
$sql = "UPDATE ".IMAGES_TABLE."
SET image_votes = ($old_votes + 1), image_rating = '$new_rating'
WHERE image_id = $image_id";
$site_db->query($sql);
}
}
Step #18Öffne / Open: details.php
Suche / Search:
if ($comment_headline == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['headline_required'];
$error = 1;
}
Ersetze mit / Replace with:
if($config['comment_headline_onoff'] == 1) {
if ($comment_headline == "") {
$msg .= (($msg != "") ? "<br />" : "").$lang['headline_required'];
$error = 1;
}
}
Step #19Öffne / Open: postcards.php
Suche / Search 2x:
$expiry = time() - 60 * 60 * 24 * POSTCARD_EXPIRY;Ersetze mit / Replace with:
$expiry = time() - 60 * 60 * 24 * $config['days_postcards'];Step #20Öffne / Open: includes/search_utils.php
Suche / Search 2x:
MIN_SEARCH_KEYWORD_LENGTH && $len <= MAX_SEARCH_KEYWORD_LENGTHErsetze mit / Replace with:
$config['MIN_SEARCH_KEYWORD_LENGTH'] && $len <= $config['MAX_SEARCH_KEYWORD_LENGTH']Step #21Öffne / Open: templates/**TEMPLATE**/home.html
Suche / Search:
{if msg}<b>{msg}</b><br /><br />{endif msg}
Davor einfügen / Add before:
{new_cat_on_home}
{news_images_bycat_home}
Step #22 - Lade [MOD]Invisible_Settings_v1_2_build_183521112011.zip herunter
- Kopiere den Ordner "mods" in deinem Rootverzeichnis, dort wo auch die index.php und config.php liegt
- Kopiere die wartung.html und rate_form_disable.html in deinem templates/**TEMPLATE**/ Verzeichnis
- Führe die install.php aus Beispiel:
http://deine-seite.de/install.php - Download [MOD]Invisible_Settings_v1_2_build_183521112011.zip
- Copy the "mods" folder to your ROOT, where there is also the index.php and config.php
- Copy the wartung.html and rate_form_disable.html in your templates/**TEMPLATE**/ folder
- Run the install.php. Example:
http://your-site.com/install.php