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: making new function in theme.php  (Read 2252 times)

0 Members and 1 Guest are viewing this topic.

veez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
making new function in theme.php
« on: April 08, 2008, 06:27:46 am »

Hello,  I had a question from another thread, which I must have confused a lot of people. so I would like to start fresh here.
link to previous threadhttp://forum.coppermine-gallery.net/index.php/topic,51245.0.html

objective: to do string manipulation after obtaining the full url to the intermediary pictures

Example:  mysite.com/album/uploads/pic1/picture1.jpg

Where:  use it in theme.php


From the previous thread with the help from the fellow members:

I tried making a new function in theme.php

Code: [Select]
function newfunction()
{

global $lang_picinfo, $CURRENT_PIC_DATA;


$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
$name = 'http://mysite.com/' . $picture_url;

return $name;
}

Then I assign the function to a variable:
Code: [Select]
$picture_path=newfunction();
Then to display the result, I put it into $template_display_media, just after the EOT

Code: [Select]
$template_display_media = <<<EOT
$picture_path
..
..


But I keep getting a blank output.

would appreciate the help
thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.