Template Error for Viewing Pictures Template Error for Viewing Pictures
 

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

Main Menu

Template Error for Viewing Pictures

Started by katieeeee, July 20, 2006, 01:46:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

katieeeee

This is what I get whenever I click on a thumbnail:

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??

Gizmo

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:

// 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;
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

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

Gizmo

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.
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

Quote from: Gizmo on July 20, 2006, 03:26:02 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.

katieeeee

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.

Joachim Müller

Quote from: katieeeee on July 20, 2006, 05:46: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.

katieeeee

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.

katieeeee

Quote from: Gizmo 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:

// 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?

katieeeee

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?

Gizmo

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.
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

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.

katieeeee


katieeeee

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?

Joachim Müller

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.

katieeeee

Okay, sorry. Thanks for your help! I'll b sure to read everything.