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: Problem adding custom placeholders  (Read 2751 times)

0 Members and 1 Guest are viewing this topic.

emilianors

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Problem adding custom placeholders
« on: February 26, 2009, 05:13:17 am »

hi all,
i read and tried everything i could on this site and im getting crazy since yesterday.
i tried a lot of things i read here, i did the header before GALLERY and footer after...

im under cpg1420 using "i-feel-dirty" Theme, which im modifiting.

the link is http://www.emi.drbaraka.com.ar/cpg1420/
there custom placeholders below "Links"

Code theme.php
Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    $custom_footer = cpg_get_custom_include($CONFIG['test.php']);
    $album_updates = cpg_get_custom_include($CONFIG['./test.php']);

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

    $template_vars = array(
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{CUSTOM_FOOTER}' => $custom_footer,
'{ALBUM_UPDATES}' => $album_updates,
'{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );

    echo template_eval($template_footer, $template_vars);
}

note:
   $album_updates = cpg_get_custom_include($CONFIG['./test.php']);
the link of the real php is: http://www.emi.drbaraka.com.ar/cpg1420/themes/i-feel-dirty/test.php
i tried:
$album_updates = cpg_get_custom_include($CONFIG['./test.php']);
$album_updates = cpg_get_custom_include($CONFIG['/test.php']);
$album_updates = cpg_get_custom_include($CONFIG['http://www.emi.drbaraka.com.ar/cpg1420/themes/i-feel-dirty/test.php']);

can't make it work.

any help will be great.
thank u for read.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem adding custom placeholders
« Reply #1 on: February 26, 2009, 08:06:00 am »

the link is http://www.emi.drbaraka.com.ar/cpg1420/
Not a bright idea to use such a version-dependant URL. Cool URIs never change, so you should change http://www.emi.drbaraka.com.ar/cpg1420/ to http://www.emi.drbaraka.com.ar/gallery/ or http://www.emi.drbaraka.com.ar/pictures/ or whatever.

   $album_updates = cpg_get_custom_include($CONFIG['./test.php']);
the link of the real php is: http://www.emi.drbaraka.com.ar/cpg1420/themes/i-feel-dirty/test.php
i tried:
$album_updates = cpg_get_custom_include($CONFIG['./test.php']);
$album_updates = cpg_get_custom_include($CONFIG['/test.php']);
$album_updates = cpg_get_custom_include($CONFIG['http://www.emi.drbaraka.com.ar/cpg1420/themes/i-feel-dirty/test.php']);

can't make it work.
That's because yours is not actual code but just wishfull thinking. I can't even think where to start modifying your proposed code.
Look up PHP's native include command. Read up about relative and absolute paths.
Don't use includes if you don't understand the underlying basics about paths. Don't even try to include by URL.
Logged

emilianors

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem adding custom placeholders
« Reply #2 on: February 27, 2009, 03:22:14 am »

Not a bright idea to use such a version-dependant URL. Cool URIs never change, so you should change http://www.emi.drbaraka.com.ar/cpg1420/ to http://www.emi.drbaraka.com.ar/gallery/ or http://www.emi.drbaraka.com.ar/pictures/ or whatever.
agree, thing is im working in this hosting to move next to the one with my domain, just saving time

That's because yours is not actual code but just wishfull thinking. I can't even think where to start modifying your proposed code.
Look up PHP's native include command. Read up about relative and absolute paths.
Don't use includes if you don't understand the underlying basics about paths. Don't even try to include by URL.
i got your point, i read the link(s) you sent me and tried differents url and stuff,
thing is i understand there's a mayor problem, or something i can't handle or know enought about,
what i did in the beggining was do what i see in the next link http://forum.coppermine-gallery.net/index.php/topic,37226.0.html and couldn't make it work..

is there any "easiest" way to do this? or another way to help me out with this?


any help is VERY welcome

thank u
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem adding custom placeholders
« Reply #3 on: February 27, 2009, 08:16:53 am »

couldn't make it work.
Means want? Elaborate!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.