Erstmal vielen Dank für deine Antworten.
1) Nu ja...offensichtlich? Plötzlich waren alle Buttons weg, nur noch Schriftzüge stattdessen...aber mit ein wenig nachdenken und eine Menge trial and error hab ich es fast hinbekommen...Ich kann im Sub_Menue Buttons auskommentieren, im Sys Menue nicht.
Wenn ich z.B. "meine Gallerie" wegnehme, bekommt der unangemeldete User einen "Template error Failed to find block 'register' (#<!-- BEGIN register -->(.*?)<!-- END register -->#s) in :" - Wenn ich angemeldetet bin und das mache, funktioniert es. Umgekehrt funktioniert z.B. "register" beim unangemeldeten User, sobald man sich anmeldet, bekommt man wieder den Fehler.
Es hat also offensichtlich was mit der Ansicht beim Wechsel zwischen angemeldetet und nicht angemeldetet zu tun (oder auch nicht..*grybel*), aber ich habe keine Ahnung wie...Das passiert auch ohne meine Änderung bezüglich der Buttons.
Hier meine theme.php:
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2013 Coppermine Dev Team
v1.0 originally written by Gregory Demar
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.5.22
$HeadURL: https://svn.code.sf.net/p/coppermine/code/trunk/cpg1.5.x/themes/rainy_day/theme.php $
$Revision: 8530 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_PROGRESS_GRAPHICS', 1);
// HTML template for sys_menu
$template_sys_menu = <<<EOT
<div class="topmenu">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
{BUTTONS}
</tr>
</table>
</div>
EOT;
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
<td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
<td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
<a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
</td>
<td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;
/******************************************************************************
** Section <<<assemble_template_buttons>>> - START
******************************************************************************/
// Creates buttons from a template using an array of tokens
// this function is used in this file it needs to be declared before being called.
function assemble_template_buttons($template_buttons,$buttons)
{
$counter=0;
$output='';
foreach ($buttons as $button) {
if (isset($button[4])) {
$spacer=$button[4];
} else {
$spacer='';
}
$params = array(
'{SPACER}' => $spacer,
'{BLOCK_ID}' => $button[3],
'{HREF_TGT}' => $button[2],
'{HREF_TITLE}' => $button[1],
'{HREF_LNK}' => $button[0],
'{HREF_ATTRIBUTES}' => $button[5]
);
$output.=template_eval($template_buttons, $params);
}
return $output;
}
/******************************************************************************
** Section <<<assemble_template_buttons>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<addbutton>>> - START
******************************************************************************/
// Creates an array of tokens to be used with function assemble_template_buttons
// this function is used in this file it needs to be declared before being called.
function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer,$href_attrib='')
{
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer,$href_attrib);
}
/******************************************************************************
** Section <<<addbutton>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<$template_sys_menu>>> - START
******************************************************************************/
// HTML template for sys_menu
// $template_sys_menu = <<<EOT
// {BUTTONS}
//EOT;
$template_sys_menu = <<<EOT
<div class="topmenu">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
{BUTTONS}
</tr>
</table>
</div>
EOT;
/******************************************************************************
** Section <<<$template_sys_menu>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<$template_sub_menu>>> - START
******************************************************************************/
// HTML template for sub_menu
$template_sub_menu = $template_sys_menu;
/******************************************************************************
** Section <<<$template_sub_menu>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<THEME_HAS_NO_SYS_MENU_BUTTONS>>> - START
******************************************************************************/
if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {
// HTML template for template sys_menu spacer
$template_sys_menu_spacer = '<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
<td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
<td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
<a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
</td>
<td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;
// HTML template for template sys_menu buttons
// {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}{HREF_ATTRIBUTES}
addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{CONTACT_LNK}','{CONTACT_TITLE}','{CONTACT_TGT}','contact',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{MEMBERLIST_LNK}','{MEMBERLIST_TITLE}','{MEMBERLIST_TGT}','allow_memberlist',
$template_sys_menu_spacer);
if (array_key_exists('allowed_albums', $USER_DATA) && is_array($USER_DATA['allowed_albums']) && count($USER_DATA
['allowed_albums'])) {
addbutton($sys_menu_buttons,'{UPL_APP_LNK}','{UPL_APP_TITLE}','{UPL_APP_TGT}','upload_approval',$template_sys_menu_spacer);
}
addbutton($sys_menu_buttons,'{MY_PROF_LNK}','{MY_PROF_TITLE}','{MY_PROF_TGT}','my_profile',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{ADM_MODE_LNK}','{ADM_MODE_TITLE}','{ADM_MODE_TGT}','enter_admin_mode',
$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{USR_MODE_LNK}','{USR_MODE_TITLE}','{USR_MODE_TGT}','leave_admin_mode',
$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{SIDEBAR_LNK}','{SIDEBAR_TITLE}','{SIDEBAR_TGT}','sidebar',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer);
addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
// Login and Logout don't have a spacer as only one is shown, and either would be the last option.
$sys_menu_buttons = CPGPluginAPI::filter('sys_menu',$sys_menu_buttons);
$params = array('{BUTTONS}' => assemble_template_buttons($template_sys_menu_button,$sys_menu_buttons));
$template_sys_menu = template_eval($template_sys_menu,$params);
}
/******************************************************************************
** Section <<<THEME_HAS_NO_SYS_MENU_BUTTONS>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<THEME_HAS_NO_SUB_MENU_BUTTONS>>> - START
******************************************************************************/
if (!defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {
// HTML template for template sub_menu spacer
$template_sub_menu_spacer = $template_sys_menu_spacer;
// HTML template for template sub_menu buttons
$template_sub_menu_button = $template_sys_menu_button;
// HTML template for template sub_menu buttons
// {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}{HREF_ATTRIBUTES}
addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',
$template_sub_menu_spacer);
// addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
// addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',
$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',
$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer,'rel="nofollow"');
addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',
$template_sub_menu_spacer,'rel="nofollow"');
// addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer,'rel="nofollow"');
if ($CONFIG['browse_by_date'] != 0) {
addbutton($sub_menu_buttons, '{BROWSEBYDATE_LNK}', '{BROWSEBYDATE_TITLE}', '{BROWSEBYDATE_TGT}', 'browse_by_date',
$template_sub_menu_spacer, 'rel="nofollow" class="greybox"');
}
// addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
$sub_menu_buttons = CPGPluginAPI::filter('sub_menu',$sub_menu_buttons);
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
$template_sub_menu = template_eval($template_sub_menu,$params);
}
/******************************************************************************
** Section <<<THEME_HAS_NO_SUB_MENU_BUTTONS>>> - END
******************************************************************************/
/******************************************************************************
** Section <<<theme_display_cat_list>>> - START
******************************************************************************/
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
global $template_cat_list, $lang_cat_list;
if (count($cat_data) > 0) {
starttable('100%');
$template = template_extract_block($template_cat_list, 'header');
$params = array(
'{CATEGORY}' => $lang_cat_list['category'],
'{ALBUMS}' => $lang_cat_list['albums'],
'{PICTURES}' => $lang_cat_list['pictures'],
);
echo template_eval($template, $params);
}
$template_noalb = template_extract_block($template_cat_list, 'catrow_noalb');
$template = template_extract_block($template_cat_list, 'catrow');
foreach($cat_data as $category) {
if (!isset($category['cat_thumb'])) { $category['cat_thumb'] = ''; }
if (count($category) == 3) {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
);
echo template_eval($template_noalb, $params);
} elseif (isset($category['cat_albums']) && ($category['cat_albums'] != '')) {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => $category['cat_albums'],
'{ALB_COUNT}' => cpg_float2decimal($category[2]),
'{PIC_COUNT}' => cpg_float2decimal($category[3]),
);
echo template_eval($template, $params);
} else {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => '',
'{ALB_COUNT}' => cpg_float2decimal($category[2]),
'{PIC_COUNT}' => cpg_float2decimal($category[3]),
);
echo template_eval($template, $params);
}
}
// if ($statistics && count($cat_data) > 0) {
// $template = template_extract_block($template_cat_list, 'footer');
// $params = array('{STATISTICS}' => $statistics);
// echo template_eval($template, $params);
// }
if (count($cat_data) > 0)
endtable();
echo template_extract_block($template_cat_list, 'spacer');
}
/******************************************************************************
** Section <<<theme_display_cat_list>>> - END
******************************************************************************/
?>
2) Den kannte ich, aber dadurch hatte ich plötzlich keinerlei Zugriff mehr auf die Alben, da diese verschwunden waren. Jetzt habe ich mir die Einstellungen nochmals genauer angeschaut und bin auf die Idee gekommen, das sich "Alblist" in dem "Inhalt der Hauptseite" gut machen würden......lol...
3) Super, genau das meinte ich. Ich habs nicht gefunden, aber ich wußte auch nicht genau wie ich suchen sollte, da mir kein echtes Schlüsselwort eingefallen ist..auf statistic kam ich nicht.
4) Vielleicht weil du ohne angemeldet zu sein auf diese Seite wolltest? Jedenfalls hat sich der obere genaue Blick auf die Einstellungen auch hier bezahlt gemacht...man sollte schon die URL ändern, wenn man ein Verzeichnis nach oben zieht....*facepalm*
Nochmals Danke
CyA
Caana