Problem adding custom placeholders Problem adding custom placeholders
 

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

Problem adding custom placeholders

Started by emilianors, February 26, 2009, 05:13:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

emilianors

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
// 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.

Joachim Müller

Quote from: emilianors on February 26, 2009, 05:13:17 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.

Quote from: emilianors on February 26, 2009, 05:13:17 AM
   $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.

emilianors

Quote from: Joachim Müller on February 26, 2009, 08:06:00 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

Quote from: Joachim Müller on February 26, 2009, 08:06:00 AM
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

Joachim Müller