PDA

View Full Version : Addon: Linkage


aran
06-24-2008, 10:31 PM
http://www.pixelpost.org/extend/addons/linkage/

Displays various linking options for users to link back to your images.

Installation:

1. Add linkage.php to your addon's folder and enable.
2. Then simply add <LINKAGE> to your image_template.html file.

Options:


htmlcode = Yes/No

This will display code for a link to the image and a thumbnail.

imgcode = Yes/No

This will display code for use on forums, showing the thumbnail.

urlcode = Yes/No

This will display a link to the images home page.

directurl = Yes/No

This will display the url for the full sized image.



Example:

<LINKAGE htmlcode="yes" urlcode="yes">

The above template tag will display the HTML code for the image, and also display the url for the current images page.

Demo:

A demo of this plugin can be seen on my photo blog found at http://aran-w.net/pblog/ just click on Details and its above the comments section.

Changelog

v0.3

Updated documentation to match changes made in v0.2

v0.2

Removed underlines from options to solve various errors in PHP code.

aran
06-29-2008, 08:40 AM
I just updated the version of Linkage, the only change though is the documentation at the moment.

witty
07-05-2008, 09:17 PM
Hi,

I really like this simple addon. It's very handy. I'd like to point out this little addition I made to the code on line 101 of linkage.php (because that's the only option I'm using):

I added this:

onFocus=\"this.select()\"

It's makes it easier for copying and pasting. With one click, it highlights everything in the field.

I also customized the size of the field with:

size=\"50\"

Now the whole line looks like this:


$linkage .= "<input type=\"text\" class=\"input-link\" id=\"html-code\" value=\"".$cfgrow['siteurl']."images/" .$row['image'] ."\" size=\"50\" onFocus=\"this.select()\" />";


You can see how it works by clicking on the thumb-row in my signature, then the "Info & Comments" link on any image page. Cool addon. Thanks!


-Witty

aran
07-08-2008, 01:24 PM
Ta, will add this to the version, which may not be out until am back from Tanzania.