okey, i solved it now although it took a while...

if anyone else wonder how to style comments for non registered users
this is how i did it.

first i opened my theme.php and added these lines after all the if
statements in the "public function k2_comment_class( $comment,
$post )"

                // set class for users that are not registered
                else {
                        $class.= ' byvisitor';
                }


and after that i added the line below to the style.css and added my
styling

                li.byvisitor {
                }

On 31 Aug, 14:39, eternal243 <[EMAIL PROTECTED]> wrote:
> hmm, i've now tried to move the individual styling for the logged in
> users to a position above the #commentlist li {} part as you suggested
> but the individual styling is still being overridden
>
> any ideas?
>
> On 31 Aug, 12:35, "Caius Durling" <[EMAIL PROTECTED]> wrote:
>
> > If you put the li {} bit before the li.byuser {} in your css file then
> > it'll style all the comments the same, and then over-ride the styling
> > for the logged in users comments.
>
> > C
> > --
> > Caius Durling
> > [EMAIL PROTECTED]
> > +44 (0) 7960 268 100http://caius.name/
>
> > On Sun, Aug 31, 2008 at 8:49 AM, eternal243 <[EMAIL PROTECTED]> wrote:
>
> > > oh forgot to say i started out with the k2 theme and making my own
> > > style with k2 as a base if it has any importance as to how to solve
> > > the problem
>
> > > On 31 Aug, 09:46, eternal243 <[EMAIL PROTECTED]> wrote:
> > >> i'm not much of a coder, i do know a bit of html and css, but not php.
>
> > >> i'm currently trying to create my own theme for my site and i've run
> > >> into a problem, i want to style the box where every comment is located
> > >> AND i want to style comments differently for the post author.
>
> > >> in the style.css
>
> > >> if i style "li.bypostauthor" or "li.byuser" the comments will be
> > >> styled differently for registered users, but comments posted by a
> > >> visitor will go unstyled, then i found the "commentlist li {}" but if
> > >> i tried to style that one it would override the styling made to
> > >> "li.bypostauthor" and "li.byuser".
>
> > >> i guess what i need is to go into the comments.php and insert a check
> > >> looking something like this
>
> > >> if commentauthor =! postauthor || user {
> > >> then {create class li.byvisitor }
> > >> else {}
>
> > >> }
>
> > >> the thing is i don't know the exact syntax or where to put it, or is
> > >> there a better way to check if the user is a visitor?
>
> > >> thanks in advance for any help
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/habari-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to