[Solved]: Include into web page? [Solved]: Include into web page?
 

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

[Solved]: Include into web page?

Started by bsbuckeye21, August 14, 2004, 02:24:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bsbuckeye21

Is it possible to include using php Coppermine into an existing page.  In other words, instead of creating a theme to match your site, just include Coppermine into an existing page on your site?

My site is divided up into different sections, all with their own gallery categories.  I'd like to be able to just have the appropriate category included within the web page instead of going into the gallery, since each page has a unique header.

Has any one done this?  Is this possible?  Thanks for such a great gallery! ;D

skybax

Fortuantly, there are @ least four ways to accomplish this.

1) Build your site around CM (ok so that's not really an option)
2) Use a bridge for a third party CMS (check documentation)
3) Use the SSI mod though not officially supported (more info)
4) Use the RSS mod *recommended* (more info)

-T 8)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

Joachim Müller

I think bsbuckeye21 wants the actual coppermine html output to be embedded on his page. You can not do that using the php commands "include" or "require". If you shy away from creating a theme that matches the rest of your site, you can always add coppermine to your page using an <iframe> - with all the drawbacks an iframe has. I recommend creating a custom theme that matches your site. Posting a link to your site would have resulted in a more detailed explanation... ;)

GauGau

P.S. Next time, post support requests on the proper support board, not "general discussion" because if you wanted someone to answer your question in general, the answer would have been "yes", "no", "maybe" or "I don't know". As you surely want a more detailed answer, your question should have gone into support...

bsbuckeye21

Thanks, skybax!  I'll give the RSS feed a try.

I posted in general because I didn't know if it already existed, or I was requesting a feater--just if it was possible.

Thanks for the replies.

bsbuckeye21

The RSS feed didn't turn out to be exactly what I was looking for.  After searching aroudn the boards a bit further, I'm simply including a custom header and footer depending on the category.  Example of theme.php:



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


   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(),
   );

global $cat; 
if ($cat == "2") { include('a_header.php'); }
elseif ($cat == "3") { include('a_header.php'); }
elseif ($cat == "4") { include('a_header.php'); }
elseif ($cat == "5") { include('a_header.php'); }
elseif ($cat == "6") { include('b_header.php'); }
elseif ($cat == "10") { include('b_header.php'); }
else { include('home_header.php'); }

   echo template_eval($template_header, $template_vars);
}


Thanks again for the help.