Adding text to .php 's Adding text to .php 's
 

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]

Main Menu

Adding text to .php 's

Started by Dankriss, December 26, 2013, 01:39:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dankriss

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 :)
Good with HTML and CSS but no good with script... so please bear with me.. :)

phill104

It is a mistake to think you can solve any major problems just with potatoes.

Dankriss


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

Kriss  :)
Good with HTML and CSS but no good with script... so please bear with me.. :)

Dankriss


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  :)
Good with HTML and CSS but no good with script... so please bear with me.. :)

gmc

Kriss,
You missed a period in the line you added...
$pic_html .= 'Click on image...';

The .= adds your content to the $pic_html set above... The = alone replaces the content.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Dankriss


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

Kriss  :)
Good with HTML and CSS but no good with script... so please bear with me.. :)