forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Dankriss on December 26, 2013, 01:39:24 pm

Title: Adding text to .php 's
Post by: Dankriss on December 26, 2013, 01:39:24 pm
I would like to add some text under the displayed image to say 'Click on image to get full size image in a new window'.

The only problem I have is that I don't know script at all so can't work out how to put text onto a page through the .php... if I have to use that :D 

If anyone can help me to do this I would be most grateful as I have people who keep asking for the full size image and I don't really want to put it on the theme template as it just ruins the look of the site.

Thanks in advance

Kriss :)
Title: Re: Adding text to .php 's
Post by: phill104 on December 26, 2013, 11:02:06 pm
http://forum.coppermine-gallery.net/index.php/topic,76842.0.html
Title: Re: Adding text to .php 's
Post by: Dankriss on December 26, 2013, 11:04:31 pm

Thank you!  will try that out...  ;D

Kriss  :)
Title: Re: Adding text to .php 's
Post by: Dankriss on December 27, 2013, 12:01:30 am

Ok I tried that and it just adds the words to the top of the screen....  ???

I found this after copying it to the theme.php...

Quote
} elseif ($mime_content['content']=='document') {
        $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a><br />" . $LINEBREAK;

I then put in the code like this...

Quote
$pic_html = 'Click on image to enlarge to full size, it will open in a new window';   
} elseif ($mime_content['content']=='document') {
        $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a><br />" . $LINEBREAK;

Can you tell me what I am doing wrong...  :)

Thanks

Kriss  :)
Title: Re: Adding text to .php 's
Post by: gmc on December 27, 2013, 03:19:57 am
Kriss,
You missed a period in the line you added...
Code: [Select]
$pic_html .= 'Click on image...';
The .= adds your content to the $pic_html set above... The = alone replaces the content.
Title: Re: Adding text to .php 's
Post by: Dankriss on December 27, 2013, 08:07:38 am

THANK YOU!   now working ok...  one day I might teach myself PHP and script....  ;D

Kriss  :)