Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Add CSS class for signatures?

by adrianh (Chancellor)
on Sep 05, 2003 at 13:02 UTC ( #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.

      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



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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://289201]
Approved by broquaint
[1nickt]: choroba Is it a safe assumption that if there is a threaded perl then the user will want to use Thread::Queue?
[hippo]: Why not?
[1nickt]: That's good! I suppose the cpanfile would be the same however the app distro is structured ...
[1nickt]: hippo no reason why not other than wanting to check an assumption :-)
[hippo]: For a self-contained application which can therefore ensure thread safety it seems like a sensible approach.
[choroba]: No, if there are no threads, then the user wants to use MCE. If there are threads, the user can choose.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (19)
As of 2017-10-18 13:14 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (244 votes). Check out past polls.