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: full url tag  (Read 3055 times)

0 Members and 1 Guest are viewing this topic.

avdv78

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
full url tag
« on: August 21, 2004, 01:55:40 pm »

Hi,

What's the tag for the full url of a picture? (in theme.php, http://www.mydomain.com/albums/pic01.jpg)

thanks!
« Last Edit: September 03, 2004, 11:19:18 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: full url tag
« Reply #1 on: August 21, 2004, 10:56:12 pm »

try $picture_url (but in fact it depends on the context where you actually want to use it - not all vars exist everywhere). If the var $picture_url doesn't work for you, post more details.

GauGau
Logged

avdv78

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: full url tag
« Reply #2 on: September 01, 2004, 05:09:01 pm »

Thank you, but i doesn't show. Here are more details. Thank you!

I need a tag wich contains the full url to an image to show on displayimage.php.
Not this link: http://www.hekijknou.nl/fotoalbum/displayimage.php?pos=-5645 but this link: http://www.hekijknou.nl/fotoalbum/albums/2004_35_01/IMG_0001.jpg

When you open this page: http://www.hekijknou.nl/fotoalbum/displayimage.php?pos=-5645 you will see that i've added an row with has this text: Maak gebruik van onze afdrukservice (i.s.m. foto Verschoore)
I want to add another row wich says something like: Send this photo as a real card (not an e-card). When you click it, it should go to http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id=10-10-20

But card_id should not be 10-10-20 but: http://www.hekijknou.nl/fotoalbum/albums/2004_35_01/IMG_0001.jpg

So i need a tag ($picture_url) so that i can make a link in theme.php: <a href="http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id=$picture_url" target="_blank">Send this photo as a real card (not an e-card)</a>

The adress that shows in the browser should be: http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id=http://www.hekijknou.nl/fotoalbum/albums/2004_35_01/IMG_0001.jpg


Example (theme.php):
Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

      <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>
      <tr>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="100%">
            <a href="http://www.hekijknou.nl/weblog/verschoore.html" onClick="window.open('http://www.hekijknou.nl/weblog/verschoore.html','7741','width=380,height=350,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,left=0,top=0,screenx=50,screeny=50');return false">Maak gebruik van onze afdrukservice (i.s.m. foto Verschoore)</a>
            </td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
      </tr>
      <tr>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="100%">
            <a href="http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id={picture_url}" target="_blank">Send this photo as a real card (not an e-card)</a>
            </td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
            <td align="center" valign="middle" class="navmenu" width="48">&nbsp;</td>
      </tr>
EOT;
« Last Edit: September 02, 2004, 08:15:17 am by avdv78 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: full url tag
« Reply #3 on: September 02, 2004, 07:30:34 am »

$picture_url exists in displayimage.php, but not in theme.php
To do what you're looking for, edit displayimage.php, find
Code: [Select]
            $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
        }
and replace with something like
Code: [Select]
            $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
            $pic_html .= "<br />\n";
            $pic_html .= "<a href=\"http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id=".$CONFIG['ecards_more_pic_target'].$picture_url."\" target=\"_blank\"> Send this photo as a real card (not an e-card)</a>\n";
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
            $pic_html .= "<a href=\"http://sendacard.posthuis.nl/index.php?client_id=xxxxxx&card_id=".$CONFIG['ecards_more_pic_target'].$picture_url."\" target=\"_blank\"> Send this photo as a real card (not an e-card)</a><br />\n";
        }
(not tested though).

Joachim

P.S. I can't make heads or tails of the code you posted, with all this color and highlighting. Please use the bbcode tag [ c o d e ]echo 'Hello world';[ / c o d e ]  (without the spaces) to denote code in postings on this (and other) boards.
Logged

avdv78

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: full url tag
« Reply #4 on: September 03, 2004, 12:20:56 pm »

Thanks! This is what i was looking for  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 21 queries.