1 wundurra Apr 07, 2007 12:15
3 wundurra Apr 07, 2007 12:53
Ahhh thats Fantastic ¥åßßå, it worked like a charm! Thanks so much
4 wundurra Apr 07, 2007 15:09
[url=http://www.akdingo.com/blogs/]My page is here...[/url]
Now that I have fixed the backgrounds, I would like to put all the posts from one date into their own div tags, to add a gap between one date and the next.
I tried adding a few divs and styles in css but it broke the whole design.
I imagine it's got something to do with $MainList->date_if_changed();
5 yabba Apr 07, 2007 15:34
If you only want a gap then you don't need a div :
<?php
if( empty( $first_post ) )
{
$MainList->date_if_changed();
$first_post = true;
}
else
{
$MainList->date_if_changed( '<h2 style="margin-top:2em">');
}
?>
Just change the 2em until you get the gap you want.
¥
6 wundurra Apr 07, 2007 15:43
thanks. That looks much neater, but I would prefer to end the current div tag and start a new div when the date changes... to look similar to [url=http://www.akdingo.com/dingoes/index.php]here[/url]. I still have to figure out the css to keep those div tags lined up on the right too... but thats not a prob for here
7 yabba Apr 07, 2007 15:49
<?php
if( empty( $first_post ) )
{
$MainList->date_if_changed( '<div><h2>');
$first_post = true;
}
else
{
$MainList->date_if_changed( '</div><div><h2>');
}
?>
.........
<?php
} // ---------------------------------- END OF POSTS ------------------------------------
echo ( empty( $first_post ) ? '' : '</div>' );
?>
Should do it
¥
8 wundurra Apr 07, 2007 16:16
Thanks. I've played with it without success, but it's late so I will try again tomorrow. The code you gave does work, I saw the page source. I'm just having probs with the css.
9 wundurra Apr 10, 2007 16:33
I got that div trick to work, thanks. but I came up with another error and ended up starting from scratch. will post in a new post
10 julsenor Apr 25, 2007 15:27
How about comments? How would I make the comments alternate background colors? Or make my own comments look different than the rest?
11 yabba Apr 25, 2007 15:44
For comments it's pretty similar, crack open _feedback.php and add the new bits :
<?php
$toggle = false; // add this line
$CommentList = & new CommentList( 0, implode(',', $type_list), array('published'), $Item->ID, '', 'ASC' );
$CommentList->display_if_empty(
'<div class="bComment"><p>' .
sprintf( /* TRANS: NO comments/trackabcks/pingbacks/ FOR THIS POST... */
T_('No %s for this post yet...'), implode( "/", $disp_title) ) .
'</p></div>' );
while( $Comment = & $CommentList->get_next() )
{ // Loop through comments:
?>
<!-- ========== START of a COMMENT/TB/PB ========== -->
<?php $Comment->anchor() ?>
<!-- amend the following line -->
<div class="bComment <?php echo ( ( $toggle = !$toggle ) ? 'odd' : 'even' ); ?>">
To style your own comments differently just change this line instead :
<div class="bComment <?php echo ( empty( $Comment->author_user_ID ) ? '' : 'author_'.$Comment->author_user_ID ); ?>">
And then add the styles for each author to your css :
.author_1{
background:#fff;
color:#f00;
}
Change 1 to tally with the actual author id.
¥
12 julsenor Apr 25, 2007 16:05
Awesome. You rock! Thanks for the help...
crack open _main.php and find a section that looks like this :
and change it to look like this :
Then in custom.css add the new classnames :
¥