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: Adding text to .php 's  (Read 3915 times)

0 Members and 1 Guest are viewing this topic.

Dankriss

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Female
  • Posts: 97
    • Nikmania
Adding text to .php 's
« 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 :)
Logged
Good with HTML and CSS but no good with script... so please bear with me.. :)

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Dankriss

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Female
  • Posts: 97
    • Nikmania
Re: Adding text to .php 's
« Reply #2 on: December 26, 2013, 11:04:31 pm »


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

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

Dankriss

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Female
  • Posts: 97
    • Nikmania
Re: Adding text to .php 's
« Reply #3 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  :)
Logged
Good with HTML and CSS but no good with script... so please bear with me.. :)

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Adding text to .php 's
« Reply #4 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.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Dankriss

  • Coppermine regular visitor
  • **
  • Country: gb
  • Offline Offline
  • Gender: Female
  • Posts: 97
    • Nikmania
Re: Adding text to .php 's
« Reply #5 on: December 27, 2013, 08:07:38 am »


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

Kriss  :)
Logged
Good with HTML and CSS but no good with script... so please bear with me.. :)
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.