Advanced search  

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]

Pages: [1]   Go Down

Author Topic: use one image as default thumbnail  (Read 3462 times)

0 Members and 1 Guest are viewing this topic.

Aleha

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
use one image as default thumbnail
« on: November 11, 2008, 12:41:37 am »

I want to use one image as default thumbnail for all albums
without having to upload it in every album.

Sort of like the gray image u see on every private album cover
but it does not show up (when u open the album) as extra pic.

Is that at all possible with coppermine?


 
Logged

Somaiya

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: use one image as default thumbnail
« Reply #1 on: August 28, 2009, 09:04:12 am »

I know its been long since anyone replied to this, but do we have an answer to this?
Would really help.

Thanks & Regards,
Sachin.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: use one image as default thumbnail
« Reply #2 on: August 28, 2009, 01:28:16 pm »

If the thumbnail for all albums are meant to be the same, that's not actually a thumbnail, but just an image you use as a sort of bullet for the album name. This can be accomliplished by editing the theme accordingly. To do so, edit themes/yourtheme/theme.php with a plain text editor (notepad.exe is fine). Find
Code: [Select]
$template_album_list =and edit as suggested below. If that section doesn't exist in your custom theme, copy
Code: [Select]
// HTML template for the album list
$template_album_list = <<<EOT

<!-- BEGIN stat_row -->
        <tr>
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
        </tr>
<!-- END stat_row -->
<!-- BEGIN header -->
        <tr class="tableb_compact">
<!-- END header -->
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td colspan="3" height="1" align="left" valign="top" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
        </tr>
        <tr>
                <td colspan="3">
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td align="center" valign="middle" class="thumbnails">
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
                </td>
                <td width="100%" valign="top" align="left" class="tableb_compact">
                        {ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                        <p class="album_stat">{ALB_INFOS}</p>
                </td>
        </tr>
        </table>
        </td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact">
                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{COLUMNS}" 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;
from themes/sample/theme.php into themes/yourtheme/theme.php into a new line before
Code: [Select]
?>
Now you just add the bullet as you see fit, e.g. by changing
Code: [Select]
<a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>to
Code: [Select]
<a href="{ALB_LINK_TGT}" class="albums"><img src="path/to/your/custom/bullett.jpg" border="0" width="100" height="100" alt="" align="left" />{ALB_LINK_PIC}<br /></a>
Alternatively, you can take care of the section that populates the {ALB_LINK_PIC} placeholder token (happens in the function theme_display_album_list that you need to copy first from the sample theme to your custom theme if it doesn't exist there).

As a third alternative, you could add another generic thumbnail image to the dropwdown list of the album properties screen, which would require an alltogether different coding approach.



Neither the thread starter did as suggested (posting a link to his/her gallery) nor did the poster of the follow-up, so actually none of you deserves a detailed answer: you haven't bothered to respect rules and spend some time reading, so why should supporters spend time on the answer? Yet I still replied and posted a lot of food for thought. Before doing anything else or trying to come up with lame excuses (being new is a very poor excuse for being too lazy to read first), read up board rules now and do as suggested there.
The answer to the initial question
Is that at all possible with coppermine?
is "Yes". If that's not the expected answer, review your question.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 19 queries.