Can I remove dategroups from bulletproof?

Skinning and designing Serendipity (CSS, HTML, Smarty)
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Can I remove dategroups from bulletproof?

Post by greenwayg »

I am using the bulletproof theme on my blog, but I don't really like dategroups. In the place that bulletproof currently puts the date for all entries on a given day, I would rather put the full date and time, and have it above each and every entry.

To do this, I was going to change the start of entries.tpl to be more like:

Code: Select all

{foreach from=$entries item="dategroup"}
    {foreach from=$dategroup.entries item="entry"}
        <div class="hentry serendipity_Entry_Date">
            <h3 class="serendipity_date"><abbr class="published" title="{$dategroup.date|@formatTime:'%Y-%m-%dT%H:%M:%S%Z'}">{$dategroup.date|@formatTime:$template_option.date_format
}</abbr></h3>
             <h4 class="entry-title serendipity_title"><a href="{$entry.link}" rel="bookmark">{$entry.title}</a></h4>
Is this a reasonable way to accomplish my goal? I have never mucked with this stuff before, so if I'm missing something obvious, please let me know.

And is there anything else I would need to change, other than the top section of entries.tpl?

Thanks!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

greenwayg wrote:Is this a reasonable way to accomplish my goal? I have never mucked with this stuff before, so if I'm missing something obvious, please let me know.
Well, define "reasonable" :) Are you aware that these changes will be overwritten by the next s9y and/or BP update? You're going to have to "backport" your changes to the updated entries.tpl, so make sure you keep a backup of your edited version.
greenwayg wrote:And is there anything else I would need to change, other than the top section of entries.tpl?
Yes. Since you're now opening the entry container div within the inner foreach loop, you'll have to close it within that loop as well. I think this:

Code: Select all

{$entry.backend_preview}
</div>
    {/foreach}
should do the trick.

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by garvinhicking »

Hi!

Sort of. Instead of $dategroup.date you should use $entry.timestamp instead, because it contains the whole timestamp of an entry, and not of the group of entries.

Other than that, your change inside the loop should work out fine.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Can I remove dategroups from bulletproof?

Post by greenwayg »

Thanks for the tips, both of you. I got things working how I wanted.
yellowled wrote:
greenwayg wrote:Is this a reasonable way to accomplish my goal? I have never mucked with this stuff before, so if I'm missing something obvious, please let me know.
Well, define "reasonable" :) Are you aware that these changes will be overwritten by the next s9y and/or BP update? You're going to have to "backport" your changes to the updated entries.tpl, so make sure you keep a backup of your edited version.
Yes, I am aware of this, and it is unfortunate. If you think it may be of interest to the general public, I might be willing to expose it properly through a configuration option and send the diffs for inclusion in the "official" bulletproof sourcecode. Any interest in that?

thanks,
greg
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

greenwayg wrote:Yes, I am aware of this, and it is unfortunate.
But invariable.
greenwayg wrote:If you think it may be of interest to the general public, I might be willing to expose it properly through a configuration option and send the diffs for inclusion in the "official" bulletproof sourcecode. Any interest in that?
Since you're the first one to request this (ever) - no, thank you :)

YL
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Can I remove dategroups from bulletproof?

Post by greenwayg »

yellowled wrote:
greenwayg wrote:Yes, I am aware of this, and it is unfortunate.
But invariable.
greenwayg wrote:If you think it may be of interest to the general public, I might be willing to expose it properly through a configuration option and send the diffs for inclusion in the "official" bulletproof sourcecode. Any interest in that?
Since you're the first one to request this (ever) - no, thank you :)
Fair enough. Thanks for your help on my little project.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Can I remove dategroups from bulletproof?

Post by judebert »

Hey, I requested this, too!
Judebert
---
Website | Wishlist | PayPal
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

judebert wrote:Hey, I requested this, too!
You did? Sorry, I forgot :)

Still, I don't see this in the standard BP distribution. Simply doesn't seem like a request popular enough to justify the extra code.

Just my opinion, though. What do my fellow BP developers think?

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Can I remove dategroups from bulletproof?

Post by Don Chambers »

I honestly do not care one way or the other. The additional code should be minimal. I think a lot of people have no idea entries are actually grouped by date because few publish more than a single entry on any given date. Some of us have difficulty publishing a single entry more frequently than every few months. :wink:

What the heck. Show us your diff greenwayg.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

Don Chambers wrote:Some of us have difficulty publishing a single entry more frequently than every few months. :wink:
You think you're gonna publish a second article this year? :wink:

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Can I remove dategroups from bulletproof?

Post by Don Chambers »

yellowled wrote:You think you're gonna publish a second article this year? :wink:
I dunno... I already have three ya know!! That's my entire total for last year! :mrgreen:
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

Don Chambers wrote:I dunno... I already have three ya know!!
You know, advertising doesn't count as articles, so actually you have posted zilch this year! :mrgreen:

YL
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Can I remove dategroups from bulletproof?

Post by judebert »

Now, now. Let's be nice. :lol:

At least Don does better than me. When he posts, it's something interesting, not just random mumblings.
Judebert
---
Website | Wishlist | PayPal
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Can I remove dategroups from bulletproof?

Post by yellowled »

judebert wrote:Now, now. Let's be nice. :lol:
'cause we might set a bad example? :wink:

I'm only messin' with Don a little, and he knows that. But kids, don't try this at home! :mrgreen:

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Can I remove dategroups from bulletproof?

Post by Don Chambers »

yellowled wrote:I'm only messin' with Don a little, and he knows that. But kids, don't try this at home! :mrgreen:

YL

:P
=Don=
Post Reply