Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Solved]: Include into web page?  (Read 4556 times)

0 Members and 1 Guest are viewing this topic.

bsbuckeye21

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[Solved]: Include into web page?
« on: August 14, 2004, 02:24:53 am »

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
« Last Edit: August 17, 2004, 09:16:11 am by GauGau »
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Include into web page?
« Reply #1 on: August 14, 2004, 07:06:43 am »

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)
Logged
(http://www.skybax.com/hotImage/post_footer.gif)
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Include into web page?
« Reply #2 on: August 14, 2004, 07:10:36 pm »

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

bsbuckeye21

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Include into web page?
« Reply #3 on: August 15, 2004, 07:41:48 am »

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

bsbuckeye21

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Include into web page?
« Reply #4 on: August 16, 2004, 09:36:40 pm »

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:

Code: [Select]

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.