forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on April 27, 2015, 08:21:54 pm
-
Is it posible to move the views. They are between title and description.
Can they be under description like all the others: rating, uploder name etc.
I don't want to edit core files. I want it to be possible by making changes to theme.php.
-
I solved it with css.
Copy function $template_thumbnail_view from themes/sample/theme.php (make sure is not alredy in themes/your_theme_name/theme.php)
/******************************************************************************
** Section <<<$template_thumbnail_view>>> - START
******************************************************************************/
// HTML template for thumbnails display
$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}
{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;
/******************************************************************************
** Section <<<$template_thumbnail_view>>> - END
******************************************************************************/
In the code above after:
<td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
add:
<div id="tumbWrapp">
after:
{ADMIN_MENU}
</td>
</tr>
</table>
add:
</div>
In themes/your_theme_name/your_style.css add:
#tumbWrapp {
position: relative;
}
.thumb_title_views {
position: absolute;
bottom: 0;
left: 0;
}
-
You can change:
bottom: 0;
left: 0;
to
bottom: 0;
right: 0;
or whatever. Depends where you want the views to show. I want it at the bottom.
more aboute position here: http://www.w3schools.com/cssref/pr_class_position.asp (http://www.w3schools.com/cssref/pr_class_position.asp)