News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

clickable images bbcode

Started by Chaos Dragon, June 07, 2008, 09:18:44 PM

Previous topic - Next topic

Realinfo

Not working in my Smf 1.1.10............

bpratt

Quote from: Chaos Dragon on November 25, 2009, 04:25:31 AM
Hasn't been updated for RC2 yet will hopefully have it by the end of the week


Just a quick wondering how the RC2 version is coming along ?  :)

TomW


Rattler

#23
Installed and worked w/o probs on 1.1.11, but before being able to install - as I FTP the unzipped mod file manually to the Packages - had to change the filename: Package Manager was not reacting to the way it ws spelled: "clickableimage1[1].0": When I took the "[1]" out it worked.

As my users were not sure what to put behind the "url=" I changed it so it now displays "url=http://someSite":

In ./Themes/default/Post.template.php

replaced
'clickableImage' => array('code' => 'url', 'before' => '[url=][img]', 'after' => '[/img][/url]', 'description' => $txt['clickable image']),

with
'clickableImage' => array('code' => 'url', 'before' => '[url=http://someSite][img]', 'after' => '[/img][/url]', 'description' => $txt['clickable image']),

Also, to make the mouseover keeping with the other BBCode icon mouseover standards, modified the test to "Insert Clickable Image" here:

Replaced, at the file end of ./Themes/default/languages/Modifications.english.php


$txt['clickable image'] = 'clickable image';


with


$txt['clickable image'] = 'Insert Clickable Image';


Thanks for that helpful snippet.

Rattler
You can discuss with people, and sometimes it even makes sense to do so. Forget that when confronted with the cruel facts of life... (inspired by SiGnature™).

Rattler

While I was at it, I used your little mod to also help with the "descriptive link" BBCode, another thing my users always have to look the tag up for (and hence rarely use it).

- Created an icon for insertion of descriptive link (see attached, feel free to use) and then modified and added your code for ths function:

- At file end of ./Themes/default/languages/Modifications.english.php

Found:
?>

Added before:
$txt['descriptive link'] = 'Insert Descriptive Link';


- In ./Themes/default/Post.template.php

Found (in the BBCode array)

'clickableImage' => array('code' => 'url', 'before' => '[url=http://someSite][img]', 'after' => '[/img][/url]', 'description' => $txt['clickable image']),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),


and replaced with

'clickableImage' => array('code' => 'url', 'before' => '[url=http://someSite][img]', 'after' => '[/img][/url]', 'description' => $txt['clickable image']),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]),

'descriptiveLink' => array('code' => 'url', 'before' => '[url=http://someSite]yourText', 'after' => '[/url]', 'description' => $txt['descriptive link']),

'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),


- Moved the attched icon to ./Themes/default/images/bbc/

Works, thanks agin for the idea!

Rattler
You can discuss with people, and sometimes it even makes sense to do so. Forget that when confronted with the cruel facts of life... (inspired by SiGnature™).

piers38

Got it working on  2.0 RC4

In /Sources/Subs-Editor.php
Find:

array(
'image' => 'img',
'code' => 'img',
'before' => '[img]',
'after' => '[/img]',
'description' => $txt['image']
),


Add after
          array(
'image' => 'clickableImage',
'code' => 'url/img',
'before' => '[url=http://][img]',
'after' => '[/img][/url]',
'description' => $txt['clickable image']
),


In  /Themes/default/languages/Modifications.english.php

Find
?>

Add before
$txt['clickable image'] = 'Insert clickable image';

Then upload clickableImage.gif to /themes/default/images/bbc/
hxxp:askfaq.org/ [nonactive]

Apllicmz

Thanks
good work
when Update dont forhet portuguese
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end"></search>
                        <add><![CDATA[
$txt['clickable image'] = 'Imagem clic&aacute;vel';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end"></search>
                        <add><![CDATA[
$txt['clickable image'] = 'Imagem clic&aacute;vel';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
        <operation>
            <search position="end"></search>
                        <add><![CDATA[
$txt['clickable image'] = 'Imagem clic&aacute;vel';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
        <operation>
            <search position="end"></search>
                        <add><![CDATA[
$txt['clickable image'] = 'Imagem clic&aacute;vel';
]]></add>
        </operation>
    </file>




Advertisement: