Loading...
 
Development

Development


Picture link's specification

posts: 33

Hi All,
I'm having a site on base of TikiWiki but I want to make some modification to it.
I want to change the way images are included in Wiki pages, i.e. I want that if user includes the line

Copy to clipboard
{img src=show_image.php?id=8 }

in an Wiki page, the code change it to

Copy to clipboard
<a href="http://localhost/drelectron/show_image.php?name=NoNinvert.jpg"> <img src="http://localhost/drelectron/show_image.php?name=NoNinvert.jpg&thumb=1"> </a>


I mean that it always show the thumbnail (or an scaled one) and make a link to the original picture. As my site contain many big pictures, it could help having pages better viewed.
As I'm a Delphi developer, I think I can do it my self but I should know some thing before:

I should know were the Wiki tags like
Copy to clipboard
{img src=show_image.php?id=8 }
are replaced with original HTML one's.

Please some one help me with this, saying me were tags are replaced?

posts: 23 United Kingdom

You can already do this with an image:

Copy to clipboard
{img src=thumbnail link=browse-image}


I do this all the time on Orionrobots.

I think lib/tikilib.php is where the wiki markup conversion is performed. If you want a more advanced or different tag. my suggestion is not to replace the original markup, but to create a plugin to do it, have a look in lib/wiki-plugins/ for some examples.

Cheers,
Danny

posts: 4656 Japan

Also see PluginThumbdiv for an example. This plugin emulates the Wikipedia style of image thumbnail plus extended caption.

-- Gary

posts: 33

> Also see PluginThumbdiv for an example. This plugin emulates the Wikipedia style of image thumbnail plus extended caption.
>
> — Gary

taht's exactly what I want, but were to download the plugin?

posts: 4656 Japan

> > Also see PluginThumbdiv for an example. This plugin emulates the Wikipedia style of image thumbnail plus extended caption.
> >
> > — Gary
>
> taht's exactly what I want, but were to download the plugin?

It's included with the Tikipedia theme, which you can download here. (You need to be logged in at themes.tw.o to download files — use the same name and password as at this site.)

That plugin uses CSS for styling. It'll work in all themes, but will just be the image with the text under it. tikipedia.css already has style properties specified, but for other themes you'll have to add the selectors and properties yourself, following the example shown on the PluginThumbdiv page.

-- Gary


posts: 33

Thanks all,
I will try them.