Embedding Coppermine into HTML page. Embedding Coppermine into HTML page.
 

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

Embedding Coppermine into HTML page.

Started by dwdallam, December 01, 2006, 10:40:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dwdallam

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.

Gizmo

#1
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.
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

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?

Joachim Müller

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.

dwdallam

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.

Abbas Ali

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


<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 ;)
Chief Geek at Ranium Systems

Joachim Müller

Quote from: dwdallam on December 02, 2006, 08:11:58 AM
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".

dwdallam

Quote from: Abbas Ali 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..


<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" ?

Joachim Müller

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.

dwdallam

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.

dwdallam

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>

Abbas Ali

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.
Chief Geek at Ranium Systems

dwdallam

Quote from: Abbas Ali 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.

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.

tattoo-me

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

dwdallam

Quote from: tattoo-me 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>


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.

Nikko

Quote from: dwdallam 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.

Hear hear!!
I think everyone has noticed his attitude. Lighten up GauGau!!