Move views for thumnails Move views for thumnails
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Move views for thumnails

Started by allvip, April 27, 2015, 08:21:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

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.

allvip

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">&nbsp;</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;
}

allvip

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