forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on October 14, 2013, 04:41:26 pm

Title: Replace filmstrip arows with text
Post by: allvip on October 14, 2013, 04:41:26 pm
In js/displayimage.js I replaced:

Code: [Select]
// button HTML
    $('td.prev_strip').html("<a id=\"filmstrip_prev\" rel=\"nofollow\" style=\"cursor: pointer;\"><img src=\"./images/icons/"+leftimage+"\" border=\"0\" /></a>");
    $('td.next_strip').html("<a id=\"filmstrip_next\" rel=\"nofollow\" style=\"cursor: pointer;\"><img src=\"./images/icons/"+rightimage+"\" border=\"0\" /></a>");

with:

Code: [Select]
// button HTML
    $('td.prev_strip').html("<a id=\"filmstrip_prev\" rel=\"nofollow\" style=\"cursor: pointer;\">Previous</a>");
    $('td.next_strip').html("<a id=\"filmstrip_next\" rel=\"nofollow\" style=\"cursor: pointer;\">Next</a>");

I think is the right way but I do not want to edit coppermine files.

Can I replace filmstrip arows with text editing only the theme files?
What should I write in theme.php?
Title: Re: Replace filmstrip arows with text
Post by: Jeff Bailey on October 15, 2013, 05:02:13 am
You can probably just edit out the td class names (prev_strip, next_strip) and insert your code ... <a id="filmstrip_prev" rel="nofollow" style="cursor: pointer;">Previous</a>.
This might break the links, untested.

Section to edit or add in your custom theme.php
Code: [Select]
/******************************************************************************
** Section <<<$template_film_strip>>> - START
******************************************************************************/
// HTML template for filmstrip display
$template_film_strip = <<<EOT

        <tr>
          <td valign="top" class="filmstrip_background" style="background-image: url({TILE1});"><img src="{TILE1}" alt="" border="0" /></td>
        </tr>
        <tr>
          <td valign="bottom" class="thumbnails filmstrip_background" align="center" style="{THUMB_TD_STYLE}">
            <table width="100%" cellspacing="0" cellpadding="3" border="0">
                <tr>
                   <td width="50%" class="prev_strip"></td>
                     <td valign="bottom"  style="{THUMB_TD_STYLE}">
                       <div id="film" style="{SET_WIDTH}"><table class="tape" ><tr>{THUMB_STRIP}</tr></table></div>
                     </td>
                   <td width="50%" align="right" class="next_strip"></td>
                </tr>
            </table>
          </td>
        </tr>
        <tr>
         <td valign="top" class="filmstrip_background" style="background-image: url({TILE2});"><img src="{TILE2}" alt="" border="0" /></td>
        </tr>
<!-- BEGIN thumb_cell -->
                <td class="thumb" >
                  <a href="{LINK_TGT}" class="thumbLink" style="{ONE_WIDTH}">{THUMB}</a>
                </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" align="center" >&nbsp;</td>
<!-- END empty_cell -->

EOT;
/******************************************************************************
** Section <<<$template_film_strip>>> - END
******************************************************************************/
Title: Re: Replace filmstrip arows with text
Post by: allvip on October 15, 2013, 10:20:03 am
thanks.it worked.

I replaced:
Code: [Select]
<td width="50%" class="prev_strip"></td>

with:
Code: [Select]
<td width="50%"><a id="filmstrip_prev" rel="nofollow" style="cursor: pointer;">Previous</a></td>

and:

Code: [Select]
<td width="50%" align="left" class="next_strip"></td>

with:

Code: [Select]
<td width="50%" align="left"><a id="filmstrip_next" rel="nofollow" style="cursor: pointer;">Next</a></td>