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: Template Error for Viewing Pictures  (Read 6995 times)

0 Members and 1 Guest are viewing this topic.

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Template Error for Viewing Pictures
« on: July 20, 2006, 01:46:54 am »

This is what I get whenever I click on a thumbnail:
Code: [Select]
Template error
Failed to find block 'report_file_button'(#(<!-- BEGIN report_file_button -->)(.*?)(<!-- END report_file_button -->)#s) in :

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="images/folder.gif" width="16" height="16" align="absmiddle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="javascript:;" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}"><img src="images/slideshow.gif" width="16" height="16" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" witdh="100%">
                        {PIC_POS}
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/prev.gif" width="16" height="16" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/next.gif" width="16" height="16" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

Here's my template:
http://laurengallery.t35.com/cpg148/themes/default/template.html < Right click, and hit view source.


Anyone know why this is happening??
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Template Error for Viewing Pictures
« Reply #1 on: July 20, 2006, 02:13:03 am »

Check your theme.php file to see if you're missing the Begin and End tags for the ecard code. You can copy this from the Sample>theme.php to get an idea of what it should look like:
Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #2 on: July 20, 2006, 02:40:09 am »

My PHP isn't working. I downloaded it about ten times, and still nothing. So, is there any other way I can fix it?
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Template Error for Viewing Pictures
« Reply #3 on: July 20, 2006, 03:26:02 am »

I'm not sure I follow you. You mean you've made the changes your theme.php file, uploaded it to your server and it still isn't working? Can you attach it to this thread? Also, your host is dumping code into your site but I'm not sure that it's the problem.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template Error for Viewing Pictures
« Reply #4 on: July 20, 2006, 05:39:15 am »

Also, your host is dumping code into your site but I'm not sure that it's the problem.
Definitely is a huge issue, you usually can't use Coppermine on webspace that injects code into pages that way. Look for another webhost.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #5 on: July 20, 2006, 05:46:12 am »

I'm not sure I'll be able to find a new host, it was very hard to find that one. It was the only free one with FTP and unlimited space I could find. I'll try though. And no, I didn't edit theme.php because my PHP Program isn't working.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template Error for Viewing Pictures
« Reply #6 on: July 20, 2006, 05:53:12 am »

And no, I didn't edit theme.php because my PHP Program isn't working.
What do you mean by that? Download the file to your local hard-drive, then use a plain-text editor (notepad.exe is fine) to edit it as you see fit.No particular "PHP Program" needed.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #7 on: July 20, 2006, 10:33:01 am »

Oh, okay I didn't know that. I'm still not sure if I'll be able to fix it, though. I'm going to try now.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #8 on: July 20, 2006, 10:36:09 am »

Check your theme.php file to see if you're missing the Begin and End tags for the ecard code. You can copy this from the Sample>theme.php to get an idea of what it should look like:
Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;

My theme.php doesn't seem to have "ecard_button" at all. Is that the problem?
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #9 on: July 20, 2006, 10:39:06 am »

I also found in a FAQ question about a problem similar to mine, it said to search for BLOCK_ID, and it's not in my theme.php. Could that be the problem?
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Template Error for Viewing Pictures
« Reply #10 on: July 20, 2006, 12:34:51 pm »

You need to read up on the documentation and posts as this has been explained many, many times. To start with creating and upgrading a theme, check out this post - http://forum.coppermine-gallery.net/index.php?topic=24056.0. Read the manual.

If you don't have this code in your theme.php, you need to copy it from the Sample>theme.php file and paste it into yours. The Sample>theme.php file holds all the componenets that you can edit to suit your needs. You copy what you want to change about your theme from there and paste it into your theme.php.

Paste the above code into your theme.php and upload to your server. Reload your site and see what happens. Please report back if this works so that this thread can be mark accordingly.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template Error for Viewing Pictures
« Reply #11 on: July 20, 2006, 09:26:40 pm »

Optionally, rename your custom theme's theme.php to theme_old.php. Then copy the file theme.php from the classic folder (the one from the cpg1.4.x package) and you're done.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #12 on: July 20, 2006, 11:18:25 pm »

^I'll try that now, and post back.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #13 on: July 20, 2006, 11:24:07 pm »

Thanks, GauGau! It worked! Just one more quick question. On my theme, you can see "{MAIN_MENU}" under my Gallery header. Should I delete that from the template?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template Error for Viewing Pictures
« Reply #14 on: July 21, 2006, 06:44:16 am »

Do as suggested: read the theme upgrade guide - in your particular case, you're missing the proper menu tokens in template.html. Don't make us spoon-feed you. It's mandatory that you read the docs, especially when being told to. Only questions that are not being answered in the docs should be asked here.

"Just one more question" is not acceptable - we have a "one question per thread" policy that you agreed to respect when signing up. Re-read the board rules.
Logged

katieeeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Template Error for Viewing Pictures
« Reply #15 on: July 21, 2006, 08:14:57 am »

Okay, sorry. Thanks for your help! I'll b sure to read everything.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 16 queries.