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 [2] 3   Go Down

Author Topic: problems with converting wordpress 2011 theme to coppermine  (Read 26408 times)

0 Members and 1 Guest are viewing this topic.

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #20 on: August 08, 2012, 05:01:52 am »

are you talking about footer.php from the theme?
Code: [Select]
<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the id=main div and all content after
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>


</div><!-- #main -->

<footer id="colophon" role="contentinfo">

<?php
/* A sidebar in the footer? Yep. You can can customize
 * your footer with three columns of widgets.
 */
if ( ! is_404() )
get_sidebar'footer' );
?>


<div id="site-generator">
<?php do_action'twentyeleven_credits' ); ?>
<a href="<?php echo esc_url__'http://wordpress.org/''twentyeleven' ) ); ?>" title="<?php esc_attr_e'Semantic Personal Publishing Platform''twentyeleven' ); ?>" rel="generator"><?php printf__'Proudly powered by %s''twentyeleven' ), 'WordPress' ); ?></a>
</div>
</footer><!-- #colophon -->
</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>

Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #21 on: August 08, 2012, 05:07:08 am »

You can add this to theme.php if you want. I'll add it in later anyway.
Code: [Select]
/******************************************************************************
** Section <<<theme_credits>>> - START
******************************************************************************/

/******************************************************************************
// Function for the credits-section
In previous versions of Coppermine the "Powered by Coppermine" used to be
obfuscated to make it hard for non-coders to remove the tag. The reason behind
this was an additional license add-on that disallowed users to change the line.
The dev team has reviewed this policy for cpg1.5.x and decided that end users
ARE allowed to change or remove the line in legal terms.
HOWEVER: We have a forum policy for the support board instead: support will
only be given for galleries that show the "Powered by Coppermine" tag
unobfuscated.
Before removing the credits, please consider this as well:
Coppermine is free software, the dev team ASKS you to keep the footer intact.
We're convinced that you should give credit where credit is due. So please think
twice before you decide to remove the tag.
******************************************************************************/
function theme_credits() {
    $return = <<< EOT

<div class="footer" align="center" style="padding:10px;display:block;visibility:visible; font-family: Verdana,Arial,sans-serif;">Powered by <a href="http://coppermine-gallery.net/" title="Coppermine Photo Gallery" rel="external">Coppermine Photo Gallery</a> | Ported by Jeff Bailey | Based on <a href="http://wordpress.org" rel="external">Wordpress</a> theme <a href="http://wordpress.org/extend/themes/twentyeleven" rel="external">Twenty Eleven</a></div>
EOT;
    return $return;
}
/******************************************************************************
** Section <<<theme_credits>>> - END
******************************************************************************/
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #22 on: August 08, 2012, 06:42:01 am »

Hi Jeff,

I was just trying to change the style of the footer so that it was the same as the w/p 2011 theme. And in that footer there's the credit to w/p in the <div id="site-generator">  (where the coppermine credit now site) but the whole footer is within the <footer id="colophon" role="contentinfo"> div which I guess gives it it's styling - well it did in my one, but it doesn't in your one...so maybe the footer id="colophon" isn't active somehow?? Though it looks like you have the whole w/p 2011 style.css as the theme style.css, so that's why I couldn't work out why it wasn't showing up??

Hope that makes it clearer? Thanks.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #23 on: August 08, 2012, 07:54:14 am »

Oh ok, I haven't gotten to the footers style yet. I'll change that tomorrow.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #24 on: August 09, 2012, 12:47:35 am »

So far today. Attached.

Edit:
Fixed a small typo. Attached.
« Last Edit: August 09, 2012, 01:45:13 am by Jeff Bailey »
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #25 on: August 09, 2012, 05:53:37 am »

This is it for tonight.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #26 on: August 09, 2012, 09:45:33 am »

Thanks Jeff, I'm afraid I haven't been able to look at it at all today, but I'll check it out tomorrow afternoon.
Cheers.
Logged

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #27 on: August 10, 2012, 09:02:46 am »

Hi Jeff,

I've managed to have a good look this afternoon and have made just very minor edits to your files - just added in the footer divs to the template.html and removed them from the theme.php so there doesn't seem to be any need for the 'Custom Footer' token and it all works well now - though how you had it worked too of course!

I've also had another go at putting it together like it was suggested in the tutorial by Gizmo ( http://forum.coppermine-gallery.net/index.php/topic,38508.0.html ) as I want to try and keep the wordpress syle as intact as possible so I can easily update it if there are issues with it, or even be able to more easily change to another wordpress style in the future. So I've used your theme.php file (with my small edits as above in re the footer/credit styling) as mine didn't work before, and I've taken the original cpg Curve style.css as you suggested and commented out any items that duplicate ones in the wordpress style (which I've titled 'style_wp.css). So I've also linked to both stylesheets in template.html (in fact to x3 stylesheets, as the original coppermine style.css is referenced too in the above tutorial, but not sure if it's necessary/good to do here??). I've also just moved the 'Message' token, to just above the 'Gallery' one, as I prefer the look i think.

Overall they both seem to work well now, just styling tweaks once I've uploaded all images and set out the categories for real.

The one thing that I still can't change though is how the lefthand sidebar menus gets over-written by the content when the browser window becomes very narrow. If you can think of an obvious fix for this that'd be great - but it's probably not worth a lot of time spent on it.

See what you think - thanks.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #28 on: August 10, 2012, 09:27:44 pm »

I won't have time to continue on this for a few days.

The one thing I haven't gotten to that really needs work is displayimage.php
You can find the theme.php functions to edit here:
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_var_display_media
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_display_image
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_var_film_strip
And there are probably a couple of others that may need a tweak.

Adding the footer divs to the template.html or the theme.php works either way, as you can see, it's just a habit of mine to do most of the edits in theme.php.

Using two style sheets is a fine idea, but when I port a theme I usally change all the classes and ids to match the original. Again either way works as long as you can follow where you've made the appropriate changes.

Glad you are getting the hang of it. If you get this to a completed phase before I can return to it please use the naming scheme I have been using with a version number of 1.x and I will add it to the theme contributions thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #29 on: August 11, 2012, 02:12:01 am »

Hi Jeff,

Well, I had a good look at all the docs re theme editing and the 'displayimage' bits, but I'm afraid I just don't get it at all and can't see what to do or where to do it or even what the problem is!! - and just when I thought I was starting to understand how to edit the theme.php with the footer edits, as they were easy... So I'm afraid I haven't done anything on this bit.

But I've done what I can - I've reinstated your info in the template & theme files re showing the theme footer and credits, as that's obviously more how coppermine is formatted. And I've tried to tidy up the template.html file with 'comments' marking the end of each div, as recommended in the docs, so hopefully that should save you some time? But you'd better have a quick check of it in case I've messed it up somewhere - though it still works fine.

I've re-named it as per your version nos and uploaded again. I'll stick with editing your 2011 theme files here, as that's probably more useful for others trying to convert the 2011 wordpress theme, and will try and incorporate any changes you make into my tpp_cutom file to keep my stylesheets separate as mentioned before.

Cheers.
Logged

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #30 on: August 20, 2012, 09:57:43 pm »

Hi Jeff,

just wondered if you'd had some spare time to look at issues in the theme.php file that you mentioned on Aug 11th (re: displayimage bits I think?)?

If your hard pressed for time at present perhaps someone else with experience of php files could take at look at it??

Many thanks.  :)
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #31 on: August 20, 2012, 10:01:07 pm »

I will be starting again soon, probably around wednesday. I'm just in the middle of finishing some college courses, and this project is a little more involved then standard support.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #32 on: August 21, 2012, 09:09:38 am »

Hi Jeff,

Thanks for that - i do realise that it's 'above and beyond' a normal support query, so everything is very much appreciated. So whenever suits you...

Cheers.
Logged

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #33 on: October 29, 2012, 09:05:51 pm »

Hi Jeff,
Not sure if you have time to continue what you'd started helping me with (develpoing a coppermine child theme of the wordpress twenty eleven theme)? The initial look seemed fine to me, but you said there were some issues with the image displays which still needed attention: see info from your post Aug 11th...
Quote
The one thing I haven't gotten to that really needs work is displayimage.php
You can find the theme.php functions to edit here:
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_var_display_media
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_display_image
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_create_theme_var_film_strip
And there are probably a couple of others that may need a tweak.

As I said, this is way beyond my skills I'm afraid, so if you have some time to look at it again I'd be really grateful - or if anyone else could help too??

Many thanks.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #34 on: October 30, 2012, 08:16:28 pm »

Sorry I forgot all about this. Let me take a fresh look today and see what I can come up with.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #35 on: October 31, 2012, 01:58:37 am »

Take a look at this one, I think I hit everything.

[Edit]
Forgot to mention, the style sheet could have a lot of things cleaned out of it. I just didn't spend the time to look through it all.
« Last Edit: October 31, 2012, 02:11:33 am by Jeff Bailey »
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #36 on: October 31, 2012, 02:54:39 am »

Thanks Jeff - that was SUPER quick! - and you're obviously not based around NY (poor things)! I've just got in and will have a look at it this evening (I hope) or tomorrow am for definite...
Cheers.
Logged

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #37 on: November 12, 2012, 01:43:15 am »

Hi Jeff,

Well I've tried adjusting a few things, namely:
  • added padding to the t/nails as they were colliding
    added padding to the t/nails in the filmstrip for same reason
    tried to increase the space for the gallery by increasing the %age width of the 'content' div (in main w/press part of css under 'Structure')
    and decreased the width/margin a bit of the sidebar div (in main w/press part of css under 'Structure')
what I've tried to do but totally failed with, is to decrease the filmstrip width from 816 to 616 or thereabouts, so that it apprears to sit within the 'content' container - at present it escapes. I've put it in under film and element.style, but it won't work - I don't think I've labeled them correctly, so would appreciate it if you could look at this?

The other problem that I just can't fix, is that my portrait thumbnails are always left aligned, whereas the landscape ones are centered. I've spent hours trying to work it out with Firebug, but it all says center aligned already, and it doesn't change no matter what I put in it!!

Anyway, I've uploaded it as version 1.2 and would appreciate your input.

Also you mentioned that there was a lot of unnecessary code in the css - do you mean the w/press features that aren't being used? If so I can clear them out.

Thanks a lot for your ongoing help.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #38 on: November 12, 2012, 10:02:28 pm »

I'm not seeing any colliding, unless I zoom in. The theme uses percentages to set the width of columns, maybe your resolution is low?

To adjust the widths of the content and secondary columns try this (already adjusted):
Code: [Select]
.left-sidebar #content {
margin: 0 7.6% 0 20%;
width: 78%;
}
.left-sidebar #secondary {
float: left;
margin-right: 0;
margin-left: 2%;
width: 17%;
}

The filmstrip doesn't escape for me. Find this in theme.php and try adjusting.
Code: [Select]
$CONFIG['max_film_strip_items'] = 4;
The thumbs in the flimstrip are half controled by the function theme_display_film_strip and by displayimage.js, remove float: left; from the inline styles.

When I mentioned the style.css I was talking about the wordpress styles.

I'm afraid this project has gone much farther than I expected it to and I have other things I'm currently working on. I won't be uploading any newer versions any time soon but feel free to ask if you run into a major issue.

The way I put this together was pretty sloppy but everything you need to know in order to build a decent version of this is in there. Feel free to rebuild using fixed widths and other things that would fix the issues you're having and you can also remove my credit.

When you do get it running the way you want, we would be grateful if you posted a theme contribution thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

trevorpenfold

  • Coppermine novice
  • *
  • Country: nz
  • Offline Offline
  • Posts: 23
Re: problems with converting wordpress 2011 theme to coppermine
« Reply #39 on: November 14, 2012, 09:13:33 pm »

Hi Jeff,

Thanks so much for all your work and ideas - I'll continue with this as I develop my new site, and I'll definitely post what I end up with! I'm sure it won't be brilliantly coded, but hopefully it will give a jump-start to anyone else.

Many thanks again!
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.025 seconds with 20 queries.