Version 1.7.6Step 1 Open index.php
Öffne index.php
search
suche
if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
$template = "";
}
else {
$main_template = $template;
Insert
below: füge darunter ein:
if ($template == "melden") {
$site_template->register_vars(array(
"img_id" => $HTTP_GET_VARS["img_id"],
"poster" => $HTTP_GET_VARS["poster"],
"username" => $HTTP_GET_VARS["username"],
"up_date" => $HTTP_GET_VARS["up_date"]
));
}
Step 1.1 search
suche
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$site_template->register_vars("clickstream", $clickstream);
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
}
Replace with:
ersetze mit:
if (!empty($template)) {
if ($template == "melden") {
$img_id = isset($HTTP_GET_VARS["img_id"]) ? intval(trim($HTTP_GET_VARS['img_id'])) : "";
if ($img_id) {
$sql = "SELECT i.*, c.cat_name
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
WHERE i.image_id = $img_id AND c.cat_id = i.cat_id";
$image_row = $site_db->query_firstrow($sql);
show_image($image_row);
}
}
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$site_template->register_vars("clickstream", $clickstream);
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
}
Step 2 Open includes/functions.php
Öffne includes/functions.php
search
suche
else {
$user_name = format_text($lang['userlevel_guest'], 2);
$user_name_link = $user_name;
}
Insert
below: füge darunter ein:
$melder = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : "Gast";
$melden_button = "<a href=\"".$site_sess->url(ROOT_PATH."index.php?template=melden&".URL_IMAGE_ID."=".$image_row['image_id'])."&img_id=".$image_row['image_id']."&poster=".$user_name."&username=".$melder."&up_date=".urlencode(format_date($config['date_format']." ".$config['time_format'],$image_row['image_date']))."\"><img src=\"".get_gallery_image("melden.gif")."\" border=\"0\" alt=\"\" /></a>";
Step 2.1 search
suche
"postcard_button" => $postcard_button,
"download_button" => $download_button,
Insert
below: füge darunter ein:
"melden_button" => $melden_button,
Step 3 A Open templates/default/details.html
Öffne templates/default/details.html
search
suche
<br />{lightbox_button} {postcard_button} {download_button} {download_zip_button}
for all users
für alle Benutzer
Replace with:
ersetze mit:
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td align="center">
{melden_button}
</td>
</tr>
<tr>
<td align="center">
{lightbox_button} {postcard_button} {download_button} {download_zip_button}
</td>
</tr>
</table>
Step 3 B only for registered users
nur für registrierte Benutzer
Replace with:
ersetze mit:
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td align="center">
{if user_loggedin}{melden_button}{endif user_loggedin}
</td>
</tr>
<tr>
<td align="center">
{lightbox_button} {postcard_button} {download_button} {download_zip_button}
</td>
</tr>
</table>
Step 4 Open melden.php
Öffne melden.php
change the path to for thanking HTML, and email address etc..
ändere den Pfad zur danke.html, und Email Adresse etc.