Rob Young

Twitter Flickr Last.fm LinkedIn LinkedIn
MarshmallowsGuess what it is!Moth EggsBehe-mothSummer BarbecueRed Wine MeniscusWest Coast SunsetMay BugA Burst Of WhiteGreen & PinkIris

Posting flickr Images to phpBB3 using HTML and Custom BBCode

without comments

Due to the fact that phpBB3 doesn’t let you post html, posting images from flickr on phpBB3 looks like a bit of a hash-up involving [IMG] and [URL] tags. I searched for ages for a Custom BBCode that allowed you to post the HTML provided by flickr on the “All Sizes” page in a custom tag, but found nothing. Thankfully, one of my friends knocked one together – so here’s how to use flickr’s HTML in a custom phpBB3 BBCode tag and get nice output.This BBCode only really works if you use medium size – I can’t really see the need for anything larger on a forum though.

To make the changes, you’ll need to go to the Admin Control Panel (ACP) and the Posting section.

Add a Custom BBCode, and you’ll be presented with a screen:

  1. This field defines what text will be replaced. In our case, we’re specifying that whenever the [flickr=][/flickr] tag is written, the HTML after the equals will be formatted. Enter the following into this field:
  2. [flickr=<a href="{URL1}" title="{TEXT1}"><img src="{URL2}" width="{NUMBER1}" height="{NUMBER2}" alt="{TEXT2}" /></a>][/flickr]
  3. This field translates what’s been entered by the user in the custom tag into HTML output. In our case it’s taking the flickr HTML string and showing the image with a caption:
  4. <a href="{URL1}" title="{TEXT1}"><img src="{URL2}" width="{NUMBER1}" height="{NUMBER2}" alt="{TEXT2}" /></a><br /><a href="{URL1}">{TEXT2}</a>
  5. This field is the mouseover text – set it to whatever you want. I set:
  6. Flickr: [flickr=<Flickr, Medium Size, Copy & Paste HTML>][/flickr]

    Lastly, make sure you’ve ticked “Display on posting page” if you want the flickr= tag to appear with the others (such as [IMG]) when writing a new post.

Done! Now you’ll be able to write [flickr=][/flickr] and get a nicely formatted image, with a clickable title. This doesn’t violate flickr’s community guidelines, as it links back to the photo page.

Hope this helped – again, credit to my friend for writing it :)

Written by Rob

October 9th, 2008 at 2:37 am

Posted in Programming,Tutorials

Tagged with , ,

Leave a Reply

You must be logged in to post a comment.