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: [Solved]: adding a table row in thumbnails.php  (Read 3647 times)

0 Members and 1 Guest are viewing this topic.

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
[Solved]: adding a table row in thumbnails.php
« on: March 15, 2008, 03:05:05 pm »

Hello guys

I want to add a row at the beginning and at the end of the images table in thumbnails.php but I don't know where I should put this code

the row content will be almost static (I just need to access the search $_POST value) so I am looking for the place where the final HTML code is generated, no need to interact with building the SQL statement etc

where should I look for this piece of code?
« Last Edit: March 15, 2008, 05:39:56 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: adding a table row in thumbnails.php
« Reply #1 on: March 15, 2008, 03:07:19 pm »

Copy the $template_thumbnail_view template from the sample theme into your custom theme's theme.php and modify your copy.
Logged

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: adding a table row in thumbnails.php
« Reply #2 on: March 15, 2008, 03:08:21 pm »

to clarify I want to add the line immediately below

search results "snow"

see the page with a search for snow http://www.imagetemple.com/gallery/thumbnails.php?album=search&search=snow

and above "64 files on 4 page"
Logged

Nibbler

  • Guest
Re: adding a table row in thumbnails.php
« Reply #3 on: March 15, 2008, 03:16:13 pm »

Add new rows into the header and footer sections of the template. Also, update your gallery.
Logged

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: adding a table row in thumbnails.php
« Reply #4 on: March 15, 2008, 03:31:52 pm »

thank you Nibbler

if I add them into the template I suppose they'll be above the "search results" and below the image counters at the bottom

I might and probably will end doing this way, but what if I wanted to add a row inside the table? say below <td class="tableh1" colspan="4">Search results - "snow"</td>?
Logged

Nibbler

  • Guest
Re: adding a table row in thumbnails.php
« Reply #5 on: March 15, 2008, 03:43:09 pm »

Just do as I suggested, eg.

Code: [Select]
// HTML template for thumbnails display
$template_thumbnail_view = <<<EOT

<!-- BEGIN header -->
<tr>
<td colspan="4">Extra row here</td>
</tr>
        <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>
<tr>
<td colspan="4">Extra row here</td>
</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;
Logged

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: adding a table row in thumbnails.php
« Reply #6 on: March 15, 2008, 05:36:32 pm »

thank you, I have the rows perfectly running ;)

I might update the gallery shortly, but would I loose all the modifications I've done?
Logged

Nibbler

  • Guest
Re: adding a table row in thumbnails.php
« Reply #7 on: March 15, 2008, 05:39:35 pm »

You'd lose any modifications to core code. Plugins and theme changes will be fine.
Logged

Fed

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • Imagetemple.com
Re: [Solved]: adding a table row in thumbnails.php
« Reply #8 on: March 20, 2008, 07:34:17 pm »

I am receiving 500-600 spammy comments/day, would upgrading fix this?

is there a comment approval or spammy IP suspension in the current release?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: adding a table row in thumbnails.php
« Reply #9 on: March 20, 2008, 07:41:05 pm »

We have a strict "One question per thread" policy that you agreed to respect when signing up. Upgrading will not change comment settings. Search the board for the terms "comment spam", "captcha" and "akismet". Locking
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 16 queries.