forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: stephunkin on February 11, 2004, 10:39:53 pm

Title: Help - Trying to add some HTML below the image
Post by: stephunkin on February 11, 2004, 10:39:53 pm
In displayimage.php in the html_picinfo() function there is some code which I think displays the following items in the following order:
        $params = array(
                '{CELL_HEIGHT}' => '100',
                '{IMAGE}' => $pic_html,
                '{ADMIN_MENU}' => $picture_menu,
                '{TITLE}' => $CURRENT_PIC_DATA['title'],
                '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

I have added the following code above it:

$filename= $CURRENT_PIC_DATA['pname']; // doesnt get the filename :(
       
$buyme = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('http://www.mysite.com/catalog/advanced_search_result.php?keywords=". $filename."','buyMe','location=yes,toolbar=yes,status=yes,resizable=yes')\"><img src=\"/albums/button_buy_now.gif\" border=\"0\"></a><br />\n";        

in the array I am trying to add buyme like so:
$params = array(
                '{CELL_HEIGHT}' => '100',
                '{IMAGE}' => $pic_html,
           '{BUYME}' => $buyme,
                                '{ADMIN_MENU}' => $picture_menu,
                '{TITLE}' => $CURRENT_PIC_DATA['title'],
                '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

I dont get a parse error but it also does not work.  If i just echo buyme it shows the button at the top L corner of the screen.  Is there a way to add it to the array?  Any ideas?          
Also, $CURRENT_PIC_DATA['pname'];  does not give me the filename.  Any idea where global variables are defined?
Thanks,
S
Title: Re: Help - Trying to add some HTML below the image
Post by: ShadowX on July 10, 2004, 08:18:49 pm
Actually, I'm trying to do the same thing an I'm having a similar problem.  Anyone have any input on this?
Title: Re: Help - Trying to add some HTML below the image
Post by: Joachim Müller on July 10, 2004, 08:47:49 pm
try using  $pic_html instead of $CURRENT_PIC_DATA['pname'];
Adding your var to the params won't help you at all, since there's no corresponding code im your theme.php

Take a look at the mods section of this board as well, Casper just recently posted a hack that does something similar you're up to, using PayPal.

GauGau