Forums

Something like BB-Code (4 posts)

  1. mitzabzzz
    Member
    Posted 1 year ago #

    Hey,

    I have a photoblog and I want to create a plugin to make my posts much easyer to write. I want to make something like bb-code and when I post something like:
    [image image.jpg "Text for the image"]
    to display on the blog the image and the text below it. Also I want to add a votesystem for each image posted (I made one, but it's to much code to copy and paste every time I post a image). I saw something like it in a plugin for contact, but I looked in the code and found nothing that interests me.
    I don't want you to post me a full code, I only want a link to learn how to do it.

    Thanks in advance and please excusse my poor english (not my native language).

  2. Viper007Bond
    Member
    Posted 1 year ago #

    I wrote a BBCode plugin a while back: http://wordpress.org/extend/plugins/bbcode/

    As for that particular shortcode format ([image image.jpg "Text for the image"]), you'd have to write a custom plugin.

    See this page: http://codex.wordpress.org/Shortcode_API

  3. Templarian
    Member
    Posted 1 year ago #

    An alternative to shortcode (which does more than my plugin can do currently till I have free time) would be:

    http://wordpress.org/extend/plugins/bbcode-w-editor/

    //edit, it only works if you have the plugin that turns your quotes into the directional quotes off, I'll try edit it so it can handle directional quotes later on. [image <1> "<2>"] -> <img src="[1]" title="[2]" alt="[2]" /> is the basic mark up.

    (sorry viper, I'm not trying to not compete with your plugin I didn't even realize it existed till I tried to add mine).

  4. Viper007Bond
    Member
    Posted 1 year ago #

    No need to apologize. Mine's just something I threw together in a half hour to play around with the shortcode. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags