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: Custom Headers Part 2  (Read 7039 times)

0 Members and 1 Guest are viewing this topic.

rvblog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Custom Headers Part 2
« on: January 20, 2005, 04:20:37 pm »

The other post was marked solved so I had start another topic. Sorry about that.


Just out of curiosity:

As I said earlier, I had all kinds of problems getting coppermine to include my wordpress header.php and footer.php files. I dropped that idea on the advice of donnoman.

Late last night I tried the reverse. Yes, I got the dumb idea to try to get wordpress to include coppermine using a wordpress template to avoid all the function calling issues using the other method. Yes, I sure am a sucker for punishment I guess.

Anyways, I made this wordpress template:

Code: [Select]
<?php /*
         Template Name: Photo
      */
?>

<?php include "header.php"?>
<div id="content">
<h2>Coppermine Test Page</h2>
<?php include ("http://www.rvadventure.ca/photos/index.php"); ?>
</div>
<?php include('footer.php'); ?>

The results were:

The wordpress template loaded ok, my header and footer files were both intact, as was the overall layout structure of my webpage, and the hardwired theme was included inside of my content div along with all the empty boxes for my thumbnails etc.  (although hardwired's width would have to be adjusted later using css along with other things).

When I first saw it on the screen, I thought I finally had it, and almost knocked my coffee off the table - but I soon discovered that the links did not work.

Clicking on "user galleries" brought me to http://rvadventure.ca/index.php?cat=1 which was a category archive inside wordpress.

Clicking on "most viewed" brought me to a not found page.

So it appears that wordpress can include coppermine but once it is included, coppermine looks for its files within the wordpress structure. When I looked inside of the hardwired theme file, I checked out the links and noticed a lot of href= tags.


I understand wordpress ok, but you guys understand how coppermine works. So now my question is:

Is there some kind of code in the hardwired theme.php that can be added, removed, or changed that would allow coppermine, when included into the wordpress template, to look for files back in its own directory - in other words, all href= tags would link back to the coppermine directory.

I'm going to try over the next couple of days to change all href tags manually to see what happens.

It would be nice however, if there was one piece of code that you could add at the beginning of a theme.php that would redirect all link paths back to the coppermine directory.

This is closer than I got trying the other method, and now I'm hooked again on trying to resolve the problem.

If I'm lucky enough to get this working, I'm sure there would be some other wordpress users that I have talked to in the forums there, who would move to coppermine if this were possible to do. I could even post a "how to" on my website regarding wordpress and coppermine - again, as a way to return a favour and pass on the help that I got.

Any help would be appreciated

Thank you.


Also:

I'm not done coding a theme for my site yet, but I'll turn it on for a while so you can see first hand how far I have gone with this - by looking at the problem visually, it may give someone an idea of how to fix it.

The site is here :   http://www.rvadventure.ca/photo

Again, thanks
Logged

rvblog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Re: Custom Headers Part 2
« Reply #1 on: January 20, 2005, 04:25:58 pm »

By the way,

Any suggestions on which sections in the hardwired theme.php file I should start with, or pay special attention to, when trying to manually change all the href= paths ??
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Custom Headers Part 2
« Reply #2 on: January 20, 2005, 05:23:01 pm »

ahh if it were only that easy.

It won't work without A LOT of programming changes in Coppermine.

Also one thing you should do right now before going further is run the resulting worpress + coppermine page through a validator.

You'll find a ton of errors.  Basically your browser is being nice about the situation and displaying as much as it can, but you are probably confusing the browser terribly.

Coppermine wasn't built to be included in the context of another page, it expects to have full control of the headers and be the sole templating engine.  It won't work for you in the long run for the same reasons including wordpress functions in Coppermine won't work.

I would suggest coming up with a side by side arrangement with links from wordpress to your gallery and from your gallery back to wordpress.

To give you an idea of what I'm talking about check out my own site.  http://www.blueoxhardwoodflooring.com

I wrote custom pages that LOOK like the coppermine theme HARDWOOD, and when you are on the main page you are using those custom pages (actually I built an interpreter for a coppermine theme to create my little tiny cms, so I cheated a little bit ;) )  There's a link to the gallery, and on my gallery theres a link back to the main pages. It's all seamless but it uses two different themes to accomplish it. The one for my main site is totally separate from the gallery.

There are a couple other threads that touch on trying to run coppermine in a skin or something like that, you might want to do a search on that before going down this road too far.
Logged

rvblog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Re: Custom Headers Part 2
« Reply #3 on: January 20, 2005, 05:43:11 pm »

Thanks donnoman,

I'll take your advice, once again. Last night was just another crazy idea. I get those often. But that's how I learn all this stuff, by playing around with everything.

Anyways, it appears that Wordpress and Coppermine go to "separate schools together" (I think that's a catholic joke).

So I'll do what you advise, something that I was originally going to do in the first place, because it is the easiest way. I was just trying to see if true integration was possible.

So I'll start working on a coppermine theme that looks like my site theme and link to it.

By the way, that's a very nice gallery theme you have there. If my ends up looking half that good I'll be more than pleased.

Thanks again for all your help.

Logged

rvblog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Re: Custom Headers Part 2
« Reply #4 on: January 20, 2005, 05:51:56 pm »

But I'll keep playing around with the integration theory on the side as a sort of pet project - unfortunately, analytical reasoning often suggests that nothing is impossible - never say die.

My wife's response to that is that I'm just a little hardheaded at times as well. LOL

Oh well.
Logged

betan

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 47
Re: Custom Headers Part 2
« Reply #5 on: January 21, 2005, 03:47:09 am »

load your word press using anycontent.php.
then hide the category list/album list  and just show one row of last update. that will be less painful. :)

but then again don't listen to me, im illiterate when it comes to html/php and css

i still have to figure out how to solve my problerm which is here
Logged

rvblog

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Re: Custom Headers Part 2
« Reply #6 on: January 21, 2005, 04:23:43 pm »

@betan:

Sorry but you lost me there.

Quote
load your word press using anycontent.php.
then hide the category list/album list  and just show one row of last update. that will be less painful.

Can you explain what you mean a little further ?

I don't know much php either.

How is anycontent used to load wordpress ?

What is meant by: hide category list/album list and just show one row of last update ? - and how do you do that ?

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Headers Part 2
« Reply #7 on: January 21, 2005, 04:35:44 pm »

I'm sorry, I understand that betan is only trying to help and be nice, but using anycontent is not an option - it'll result in exactly the same issues you experienced when you tried to integrate your wordpress files into coppermine (on the other thread that discussed this).
To clarify this: you can use anycontent to do some basic php stuff, but you can not include fully-flavoured php pages that have a theming/template engine of their own. Betan, please read donnoman's postings on this, he explained this much better then I possibly could.

Joachim
Logged

betan

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 47
Re: Custom Headers Part 2
« Reply #8 on: January 21, 2005, 06:11:47 pm »

Hi,
My point be is that you can create a costumized html page inside anycontent.php that is clickable link to his wordpress or as many link as he desired. :) then make anycontent.php as his main body.

but then again im winging it, i really don't know what im talking about. :)

@rvblog - if you check the documentations of cpg1.3.2 you will see a brief summary of anycontent.php and while you are at documentation page  check how to costumized your main page under Configuration. Im pointing you to that direction because my English is limited and I believe that the documentations is worded better than what i can come up with.

betan
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Custom Headers Part 2
« Reply #9 on: January 22, 2005, 06:09:45 am »

@betan && rvblog

a little snippet of PHP or HTML in a PHP doc would be ok. that would give you a link. Thats essentially what I told rvblod to do with his template.html and use only hardcoded information to tie the two sites together.  (whether you are calling wordpress functions from theme.php or anyconent.php makes absoultely no difference, as both of those are running under the same context as coppermines index.php)

The advantage of using anycontent.php to do it is that it would be shown on ALL the themes, not just the theme he modified.  If you don't allow the user to switch the theme then thats pretty much moot anyway so why go to the extra work.

If you absolutely must get coppermine and something else like wordpress on the page at the same time, search the boards for IFRAMES, you'll get a few conversations about how that works.



Logged

betan

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 47
Re: Custom Headers Part 2
« Reply #10 on: January 22, 2005, 07:03:25 am »

thanks Donnoman, I'm happy of what i've done so far to My Site.  if only i can get rid of the {title} during slide show, i'll be real happy. if i have time I'll buy me a CPG for dummies book and also on php html and css. unless i'll stumble upon someone that is willing to fix my site for nickel and dime. :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Headers Part 2
« Reply #11 on: January 22, 2005, 09:06:51 am »

the issue you mentioned ({TITLE} token in slideshow) has been discussed as well, but doesn't relate to this thread. Please search the board for it, or start a separate thread if you can't find it, but please don't reply to this thread about it - we're trying to reduce thread drift to a minimum.

Joachim
Logged

betan

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 47
Re: Custom Headers Part 2
« Reply #12 on: January 22, 2005, 07:47:43 pm »

the issue you mentioned ({TITLE} token in slideshow) has been discussed as well, but doesn't relate to this thread. Please search the board for it, or start a separate thread if you can't find it, but please don't reply to this thread about it - we're trying to reduce thread drift to a minimum.

Joachim

you admonishing me, i believe is more off topic than what i posted here. :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Headers Part 2
« Reply #13 on: January 22, 2005, 09:26:09 pm »

would you have prefered it if I had just told you to "shut up", without any explanation? I guess not. I'm just trying to be nice, but keep the forum usable, that's all.
You gave advice to the person who requested help - that's ok and I appreciate that, even though your advice has been wrong - I'm sure you only wanted to help, and users who give wrong advice are better than users not giving advice at all even though they could.
BUT: it's up to me as moderator to tell you when I think there has been enough thread drift, and that you should respect board rules (one of them being "do not cross-post") - that's what I did. I am allowed to do that, it's even my "job" here on the forum to do so. There's little point in posting "smart" remarks like
you admonishing me, i believe is more off topic than what i posted here. :)
My posting wasn't off topic at all, but was a direct reply to your posting >:(.
Have you come here to troll or are you looking for help? ::)

Joachim
Logged

betan

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 47
Re: Custom Headers Part 2
« Reply #14 on: January 22, 2005, 09:49:20 pm »


Have you come here to troll or are you looking for help? ::)

Joachim

OFF TOPIC:

You ask me a question on this thread, i suppose i can answer it "without enough thread drift". My last comment is just my fraustration to what I want to accomplish but no one will hold my hand and take me to the right place. I even feed your ({TITLE} token in slideshow) comment to forum search engine and I end up with one list of a thread which is this.

To answer your question, no Im not here to troll, if i want to troll i will not go here for the same reason that you are here. I'll be banned before I can even generate enough response to satisfy my trolling fit.

thanks,

Betan
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Headers Part 2
« Reply #15 on: January 22, 2005, 09:53:50 pm »

If you feel that you're not getting the feedback your deserve on the other thread, you should reply to it using just the text
Quote
*bump*
to draw attention to it (of course not immediately after posting, but after some days).

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.044 seconds with 20 queries.