omg this thing really really hates me.
this is what I added in the theme.php
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb')
{
global $CONFIG;
global $template_thumb_view_title_row,$template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view;
static $header = '';
static $thumb_cell = '';
static $empty_cell = '';
static $row_separator = '';
static $footer = '';
static $tabs = '';
static $spacer = '';
if ($header == '') {
$thumb_cell = template_extract_block($template_thumbnail_view, 'thumb_cell');
$tabs = template_extract_block($template_thumbnail_view, 'tabs');
$header = template_extract_block($template_thumbnail_view, 'header');
$empty_cell = template_extract_block($template_thumbnail_view, 'empty_cell');
$row_separator = template_extract_block($template_thumbnail_view, 'row_separator');
$footer = template_extract_block($template_thumbnail_view, 'footer');
$spacer = template_extract_block($template_thumbnail_view, 'spacer');
}
$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'));
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_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'));
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
}
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['thumbcols']) . '%';
$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'],
'{POSITION}' => $lang_thumb_view['position'],
'{SORT_PA}' => $lang_thumb_view['sort_pa'],
'{SORT_PD}' => $lang_thumb_view['sort_pd'],
);
$title = template_eval($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_eval($template_fav_thumb_view_title_row, $param);
}else{
$title = $album_name;
}
if ($mode == 'thumb') {
starttable('100%', $title, $thumbcols);
} else {
starttable('100%');
}
echo $header;
$i = 0;
foreach($thumb_list as $thumb) {
$i++;
if ($mode == 'thumb') {
if ($aid == 'lastalb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{CREATOR}' => $thumb['creator'],
'{ADMIN_MENU}' => $thumb['admin_menu']
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{CREATOR}' => $thumb['creator'],
'{ADMIN_MENU}' => $thumb['admin_menu']
);
}
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{CREATOR}' => $thumb['creator'],
'{ADMIN_MENU}' => ''
);
}
echo template_eval($thumb_cell, $params);
if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) {
echo $row_separator;
}
}
for (;($i % $thumbcols); $i++) {
echo $empty_cell;
}
echo $footer;
if ($display_tabs) {
$params = array('{THUMB_COLS}' => $thumbcols,
'{TABS}' => $tabs_html
);
echo template_eval($tabs, $params);
}
endtable();
echo $spacer;
}
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT
<div align="center">
<table cellpadding="0" cellspacing="1">
<tr>
<!-- BEGIN admin_approval -->
<td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
<td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
<td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
<td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
<td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
<td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
<td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
<td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
</tr><tr>
<!-- BEGIN log_ecards -->
<td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
<td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
<td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
<td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
<td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
</tr>
</table>
</div>
EOT;
// HTML template for thumbnails display
if (!isset($template_thumbnail_view)) //{THEMES}
$template_thumbnail_view = <<<EOT
<!-- BEGIN header -->
<tr>
<!-- END header -->
<!-- BEGIN thumb_cell -->
<td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<a href="{LINK_TGT}">{THUMB}<br /></a>
{CAPTION}
{CREATOR}
{ADMIN_MENU}
</td>
</tr>
</table>
</td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
<td valign="top" class="thumbnails" align="center"> </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
</tr>
<tr>
<!-- END row_separator -->
<!-- BEGIN footer -->
</tr>
<!-- END footer -->
<!-- BEGIN tabs -->
<tr>
<td colspan="{THUMB_COLS}" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{TABS}
</tr>
</table>
</td>
</tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
$thumb_list[$i]['creator'] = $user1_temp;
$thumb_list[$i]['pos'] = $key < 0 ? $key : $i - 1 + $lower_limit;
$thumb_list[$i]['pid'] = $row['pid'];;
$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";
$thumb_list[$i]['caption'] = bb_decode($row['caption_text']);
$thumb_list[$i]['admin_menu'] = '';
$thumb_list[$i]['aid'] = $row['aid'];
and then I have this that I need to add as well (from the functions):
function display_thumbnails($album, $cat, $page, $thumbcols, $thumbrows, $display_tabs)
{
global $CONFIG, $AUTHORIZED;
global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;
$thumb_per_page = $thumbcols * $thumbrows;
$lower_limit = ($page-1) * $thumb_per_page;
$pic_data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
$total_pages = ceil($thumb_count / $thumb_per_page);
$i = 0;
if (count($pic_data) > 0) {
foreach ($pic_data as $key => $row) {
$i++;
$pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
$lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
$lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
$lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);
$pic_url = get_pic_url($row, 'thumb');
if (!is_image($row['filename'])) {
$image_info = getimagesize(urldecode($pic_url));
$row['pwidth'] = $image_info[0];
$row['pheight'] = $image_info[1];
}
$image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);
$thumb_list[$i]['creator'] = $user1_temp;
$thumb_list[$i]['pos'] = $key < 0 ? $key : $i - 1 + $lower_limit;
$thumb_list[$i]['pid'] = $row['pid'];;
$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";
$thumb_list[$i]['caption'] = bb_decode($row['caption_text']);
$thumb_list[$i]['admin_menu'] = '';
$thumb_list[$i]['aid'] = $row['aid'];
}
theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);
} else {
theme_no_img_to_display($album_name);
}
}
but everytime I try to add the two together, it gives me an error. Then on top of it it doesn't say {CREATOR} anywhere in the gallery, like it did earlier. (dunno if it was supposed to).