Inserting "Click on image to view larger image" below intermediate image Inserting "Click on image to view larger image" below intermediate image
 

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

Inserting "Click on image to view larger image" below intermediate image

Started by kiwibrit, December 14, 2006, 11:25:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kiwibrit

I'd like to display "Click on image to view larger image" below the intermediate image where the final picture is larger than the intermediate image.  At first look, this seems doable, since the option to click in such situations is inherently there already.

I suspect someone has already thought of this - in which case please point me at the reference - but I have studied the config page, the documentation, and searched the forum, and not found the answer.

If I can be pointed at where the image is given the link capability, I think I have enough php knowledge to take it from there.

Nibbler


kiwibrit

Thanks.  I haven't figured it out,yet, But I'll play with that.

kiwibrit

Getting there.  I've gone to include/makers/themes.inc.php

then to line 714

and reserved the line, as it were:


<!-- BEGIN Advice to click for larger image -->
<tr>
<td class="tableb"><center><em>Click image for larger display if available.</em></center></td>
</tr>
<!-- END advice to click for larger image -->


Joachim Müller

Quote from: kiwibrit on December 16, 2006, 01:16:04 PM
Getting there.  I've gone to include/makers/themes.inc.php
Such a file doesn't exist. The file you're refering to probably is include/themes.inc.php. However, you mustn't edit that file - under no circumstances. Edit themes/yourtheme/theme.php instead.

kiwibrit

Quote from: GauGau on December 16, 2006, 02:27:35 PM
Such a file doesn't exist. The file you're refering to probably is include/themes.inc.php. However, you mustnÄt edit that file - under no circumstances. Edit themes/yourtheme/theme.php instead.

My bad for the file address, thanks for pointing that out, and the need to leave that file alone. Following code now appears themes/yourtheme/theme.php :


// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN Advice to click for larger image -->
<tr>
<td class="tableb"><center><em>Click image for larger display if available.</em></center></td>
</tr>
<!-- END advice to click for larger image -->

<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;


Text appears where it should.  Next step will be to dig out image width/height so that larger image text appears when needed only.

kiwibrit

Quote from: Nibbler on December 15, 2006, 12:29:41 AM
Check theme_html_picture() in the theme system.

Thanks, I deleted my earlier coding in theme.php and inserted the following inside function theme_html_picture()

if ($CURRENT_PIC_DATA['pwidth']>400) {$CURRENT_PIC_DATA['caption']=$CURRENT_PIC_DATA['caption']."<br /><br /> <em>Click picture for larger image</em>";}//intermediate picture width is 400.


That achieves the immediate result I was after.  However, it would be nice to have the  variable for the intermediate picture width in the line, rather than 400, in case I set a different width.  I haven't spotted the variable - could you tell me what it is?

Joachim Müller


kiwibrit

Yup, it does.  Thank you for your help, guys.  Problem fully resolved.