UPDATE: P2 Theme hacking
UPDATE:
There is something wrong with the code that I merged, I haven’t taken the time to figure out exactly what happened, but I’m going to try to get it fixed and post an update in the next few days. I wasn’t expecting this kind of response and I’m sorry to keep everyone waiting so long for such a simple change.
——–
I’ve had a lot of requests regarding the new theme an how to add titles to your p2 theme so here it is. It’s not the most elegant thing in the world, but it gets the job done for me.
The code diff for those interested:
http://steve918.files.wordpress.com/p2diff.txt
The diff applied to the current SVN version of p2.
Monsieur de Feu 7:21 pm on April 28, 2009 Permalink
Hello,
I don’t know if I screwed up something but it seems that when you edit a post, the new content is also applied to the title. You got the same problem?
steven 12:21 pm on April 29, 2009 Permalink
Hmm, seems I may have missed something when I merged with the latest version. I’ll give it a look.
Monsieur de Feu 5:23 pm on April 29, 2009 Permalink
Thanks! Let us know if you get to figure what’s wrong!
tom 8:38 pm on May 1, 2009 Permalink
this is a great hack. could you please publish the updated version as Monsieur de Feu requested? thanks in advance
tom 2:51 am on May 7, 2009 Permalink
d
Jere 4:18 pm on May 11, 2009 Permalink
Can I post code tags in your comments?
Applying your patch – problem is with entry.php
patching file style.css
Hunk #6 succeeded at 855 (offset 14 lines).
patching file entry.php
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file entry.php.rej
patching file post-form.php
Here’s the contents of entry.php.reg:
***************
*** 5,11 ****
--- 5,12 ----
+ ID, 'display_title') == true ) the_title("",""); ?>
+ <a href=""><?php the_title("",""); ?>
Jere 4:48 pm on May 11, 2009 Permalink
Nevermind – it seems they have implemented your changes with along with an option in the official release as off 1.0.4 – so no wonder the patch failed after I updated – and all but the entry.php code looks just like yours – so congrats, I guess!
Jere 4:54 pm on May 11, 2009 Permalink
Take that back – your patch was actually a lot nicer IMHO, they didn’t include the title field on the frontpage form and put the titles in instead of tags – but that’s easier to fix – anyway, thanks for posting your work!
asocinfo 11:12 am on May 15, 2009 Permalink
I am using your version of the P2 theme and I also have the problem described by Monsieur de Feu. When you fix the problem, PLEASE let us know. Thanks in advance.
jon 10:53 pm on May 17, 2009 Permalink
Hey guys, this is awesome, but I can’t seem to get this patched with 1.0.4 – could someone post the appropriate changes? (I think Jere’s — from 4:18 on May 11 — are for the previous version?)
Thanks in advance!
Dubber 3:39 am on May 19, 2009 Permalink
Brilliant. That’s much appreciated. Exactly what I was looking for.
Paraksaber 3:53 pm on May 21, 2009 Permalink
but….what if you dont want to show the titles….
what about beckend?
Rishi 8:13 am on May 23, 2009 Permalink
Hey Steven and other P2 modifiers.
I tried implementing the version of P2 above (the diff applied to the SVN version) on my site: http://rickikumar.com
I’ve noticed two things:
1.) Whenever I type a title, from the front end and check the post through the administration panel, the title ends up being the content (just like the regular P2).
2.) Whenever I hit submit, the title doesn’t get carried down to the “Recent Updates” section with the tags/content through AJAX.
Are these known problems? I’ve not modified any of the code myself and am strictly using the files from the link above. I’ve tried my luck with the “Display titles” feature (under Prologue Options) both on and off, and neither have worked.
Nemo 8:05 am on June 16, 2009 Permalink
Any luck with this? It seems like you’re not working on it anymore, are you?
steven 12:41 am on November 26, 2009 Permalink
Now days p2 version 1.1 supports nice looking titles and fixes pretty much any gripes I had with v1.0