Word Press Code Box Help

Discussion in 'Blogging' started by allout, Nov 13, 2008.

  1. #1
    I have an image on my blog that I want others to place on there blogs.

    How do I do a code box in my sidebar for them to copy and paste the code to place on their blog?

    This is a blogspot blog but there is an example of what I want on the sidbar under Snag My New Button.

    http://redsoxmommy.blogspot.com/

    That code box is an example of what I am wanting to do on my WP blog.

    Thanks for any help!:)
     
    allout, Nov 13, 2008 IP
  2. UseShots

    UseShots Peon

    Messages:
    244
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is the code I use on my site.
    <form>
    <textarea style="width: 700px; height: 28px;" id="id_shortcut" rows="1" name="message" readonly="readonly">&lt;a href="http://www.UnmaskParasites.com/security-report/" title="Web page security check by Unmask Parasites"&gt;Security Check&lt;/a&gt;</textarea>           
    </form>
    HTML:
    Just put your code inside the "textarea" tag.

    If you want to see how it works on my site just click this link Security Check, the code box should be at the bottom of the report.

    For better user experience you might want to play more with styles and JavaScript. I.e. change width and height, number of rows, make the code autoselectable, etc.

    Then add the code into your theme or into a custom widget.
     
    UseShots, Nov 14, 2008 IP
    allout likes this.
  3. allout

    allout Prominent Member

    Messages:
    5,000
    Likes Received:
    461
    Best Answers:
    2
    Trophy Points:
    340
    #3

    Hey that is what I was looking for! :)

    Thanks a lot, you can see it in action on my blog That Blozzz.

    I appreciate the help and I gave you some green! :)
     
    allout, Nov 14, 2008 IP
  4. UseShots

    UseShots Peon

    Messages:
    244
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You might also want to add some javaScript to make it autoselectable when visitors click it.

    <textarea onClick="javascript:this.focus(); this.select();" ...
    HTML:
     
    UseShots, Nov 14, 2008 IP
  5. allout

    allout Prominent Member

    Messages:
    5,000
    Likes Received:
    461
    Best Answers:
    2
    Trophy Points:
    340
    #5

    Do I put that before the style="width?
     
    allout, Nov 14, 2008 IP
  6. UseShots

    UseShots Peon

    Messages:
    244
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yeah. Actually anywhere inside the "textarea" tag. Before "style" should work.
     
    UseShots, Nov 14, 2008 IP
  7. allout

    allout Prominent Member

    Messages:
    5,000
    Likes Received:
    461
    Best Answers:
    2
    Trophy Points:
    340
    #7
    Thanks again, it worked like a charm. :)
     
    allout, Nov 14, 2008 IP