Hi guys
since you asked YL
This seems like a very reasonable change to me. One of the other things I often do, particularly when making a commercial site, is remove the date altogether. I've thought to make it a configurable option myself but usually just hide it with CSS. Build this option into the config item and I think it would be an excellent addition.
Dave
Can I remove dategroups from bulletproof?
Re: Can I remove dategroups from bulletproof?
Hohum.
I just now tried to implement this in the entries.tpl. Seems like something like:
isn't possible in Smarty, since I get:
Does anybody have a clue why this doesn't work? Is it invalid to just open a foreach within an if statement without closing it within the same if statement?
'cause if that's the case, I think we're gonna have to drop it as a theme option altogether. If can't use the code above, I'd have to basically have the whole entries.tpl twice (if anybody can follow me here), which is definitely way too much overhead for a small detail like this ...
YL
I just now tried to implement this in the entries.tpl. Seems like something like:
Code: Select all
{if $template_option.dategroup_sort == 'false'}
{foreach from=$dategroup.entries item="entry"}
{/if}
Code: Select all
Fatal error: Smarty error: [in file:/var/www/serendipity/templates/bp-svn/entries.tpl line 7]: syntax error: mismatched tag {/if}. expected {/foreach} (opened line 6). (Smarty_Compiler.class.php, line 2324) in /var/www/serendipity/bundled-libs/Smarty/libs/Smarty.class.php on line 1092
'cause if that's the case, I think we're gonna have to drop it as a theme option altogether. If can't use the code above, I'd have to basically have the whole entries.tpl twice (if anybody can follow me here), which is definitely way too much overhead for a small detail like this ...
YL
Re: Can I remove dategroups from bulletproof?
Can't talk about smarty, but I don't know any programming-language which allows such a construction. Just think about the resulting assembler-code...
sincerely
sincerely
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can I remove dategroups from bulletproof?
Hi!
The proper way to add an option is to place the IF check WITHIN the foreach loop, and simply skips the HTML tags that would be shown between the first foreach loop and the second.
Regards,
Garvin
The proper way to add an option is to place the IF check WITHIN the foreach loop, and simply skips the HTML tags that would be shown between the first foreach loop and the second.
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/
# 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/
Re: Can I remove dategroups from bulletproof?
What onli said. Everything has to be done in blocks; you can't have blocks that overlap, only blocks that are completely enclosed in other blocks.
In any case, we still want to iterate through the dategroup items; we just don't want them styled or marked as a group. Essentially, we want each entry enclosed in its own dategroup div, even if it's the same date as the entry above it.
In any case, we still want to iterate through the dategroup items; we just don't want them styled or marked as a group. Essentially, we want each entry enclosed in its own dategroup div, even if it's the same date as the entry above it.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Can I remove dategroups from bulletproof?
Thanks for digging into this YL - I have been buried with other obligations.
=Don=
Re: Can I remove dategroups from bulletproof?
Hmm ... I think that might work: Putting every entry in it's own dategroup div, but without emitting "double" dates.judebert wrote:In any case, we still want to iterate through the dategroup items; we just don't want them styled or marked as a group. Essentially, we want each entry enclosed in its own dategroup div, even if it's the same date as the entry above it.
I'll have to play with this over the weekend when I actually have time for it
YL