1 village_idiot Feb 01, 2005 03:14
3 edb Feb 01, 2005 03:33
Hey that's neat!
Edit: just saw your second. Reckon if you had more than one cat the snip wouldn't show up until someone clicked the subcat link, then would show up as a snip. Main cat being main cat and all that. Rat a tat tat.
4 village_idiot Feb 01, 2005 03:37
yeah i know, i looked at my == and figgered it out, hence the edit :)
Im off, sleepytime, work is a bitch
5 village_idiot Feb 02, 2005 01:29
by the way, I would LOVE to see how anyone else implements this.. as well as how they have styled the diff CSS class. So if you set up snips and wish to share, drop me a pm if youre not into posting your URL for all to see. I promise not to tell
6 gacjezv Feb 04, 2005 04:19
Hey Whoo
I have implemented it and its wonderful....
Have a look here at http://www.gacjezv.com/b2blogs/
Great work with this by the way!
7 village_idiot Feb 04, 2005 11:54
heh nice! I thought about using some sort of punctuation, good job! :)
8 sunset Feb 10, 2005 15:55
:D Love it! thanks.
It'll take some getting used to - knowing when to snippet or not.... :lol: but I think it'll definitely be used a LOT
If you want to see what I did with it click on over to
[url=http://www.sunset.000k2.com/cc/]Chaotic Clarity[/url]
9 village_idiot Feb 11, 2005 03:37
cool! I'm glad you like it, theyre great for those little things that dont need a lot of room! :D
10 topanga Feb 12, 2005 16:52
you can see it in action at my site (on day 12 februari 2005)
11 sunset Feb 13, 2005 16:09
Yep - I still like this hack :D
I like it so much that I was wondering how easy it would be to use it again? I have it for 'snippets' but what if I want another category such as, say, 'tips' - with different css?
Easy, difficult, impossible?????
12 topanga Feb 13, 2005 16:15
I think that would be easy to inplement.
I'm not shure if it would be very efficient to have a lot of select cases...
but it shure would work
13 sunset Feb 13, 2005 16:18
Just looked at the hack again - would it just be a case of entering a new category ID? - I think I might give it a go (making a backup of my files just in case) and see what happens. :)
edit: second thoughts - I need some guidance on this... just don't know how to put in the second if statement... this is the first time I have been scared to screw around with code - I am no good at it really but I like to experiment... perhaps I'll get the nerve up at some point! :lol:
14 topanga Feb 13, 2005 17:01
I just did something with this :
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
$MainList->date_if_changed('<div class=\'style_date\'>','</div>','d F Y');
?>
<?php if ($disp != 'single' )
{
switch( $Item->get('main_cat_ID'))
{
case 143: ?>
<div class="snips" lang="<?php $Item->lang() ?>">
<?php locale_temp_switch( $Item->locale ); ?>
<div class="bPostTitle"><?php $Item->main_category(); ?></div>
<?php $Item->content(); ?>
</div>
<?php break;
case 136: ?>
<div class="tips" lang="<?php $Item->lang() ?>">
<?php locale_temp_switch( $Item->locale ); ?>
<div class="bPostTitle"><?php $Item->main_category(); ?></div>
<?php $Item->content(); ?>
</div>
<?php break;
case 118: ?>
<div class="wordoftheday" lang="<?php $Item->lang() ?>">
<?php locale_temp_switch( $Item->locale ); ?>
<div class="bPostTitle"><?php $Item->main_category(); ?></div>
<?php $Item->content(); ?>
</div>
<?php break;
default ?>
<div class="bPost<?php $Item->disp('status', 'htmlattr'); ?>" lang="<?php $Item->lang() ?>">
the normal stuff
</div>
<?php break;
}
}
?>
<?php } // ---------------------------------- END OF POSTS ------------------------------------ ?>
it is not 100% correct, because I did my test of the $disp single wrong....
15 village_idiot Feb 13, 2005 19:41
actually per category CSS changes were brought up before ..could be done that way
http://forums.b2evolution.net/viewtopic.php?t=3088&highlight=category+css
the trick is to make sure that cats that you dont want to use an alternate style for use the defualt class, so you would need to use an if == 'changed cat' statement than something along the lines of an else if !='changed cat'
im glad people like this and that it's faciilitated some other ideas :D
I swore but was wrong when I went back and searched that I had seen a question about displaying posts within certain categories differently.. Obviously, this code could be used to display ALL or any of your categories differently in paginated view, if you were so inclined.. a few if statements would do the trick quite nicely
I also neglected to mention that by category, I mean the MAIN category (the round checkbox) not the square one :)
Im sleepy, so Im (just) hopeful I covered everything. Remember to back up your files!!