[pmwiki-users] Custom Markup for Rollover

Paul Johnston paul at pjnetsolutions.com
Mon Jul 17 05:39:13 CDT 2006


Still would like help with this, if only to figure out how to create 
Custom Markup correctly...

Kathryn Andersen wrote:
> On Fri, Jul 14, 2006 at 01:35:18PM +0100, Paul Johnston wrote:
>   
> I didn't want to make assumptions.

:)

> However.... (scrunches up face in thought)
>
> There are three ways of putting CSS into PmWiki
> - in the skin
> - in local.css
> - $HTMLStylesFmt array variable, to which you can add styles which will
>   be put in the top part of the page.  This is what you could use for
>   "dynamic" CSS.
>
> So, you could have your "rollover" markup call a PHP function, which
> would then add the appropriate CSS to the $HTMLStyleFmt array, as well
> as making the actual link in question.

:) I'm there already (but not in CSS).

Ok - simplifying the question:

I want to be able to add a Markup definition into my config.php that
allows me to put something like this:

(:rollover link img1|img2"alt":)

(link could be a wiki link) and out comes something like this:

<a href="<linkurl>"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('ImageId','','img2',1)">
    <img src="img1"
        name="ImageId"
        alt="alt text">
</a>

Let's get away from the CSS idea because I'm sure others would want to
do the same as I'm trying to do here (and it's a thread about creating 
custom markup for a rollover).

I want to focus more on HOW to do it, not why or whether I should do it
"this way" or "that way".

Is there a simple replacement I can do that will then not be mangled by
further replacements?  I'm REALLY confused by HOW to do this.

> Would your "rollover" markup have to upload the images in question also,
> or are they savvy enough to be able to install them first?
>   

I have built an image uploading tool, which is stunningly simple even my
dad can use it.  They can upload images easily, and can create their own
images if they wish.  I do not want control of the design.

> Bah!  Can't you persuade them that image rollovers are a Bad Thing?
> Threaten them with Disabilities legislation.  (sigh)
>   

Erm - IANAD (...Designer) and I personally don't care about what
design they want.  There's nothing wrong with image Rollovers in my
book (so let's not have that debate!), and to be honest, if they want to 
be able to have them, then that's fine.

> (sigh)
> Simple replacement markup is probably easier.

Yes - I understand this, but I'm having problems creating "simple
replacement markup" because either my images get changed, or my markup
gets changed and etc...

I don't understand how to create "simple replacement markup" for images
that they choose.

Think simple not complicated.

Paul






More information about the pmwiki-users mailing list