coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: emilianors on February 26, 2009, 05:13:17 AM

Title: Problem adding custom placeholders
Post by: emilianors 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
// 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.
Title: Re: Problem adding custom placeholders
Post by: Joachim Müller on February 26, 2009, 08:06:00 AM
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 (http://www.php.net/manual/de/function.include.php) 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.
Title: Re: Problem adding custom placeholders
Post by: emilianors on February 27, 2009, 03:22:14 AM
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 (http://www.php.net/manual/de/function.include.php) 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
Title: Re: Problem adding custom placeholders
Post by: Joachim Müller on February 27, 2009, 08:16:53 AM
Quote from: emilianors on February 27, 2009, 03:22:14 AM
couldn't make it work.
Means want? Elaborate!