News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

IMG Popup

Started by Kill Em All, October 01, 2010, 12:23:20 PM

Previous topic - Next topic

Kill Em All

Link to Mod

IMG Popup
by Kill Em All
1.0.2 (10/5/2010)

For SMF 2.0 RC3

This mod will edit the IMG tag BBC button in order so that if you are not using the WYSIWYG editor, you can still get a popup box for the IMG BBC asking for a link to the image. I plan on extending this mod further as time goes on.


I would also like to thank Arantor for creating the mod URL popup mod which helped me out with this. You can find some more of his mods over at http://arantormods.com/


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Spoogs


Oya

nice thanks for sharing

been meaning to add this myself but nice to see its been done

Bugo

Nice, but you forgot to add $txt['prompt_text_desc'] :)

Undefined index: prompt_text_desc

Kill Em All

Alright, the mod has been updated and should now be error free. :)


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Bruno36

the mod does not work on my forum, there is nothing new when I click the img bbcode
Bruno36 the French
SMF 2.0.9

Oya

Quote from: Bruno36 on October 13, 2010, 03:42:57 AM
the mod does not work on my forum, there is nothing new when I click the img bbcode

in wysiwyg or non wysiwyg mode?

Bruno36

Bruno36 the French
SMF 2.0.9

Oya

well theres no difference in wysiwyg mode but there should be in non wysiwyg mode unless you have some other javascript errors?

Bruno36

it works well with WYSIWYG activate
Bruno36 the French
SMF 2.0.9

Oya

um this mod doesnt do anything in wysiwyg mode - that's built in to smf!

Bruno36

WYSIWYG disable its not working
Bruno36 the French
SMF 2.0.9

Kill Em All

Make sure that the changes have been made to the required files. Also check if your using a custom theme, check to make sure its not using its own editor.js file, which I don't see why it would, but just in case.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

T3CHN0

Quote from: Kill Em All on October 13, 2010, 08:16:20 PM
Make sure that the changes have been made to the required files. Also check if your using a custom theme, check to make sure its not using its own editor.js file, which I don't see why it would, but just in case.
does not work on my forum either, checked everything suggested. all edits are good
but when I press img bbs it does not open a popup where I can past the image url into it. just shows [img] [\img] still

SORRY my bad, it does work. I had to clear the cache by pressing ALT+F5 and it all works now
sweet, have wanted something like this for a long time...

Kill Em All

Glad to see that this is working for you.

Edit: and thank you for providing the solution.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

thekingofzing

Thanks so much I needed something like this   O:)

420Connect.co.uk

I'm attempting adding this to my forum but can't seem to get the IMG pop up and URL pop up both to work together >.<
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

420Connect.co.uk

Quote from: 420connect.info on December 10, 2014, 03:37:12 PM
I'm attempting adding this to my forum but can't seem to get the IMG pop up and URL pop up both to work together >.<

Reattempting this and getting the same results  :-[
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

chaos40

#18
Nice mod

For any of you using https on your forum you must change http to https in your editor.js file

// IMG popup?
if (oButtonProperties.sCode == 'img')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], '[b]http[/b]://');
if (!sText)
return;

var bbcode = '[img]http://' + sText + '[/img]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// Replace?
else if (!('sAfter' in oButtonProperties) || oButtonProperties.sAfter == null)


Please use code tags when posting code. Thanks. ~ Steve

Advertisement: