• public_radio

    (@public_radio)


    I would like to add comment style quicktags like the <-more-> tag. I would like to add for instance, like to input <pictureframe><img src=”x.jpg”></pictureframe>

    and have it print
    <div class=”pictureframe”><img src=”x.jpg”></div>

    is this difficult? how do i do it? i know the iimage gallery plugin utilizes this function.

Viewing 13 replies - 1 through 13 (of 13 total)
  • jinsan

    (@jinsan)

    yur post is VERY confusing for me – you refer to the image gallery, which places the tag not in comments but inthe admin area. So are you saying you want a quicktag in the admin area? To have it in the comments would require the install of the quicktags comments plugin.

    If that’s the case, send Podz a can of SKOL or some tea for this excellent guide:

    http://www.tamba2.org.uk/wordpress/quicktags/

    Tea please πŸ™‚
    (and some jaffa cakes !)

    jinsan

    (@jinsan)

    wonder if they have jaffa cakes outside of here?

    Thread Starter public_radio

    (@public_radio)

    sorry, I thought it might be unclear. WordPress seems to refer to two different things as quicktags: the javascript buttons that insert html code, and the comment tags like ‘more’ that then output html in your post.

    I know how to add javascript quicktags, but i’m wondering how to add my own comment tags that then spit output into the post, like the ‘more’ tag or the ‘exhibit’ comment tag, like the exhibit plugin uses. also, iimage gallery uses its own defined <gallery> and </gallery> tags, which then output html div tags in the post.

    does that make sense?

    jinsan

    (@jinsan)

    the way to add the more tag is by clicking more or adding the more tag manually.

    So add the quicktags as to the javascript file, in which you can add things like <galler></gallery> as a button, and you woudl slect it and it would enter the code within the post.

    Again when you say comments that confuses the monkey out of me. Quicktags can be used in comments and posts. In the comments you wouldn’t have More as a quicktag, although I guess it culd be added, but seems a little silly.

    Lorelle

    (@lorelle)

    In the article on customizing the Read More tag, it doesn’t go into great detail about the html you can add to the read tag, but I’m sure you can add background images and other details. If you want the same graphic on every “read more” statement, then just set your CSS to feature a background image in the style.

    If you want a different image for every usage, that’s more complicated. According to the template tag information, the tag’s usage is pretty limited and one dimensional, in a way. Maybe someone has a plugin that improves this?

    Thread Starter public_radio

    (@public_radio)

    i understand that. however, with the more tag, you input <!–more–> and it outputs:

    <pre>
    Read the rest of this entry »
    </pre>

    So i’m asking how do i create a tag that inputs, say, <!–smileyface–>

    and outputs

    <pre>
    <div class=”smiley”>:-)</div>
    </pre>

    Thread Starter public_radio

    (@public_radio)

    hmm that post came out a little mangled. It makes sense though, what i’m asking?

    jinsan

    (@jinsan)

    ah that makes more sense – well, there are plugins I believe that do this sort of thing and allow the adding of custom tags. I can’t remember the name sadly, but this might do somethign similar until someone remembers what it is:

    http://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/

    ColdForged

    (@coldforged)

    Sounds like you need to write a plugin and use an add_filter() on the_content. Base it on code in the wp-includes/template-functions-post.php file in the get_the_content() function which is the one that processes the <!--more--> and <!--noteaser--> tags.

    jinsan

    (@jinsan)

    wouldn’t textile or something similar allow the addition of custom filters?

    Thread Starter public_radio

    (@public_radio)

    add_filter() you say? I’m not familiar with that function. where can i learn more about it?

    Thread Starter public_radio

    (@public_radio)

    textile allows custom filters?

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘comment style quicktags’ is closed to new replies.