• I noticed that iimage gallery inputs a <gallery> tag into the body of the post, which then outputs as nested divs. I need something like this for my blog. How do you create tags that stand for code? I know the <!–more–> tag outputs html, but I don’t know how to create my own tags. For instance, I would like to be able to input <picframe>image</picframe> and have it output as <div><div><div>image></div></div></div>.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter public_radio

    (@public_radio)

    or <div><div><div>image</div></div></div>, rather. but you get the idea.

    Moderator James Huff

    (@macmanx)

    Thread Starter public_radio

    (@public_radio)

    thanks, but i’m familiar with that tutorial and I’m not looking to make my own quicktags. The <!–more–> ‘quicktag’ isn’t a quicktag at all; rather it’s a tag you put into the post that represents the html code that is output in the post. I want to know how to create my own tags.

    You would have to write something (i.e. a plugin) that would parse post content for your homemade tag and translate it to whatever your tag is supposed to represent in X/HTML lingo. I’d look at the source of current plugins, like those that handle bbcode tags and such, to see what’s required.

    Thread Starter public_radio

    (@public_radio)

    good idea. off hand, can anyone think of a plugin that uses its own tags? I know exhibit creates an <!–exhibit–> tag, and iimage gallery creates a <gallery> tag, but it would be nice to look at some other ones to see if i can find a simpler script to try and emulate.

    If you’re not planning on doing anything special with your own tags (like provide attributes), this should do it:

    https://guff.szub.net/source/my-tags.php

    K, I love the rant tag, I just may have to play around with this for my own amusement.
    And so with that, could the previous mentioned tutorial for adding quicktag buttons be used for user created tag?

    “And so with that, could the previous mentioned tutorial for adding quicktag buttons be used for user created tag?”

    Why not? The great thing about being able to do the same thing in different ways is, you get to pick your favorite.

    Thread Starter public_radio

    (@public_radio)

    Wow, awesome. Thanks Kafk!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘defining your own tags’ is closed to new replies.