To make your custom made theme from cpg1.2.0 work with cpg1.3.0, you'll have to change some places.
Remember to back up your original files, so you can go back to a working version in case something goes wrong with the modifications.
.image { border-style: solid; border-width:1px; border-color: #000000; margin: 2px; }Add after it
.imageborder { border: 1px solid #000000; background-color: #FFFFFF; margin-top: 30px; margin-bottom: 30px; }
.debug_text { border: #BDBEBD; background-color: #EFEFEF; width : 100%; margin : 0px; }
.clickable_option { border-bottom : 1px dotted blue; cursor : hand; }
.listbox_lang { color: #000000; background-color: #D1D7DC; border: 1px solid #D1D7DC; font-size: 80%; font-family: Arial, Helvetica, sans-serif; vertical-align : middle; }
<!-- END my_gallery -->and add after it
<!-- BEGIN allow_memberlist --> <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a> :: <!-- END allow_memberlist -->. You may have to adopt the html that is usually wrapped around your menu items for the memberlist menu item as well.
<!-- END my_profile -->and add after it
<!-- BEGIN faq --> <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> :: <!-- END faq -->. You may have to adopt the html that is usually wrapped around your menu items for the user faq menu item as well.
<td class="admin_menu"><a href="banning.php" title="">{BAN_LNK}</a></td>Add after it
<td class="admin_menu"><a href="db_ecard.php" title="">{DB_ECARD_LNK}</a></td>
<b>{ALBUM_TITLE}</b>. Replace it with
<a href="{ALB_LINK_TGT}" class="alblink"><b>{ALBUM_TITLE}</b></a>(This code is twice in theme.php, so you will have to replace it two times).
<td valign="top" background='themes/igames/images/tile.gif' align="center" height='30'> </td>.
// HTML template for thumbnails displayand add before it
// HTML template for title row of the fav thumbnail view (album title + download) $template_fav_thumb_view_title_row = <<<EOT <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td> <td><img src="images/spacer.gif" width="1"></td> <td class="sortorder_cell"> <table height="100%" cellpadding="0" cellspacing="0"> <tr> <td class="sortorder_options"><span class="statlink"><a href="zipdownload.php">{DOWNLOAD_ZIP}</a></span></td> </tr> </table> </td> </tr> </table> EOT;Make sure there are no spaces in front of or after the EOT; in the last line.
<table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #FFFFFF; margin-top: 30px; margin-bottom: 30px;"> <tr> <td>and replace with
<table cellspacing="2" cellpadding="0" class="imageborder"> <tr> <td align="center">
if ($CONFIG['debug_mode']) { $time_end = getmicrotime(); $time = round($time_end - $time_start, 3); $query_count = count($query_stats); $query_times = ''; $total_query_time = 0; foreach ($query_stats as $qtime) { $query_times .= round($qtime, 3) . "s "; $total_query_time += $qtime; } $total_query_time = round($total_query_time, 3); starttable('100%', 'Debug info'); echo "<tr><td class=\"tableb\">"; echo "USER: <pre>"; print_r($USER); echo "</pre></td></tr><td class=\"tableb\">"; echo "<tr><td class=\"tableb\">"; echo "USER DATA: <pre>"; print_r($USER_DATA); echo "</pre></td></tr><td class=\"tableb\">"; echo "<tr><td class=\"tableb\">"; echo "Queries: <pre>"; print_r($queries); echo "</pre></td></tr><td class=\"tableb\">"; echo "GET :<pre>"; print_r($HTTP_GET_VARS); echo "</pre></td></tr><td class=\"tableb\">"; echo "POST :<pre>"; print_r($HTTP_POST_VARS); echo "</pre></td></tr><td class=\"tableb\" >"; echo <<<EOT Page generated in <b>$time</b> seconds - <b>$query_count</b> queries in <b>$total_query_time</b> seconds - Album set : $ALBUM_SET EOT; echo "</td></tr>"; echo "<tr><td class=\"tableb\">"; echo "<a href=\"phpinfo.php\">Advanced debug mode</a> (phpinfo)"; echo "</td></tr>"; endtable(); }and replace with
if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) { cpg_debug_output(); }
if (USER_ID || !$CONFIG['allow_user_registration']) { template_extract_block($template_main_menu, 'register'); }and add after it
if (!USER_ID || !$CONFIG['allow_memberlist']) { template_extract_block($template_main_menu, 'allow_memberlist'); } if (!$CONFIG['display_faq']) { template_extract_block($template_main_menu, 'faq'); }
'{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],and add after it
'{MEMBERLIST_TGT}' => "usermgr.php", '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'], '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'], '{FAQ_TGT}' => "faq.php", '{FAQ_TITLE}' => $lang_main_menu['faq_title'], '{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
'{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'],and add after it
'{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'],
$template_noabl = template_extract_block($template_cat_list, 'catrow_noalb'); $template = template_extract_block($template_cat_list, 'catrow'); foreach($cat_data as $category) { if (count($category) == 2) { $params = array('{CAT_TITLE}' => $category[0], '{CAT_DESC}' => $category[1] ); echo template_noval($template_noabl, $params); } elseif (isset($category['cat_albums']) && ($category['cat_albums'] != '')) { $params = array('{CAT_TITLE}' => $category[0], '{CAT_DESC}' => $category[1], '{CAT_ALBUMS}' => $category['cat_albums'], '{ALB_COUNT}' => $category[2], '{PIC_COUNT}' => $category[3], ); echo template_noval($template, $params); } else { $params = array('{CAT_TITLE}' => $category[0], '{CAT_DESC}' => $category[1], '{CAT_ALBUMS}' => '', '{ALB_COUNT}' => $category[2], '{PIC_COUNT}' => $category[3], ); echo template_noval($template, $params); } }and replace with
$template_noabl = template_extract_block($template_cat_list, 'catrow_noalb'); $template = template_extract_block($template_cat_list, 'catrow'); foreach($cat_data as $category) { if (count($category) == 3) { $params = array('{CAT_TITLE}' => $category[0], '{CAT_THUMB}' => $category['cat_thumb'], '{CAT_DESC}' => $category[1] ); echo template_noval($template_noabl, $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}' => $category[2], '{PIC_COUNT}' => $category[3], ); echo template_noval($template, $params); } else { $params = array('{CAT_TITLE}' => $category[0], '{CAT_THUMB}' => $category['cat_thumb'], '{CAT_DESC}' => $category[1], '{CAT_ALBUMS}' => '', '{ALB_COUNT}' => $category[2], '{PIC_COUNT}' => $category[3], ); echo template_noval($template, $params); } }
global $template_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view;and replace with
global $template_thumb_view_title_row,$template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view;
$tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : ''; // The sort order options are not available for meta albums if ($sort_options) { $param = array('{ALBUM_NAME}' => $album_name, '{AID}' => $aid, '{PAGE}' => $page, '{NAME}' => $lang_thumb_view['name'], '{TITLE}' => $lang_thumb_view['title'], '{DATE}' => $lang_thumb_view['date'], '{SORT_TA}' => $lang_thumb_view['sort_ta'], '{SORT_TD}' => $lang_thumb_view['sort_td'], '{SORT_NA}' => $lang_thumb_view['sort_na'], '{SORT_ND}' => $lang_thumb_view['sort_nd'], '{SORT_DA}' => $lang_thumb_view['sort_da'], '{SORT_DD}' => $lang_thumb_view['sort_dd'], ); $title = template_noval($template_thumb_view_title_row, $param); } else { $title = $album_name; } if ($mode == 'thumb') { starttable('100%', $title, $thumbcols); } else { starttable('100%'); } echo $header;and replace with
$tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : ''; // The sort order options are not available for meta albums if ($sort_options) { $param = array('{ALBUM_NAME}' => $album_name, '{AID}' => $aid, '{PAGE}' => $page, '{NAME}' => $lang_thumb_view['name'], '{TITLE}' => $lang_thumb_view['title'], '{DATE}' => $lang_thumb_view['date'], '{SORT_TA}' => $lang_thumb_view['sort_ta'], '{SORT_TD}' => $lang_thumb_view['sort_td'], '{SORT_NA}' => $lang_thumb_view['sort_na'], '{SORT_ND}' => $lang_thumb_view['sort_nd'], '{SORT_DA}' => $lang_thumb_view['sort_da'], '{SORT_DD}' => $lang_thumb_view['sort_dd'], ); $title = template_noval($template_thumb_view_title_row, $param); } else if ($aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later $param = array('{ALBUM_NAME}' => $album_name, '{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip'] ); $title = template_noval($template_fav_thumb_view_title_row, $param); }else{ $title = $album_name; } if ($mode == 'thumb') { starttable('100%', $title, $thumbcols); } else { starttable('100%'); } echo $header;
if ((!$template)) { $template = $template_film_strip; $thumb_cell = template_extract_block($template, 'thumb_cell'); $empty_cell = template_extract_block($template, 'empty_cell'); // $spacer = template_extract_block($template, 'spacer'); } // if ($header == '') {} $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat; $theme_thumb_tab_tmpl = $template_tab_display; if ($mode == 'thumb') { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); } else { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); }and replace with
if ((!$template)) { $template = $template_film_strip; $thumb_cell = template_extract_block($template, 'thumb_cell'); $empty_cell = template_extract_block($template, 'empty_cell'); } $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
.admin_menu a { color: #000000; text-decoration: none; display: block; position: relative; padding-top: 1px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; }Replace it with
.admin_menu a { color: #000000; text-decoration: none; display: block; position: relative; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; padding-right: 2px; }
<td class="tableh2" colspan="3"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td>. Replace it with
<td class="tableh2" colspan="3"><table border=0 ><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
<td class="tableb"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td>. Replace it with
<td class="tableb"><table border=0 ><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
Save all your open files and upload them to your webserver; test-drive both as admin and as "regular" user.