Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Move views for thumnails  (Read 4231 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Move views for thumnails
« 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.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Move views for thumnails
« Reply #1 on: April 30, 2015, 03:44:53 pm »

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)

Code: [Select]
/******************************************************************************
** 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:

Code: [Select]
<td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">

add:

Code: [Select]
<div id="tumbWrapp">

after:

Code: [Select]
                                        {ADMIN_MENU}
                                </td>
                        </tr>
                </table>


add:

Code: [Select]
</div>

In themes/your_theme_name/your_style.css add:

Code: [Select]
#tumbWrapp {
position: relative;
}
.thumb_title_views {
position: absolute;
bottom: 0;
left: 0;
}
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Move views for thumnails
« Reply #2 on: April 30, 2015, 03:49:47 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 20 queries.