Eigene .php Files in Startseite einbinden?? Eigene .php Files in Startseite einbinden??
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Eigene .php Files in Startseite einbinden??

Started by DeMoehn, April 26, 2007, 06:03:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DeMoehn

Hey Leute.

Coppermine ist immer noch so ein Rätsel für mich ;)
Bin nun etwas eingestiegen. Design etwas angepasst.

Die Seite ist hier: http://www.luxus-body.de/cpg1410/index.php

Ich möchte nun links noch eine Spalte einfügen mit Produkten aus dem Shop.
Kann mir einer sagen wie ich eigene Scripte einfügen kann?

Greetz, DeMoehn

Stramm

Als Schlagworte zur Suche werfe ich mal

anycontent.php
custom header
custom footer

in den Raum

DeMoehn

Vielen Dank.
Das hilft mir doch schon weiter.

Greetz, DeMoehn

DeMoehn

Vielen Dank, wurde fündig...

Hiermit habe ich das ganze eingebunden.

function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

        $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        header("Content-Type: text/html; charset=$charset");
    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        '{SHOP_MOD}' => cpg_get_custom_include_2(),
        );

    echo template_eval($template_header, $template_vars);
}
/**
* cpg_get_custom_include_2()
*
* @param string $path
* @return
**/
function cpg_get_custom_include_2()
{
    global $CONFIG;
    $path2 = 'shop/shop.php'; // path to file from root
    $return = '';

    // check if the include file exists
    if (!file_exists($path2))
    {
        return $return;
    }
    ob_start();
    include($path2);
    $return = ob_get_contents();
    ob_end_clean();
    // crude sub-routine to remove the most basic "no-no" stuff from possible includes
    // could need improvement
    $return = str_replace('<html>', '', $return);
    $return = str_replace('<head>', '', $return);
    $return = str_replace('<body>', '', $return);
    $return = str_replace('</html>', '', $return);
    $return = str_replace('</head>', '', $return);
    $return = str_replace('</body>', '', $return);
    return $return;
}


Thanks, DeMoehn

Stramm

einfacher wäre trotzdem gewesen, die anycontent.php oder den custom header/ footer zu verwenden.

Trotzdem Danke für den code