Advanced search  

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

Pages: [1]   Go Down

Author Topic: Embedding Coppermine into HTML page.  (Read 8872 times)

0 Members and 1 Guest are viewing this topic.

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Embedding Coppermine into HTML page.
« on: December 01, 2006, 10:40:01 am »

I'd like to know if I can embed Coppermine into an already existing html page.

Is it possible to called Copermine into a tables <td>, for instance?

I know that if this is possible, I'll need to add my css to my theme's css file, and that is not a problem.

I understand that I'll need to make some path changes also so that the Coppermine files and images show properly.

Thanks again.
« Last Edit: December 04, 2006, 09:26:24 pm by GauGau »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Embedding Coppermine into HTML page.
« Reply #1 on: December 01, 2006, 11:42:08 am »

You could use the same theme of your site with Coppermine but they would be separate sites. So if you change the theme on your website, you would have to change it for Coppermine to keep them consistent.

You could use iframes but that's not recommended.

I would recommend using cpmFetch - http://forum.coppermine-gallery.net/index.php?board=87.0. This is a great tool and allows you a lot of control on what's displayed on your website. [edit] I should point out that this isn't the complete gallery. You would still need to have a seperate gallery which means one of the two options above.
« Last Edit: December 01, 2006, 01:17:26 pm by Gizmo »
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #2 on: December 02, 2006, 06:03:59 am »

OK so in other words, there is relaly no way, at least no easy way, to call CM into a page, like you would an ASP.NET database element? Like you say, I'd have to design CM to look like my site, but then I'd have two seperate "sites" that were only linked by a url. Is that right?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Embedding Coppermine into HTML page.
« Reply #3 on: December 02, 2006, 07:45:26 am »

Well, ASP is not related. Generally-speaking, HTML pages are static, so they can't contain dynamic content. Your question doesn't apply in the first place. PHP has the include and require commands that are capable to include content from other pages, but you can't use those functions with Coppermine, as Coppermine needs to be in control of the page header (http-wise), because it needs to read and write cookies. Even using ASP, you couldn't accomplish what you're up to.
Bottom line: what you're up to is not possible. Consider the alternatives Gizmo pointed out.
Logged

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #4 on: December 02, 2006, 08:11:58 am »

GauGau, right. You would need a page that was .asp, not html. Sorry about that. What I want to do I guuess is what you can do with Gallery2. You can see an embedded Gallery2 here:
http://www.logo.org.uk/gallery2/main.php?g2_itemId=345

If you check out the html, you will see where Gallery2 starts and how the html of the main site is built around it. I still haven't figured out exactly what do do to get it like that, but I'm trying :)

Like I said, I've been bouncing back and forth between both Gallery2 and Coppermine to understand waht each gallery offers, and what each does not. I actually like both very much, but they are different.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Embedding Coppermine into HTML page.
« Reply #5 on: December 02, 2006, 08:39:00 am »

If you don't want to use iframes then there is one dirty (but imo clean) way to do it. Contents of your html should be something like this..

Code: [Select]
<html>
<body>
Your html page stuff, header etc..
<object type="text/html" data="http://yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>
</body>
</html>

Change the data url to your correct coppermine url and this should do the trick. I don't know whether this is XHTML compliant or not. But it works ;)
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Embedding Coppermine into HTML page.
« Reply #6 on: December 02, 2006, 02:44:04 pm »

What I want to do I guuess is what you can do with Gallery2.
I have no idea what Menalto Gallery is doing, but as I suggested above: Coppermine can't be included easily into a page. You should do as suggested in the theme section of the docs and create a custom theme instead that mimmicks your overall site. You can include dynamic stuff (e.g. your overall navigation) into coppermine though using "custom_header" and "custom_footer".
Logged

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #7 on: December 03, 2006, 08:13:01 am »

If you don't want to use iframes then there is one dirty (but imo clean) way to do it. Contents of your html should be something like this..

Code: [Select]
<html>
<body>
Your html page stuff, header etc..
<object type="text/html" data="http://yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>
</body>
</html>

Change the data url to your correct coppermine url and this should do the trick. I don't know whether this is XHTML compliant or not. But it works ;)

Abbas, that "object" was what I was thinking when I mentioned asp.net. So what we have here is an embedded CM gallery in an html page, but CM still uses it's own css, etc? Just to make sure I get what you are saying, I could do something like this:

Doctype html etc etc
<head> My css link and other head informtion</head>
<body>
<table> <tr> <td>
<object type="text/html" data="http://yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>
</td> </tr>
</table>
</body>

Just as a simple example?

If this is correct, this is EXACTLY what I was wondering could be done. Thanks alot man! You rock.

One last thing, what exactly is "backup object" ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Embedding Coppermine into HTML page.
« Reply #8 on: December 03, 2006, 11:36:11 am »

Abbas refered to "backup content", not "backup object". This is suppossed to be the content that is suppossed to show when embedding the object fails as a fallback alternative.

Constantly refering to ASP is irrelevant.
Logged

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #9 on: December 04, 2006, 08:43:11 am »

Just a mistake on the "backup object" whicn should have been content as you state.

Mentioning asp is relevant because it helps me express myself, right or wrong. It may give those familiar with ASP and wishing to help an idea of what I have in mnd (e.g., data tables, which act as a sort of embedded object to populate dynamically driven tables). And I was wanting to populate a specific <td> in a specific table. So there is a relation, not completely accurate, in what I am trying to do and asp.net.

Last, obviously my mentioning asp.net did not bother Abbas when I mentioned it, so why does it bother you? You could have just as easily given me the explanation as Abbas did without any type of "irrelevant" comments or anything else. You would do well to take note from how Abbas helps people. I'm fairly tired of your authoritarian and dictatorial tone, and I'll express myself anyway I feel necessary to get my point across. Period. If you do not wish to help me, then simply don't. (and as I've stated numerous times, I apprecaite your help.)

For others who may read this, please accept my apology for stating this out-rightly. But I too have limits to how long I let people talk to me in a condescending tone. I don't apprecaite it, and I've read at least one other thread that says something similar about GauGau.
Logged

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #10 on: December 04, 2006, 08:51:38 am »

And one other thing GuaGua:

How irelevant is your stating that mentioning asp is irrelevant when I actually have a legitimate, relevant, ontopic question right above your post that you don't even address? That question is the ONLY "relevant" part of that post.

To reiterate, using Abbas' method above, I could do something like this then?

Doctype html etc etc
<head> My css link and other head informtion</head>
<body>
<table> <tr> <td>
<object type="text/html" data="http://yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>
</td> </tr>
</table>
</body>
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Embedding Coppermine into HTML page.
« Reply #11 on: December 04, 2006, 08:59:12 am »

Yes you can do... But i don't think that coppermine will pick up your html page's css. Coppermine will still be using its own CSS. Try it and see how it looks.
Logged
Chief Geek at Ranium Systems

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #12 on: December 04, 2006, 11:23:09 am »

Yes you can do... But i don't think that coppermine will pick up your html page's css. Coppermine will still be using its own CSS. Try it and see how it looks.

Abbas. That would be ok. I actually prefer that CM use its own css because there are so many css classes that involve CM spacing, margins, etc.

 I'm going to try it pretty soon. I'll give you a link so you can see what it did.

I'm still trying to do something similar with G2 also.

Thanks again for your method and help.
Logged

tattoo-me

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Embedding Coppermine into HTML page.
« Reply #13 on: January 07, 2007, 11:05:26 pm »

I have used this object code supplied by Abbas

<object type="text/html" data="http://www.yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>

I had to change the width of the main table in admin-config to get it to fit in my html template and also resize the coppermine logo but it seems to work ok.

If you want to have a look go here http://www.tattoo-me.info/Tattoo_picture_gallery.html  please register and upload some photos and let me know if you have any problems
Logged

dwdallam

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: Embedding Coppermine into HTML page.
« Reply #14 on: January 08, 2007, 10:08:18 am »

I have used this object code supplied by Abbas

<object type="text/html" data="http://www.yourdomain.com/gallery/" width="100%" height="100%">
<p>backup content</p>
</object>


Then I think you did more than you needed to do. You have it in an Iframe, and when you use and iframe, you don't need to embed it. The reason I was looking for an embedding option was to get rid of iframes.
Logged

Nikko

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Kiss Bar Torremolinos Spain
Re: Embedding Coppermine into HTML page.
« Reply #15 on: February 04, 2007, 08:31:48 pm »

Just a mistake on the "backup object" whicn should have been content as you state.

Mentioning asp is relevant because it helps me express myself, right or wrong. It may give those familiar with ASP and wishing to help an idea of what I have in mnd (e.g., data tables, which act as a sort of embedded object to populate dynamically driven tables). And I was wanting to populate a specific <td> in a specific table. So there is a relation, not completely accurate, in what I am trying to do and asp.net.

Last, obviously my mentioning asp.net did not bother Abbas when I mentioned it, so why does it bother you? You could have just as easily given me the explanation as Abbas did without any type of "irrelevant" comments or anything else. You would do well to take note from how Abbas helps people. I'm fairly tired of your authoritarian and dictatorial tone, and I'll express myself anyway I feel necessary to get my point across. Period. If you do not wish to help me, then simply don't. (and as I've stated numerous times, I apprecaite your help.)

For others who may read this, please accept my apology for stating this out-rightly. But I too have limits to how long I let people talk to me in a condescending tone. I don't apprecaite it, and I've read at least one other thread that says something similar about GauGau.

Hear hear!!
I think everyone has noticed his attitude. Lighten up GauGau!!
Logged
Pages: [1]   Go Up
 

Page created in 0.046 seconds with 20 queries.