basicly i want to create a menu with the Categorys as apposed to the standard layout.
i would like it so in the template i can simpliy add something like {CATS} and then configure theme.php to produce the required code.
but how do i change themes.php, i.e how do i create my own inclusions into the template.html ?
i hope this makes sense to some one :D
cheers
Ted
btw heres the addy if it helps http://www.northerndescent.wired-hub.net/pics/
no, won't work that way (at least not that easily). I suggest you take a look at the faq, look for http://coppermine.sourceforge.net/faq.php?q=customHeader#customHeader
GauGau
i get the following error when i add that code:
QuoteParse error: parse error, expecting `','' or `';'' in /home/northern/public_html/pics/themes/pug205/theme.php on line 656
Fatal error: Call to undefined function: pageheader() in /home/northern/public_html/pics/index.php on line 439
if(empty($custom_header)){
include('custom.php');
static $custom_header = ob_get_contents();
error some where here ob_clean();
}
can anyone help ?
cheers :) [/quote]
a parse error should be easy to track, it usually means you've ommited a semicolon, bracket or quote (it's in fact the most common php error). Please double-check your code.
GauGau
yeah i hav highlighted the parse error above (bold)
but as i don't know php i don't know whats missing etc.
cheers
Ted
Try:if(empty($custom_header)){
require("http://www.path.to/include.file");
$custom_header = ob_get_contents();
ob_clean();
}
:)
yep thats fixed the errors
but it still doesn't include the custom file.
i have checked the path to the file and its perfect.
heres the complete code:
Quotefunction pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
require('custom.php');
$custom_header = ob_get_contents();
ob_clean();
}
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
user_save_profile();
$template_vars = array(
'{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
'{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{MAIN_MENU}' => theme_main_menu(),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
);
echo template_eval($template_header, $template_vars);
}
not sure if i'v missed anything
cheers
t.
use the absolute path or the uri for require('custom.php');
GauGau
still no luck :oops:
thanks for all your help so far
i'm not sure what i am trying to do is 100% necessary either
if you look at my dev project :
http://www.northerndescent.wired-hub.net/pics/
you see
Quote> Team Riders
.......................................
> Race Images
.......................................
basicly i want to move that to
Quote> SEGSG
.......................................
> SEGSEG
.......................................
> SGSEG
.......................................
i know i could use CSS to position it there but i would rather position it there in the table.
So is there anyway i can just get the cats to display here?
could i some how put the cats in the things used in the template,
i.e
{GAL_NAME}
{GAL_DESCRIPTION}
{GALLERY}
so i could then create my own {cats go here} thing ?
hope this makes sense :?
cheers
Ted
you could, if you know enough php.
If I were you, I'd go for the custom header, or even better: just enter the menu statically (in template.html) - I don't think you'll change your menu/navigation structure that often...
GauGau
yeah it think you right with the static idea 8)
just would have been great to be able to have a dynamic layout
thanks for the help anyway :D
expect a few more question like this one to come :wink: