Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Add CSS class for signatures?

by adrianh (Chancellor)
on Sep 05, 2003 at 13:02 UTC ( [id://289201]=monkdiscuss: print w/replies, xml ) Need Help??

How about wrapping all signatures with something like:

<div class="pmsig-NNN"> ... sig goes here </div>

Where NNN is the node_id of the monk in questions home page.

That way I can use CSS to hide all signatures if I think they're a waste of space - or maybe just the ones that hurt my eyes and take up more space than the post - mentioning no names :-)

Replies are listed 'Best First'.
Re: Add CSS class for signatures?
by halley (Prior) on Sep 05, 2003 at 14:45 UTC
    Unlike many other sites, sig lines on PerlMonks seems to be a simple pre-population of the edit box. The sig isn't a separate entity appended upon posting the node.

    For example, I open my reply box, and I see my sig in it, and I can edit/delete my sig if I want, before posting. In fact, I include one crutch: a <code></code> pair just above my signature; if I don't want them for a code snippet in my replies, they're easier to delete than to type them when I want them.

    --
    [ e d @ h a l l e y . c c ]

Re: Add CSS class for signatures?
by naChoZ (Curate) on Sep 05, 2003 at 13:27 UTC

    I think that's a great idea. The ones that also make me grimace are sigs that don't play well with the dark theme.

    I'm curious, though. This will expose my css ignorance, but isn't the named class supposed to be in a style sheet? So, wouldn't using the class pmsig-NNN mean that you'd have to set up a style for the individual monk's sig?

    --
    "I just read perlman:perlboot," said Tom, objectively.
    naChoZ

      I'm curious, though. This will expose my css ignorance, but isn't the named class supposed to be in a style sheet? So, wouldn't using the class pmsig-NNN mean that you'd have to set up a style for the individual monk's sig?

      If you're fortunate enough to use a browser with vaguely decent CSS2 support you could use a selector like this:

      /* make all pmsigs bold */ div[class|=pmsig] { font-weight: bold; }
Re: Add CSS class for signatures?
by valdez (Monsignor) on Sep 05, 2003 at 16:50 UTC

    We can't enforce that wrapping you suggested, so is this a request to every monk? I wrapped my signature with <div class="pmsig">, hope this helps :)

    Ciao, Valerio

      It can't completely be enforced, but I've generated a patch for the reply box that puts the div tags around the signature when it pre-populates the reply box. (addnewnoteform, for members of pmdev.)

        Like at least several other monks (that I know of), I have some "template" information in my signature. With that patch, I'd end up typing my entire node content within the "sig" unless I remember (every single time I post) to move things around.

        But I think that problem can be addressed by a minor improvement to the patch: Only add the tags if they aren't already present in the signature. Then I can update my signature one time to incorporate the new tags (which I can cut-n-paste from a quick "preview") and never have to move parts after that.

        Other than that, I worry that perhaps we need to think a little more about the tag. I'm anything but a CSS expert, so I'll ask some dumb questions. I guess div is a better choice than span since a signature really shouldn't be an in-line entity. Someone already gave an example of apply custom CSS to all sigs. Is that type of wildcarding common in browsers supporting CSS? Or should we have both a per-user tag and a all-sigs tag? Perhaps something like <div class="pmsig" id="pmsig-22609">?

        I'd rather get that right the first time than have to worry about backward compat when we realize we didn't as good as we could.

        Thanks for the idea, adrianh, for the patch, chromatic, and for the future feedback, y'all.

                        - tye
        What a nice man!
Re: Add CSS class for signatures?
by demerphq (Chancellor) on Feb 06, 2004 at 15:28 UTC

    Just thought I should follow up on this. The signature handling code has been extended recently. You can find details at Signatures and Node Templates

    Cheers.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://289201]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-16 17:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found