News:

Wondering if this will always be free?  See why free is better.

Main Menu

Image Quote Removal

Started by Windy, May 13, 2008, 02:50:15 AM

Previous topic - Next topic

Windy

Link to Mod

Image Quote Removal v1.0


Designed to automatically hide any images that appear in quotes, replacing them with a button, that when clicked will reveal the image.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

spoontosser

Installed fine on 1.1.5 and works great...nice work!

Jelle Mees

The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

Windy

Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.
I have tested it in firefox, and it worked fine for me.
I can only think of three reasons, either your browser is accessing a cached version of the javascript file, in which case you'll need to refresh your browser's cache, or you're using a extension like NoScript and it's stopping the code from being executed or javascript has been disabled.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Jelle Mees

Well, what you can do is release another mod that replaces the image by a link to the image. Then the user doesn't require a browser with reduced security.

Example:

I post:

Quote

Do you like this image?

Someone quotes me:

Quote
QuoteImage removed. Click here to view quoted image.

Do you like this image?

It's simpel and will work in every browser.

It's never good that certain browser-settings are required for a page to work properly, well, that's my opinion.
I personally uncheck certain javascript permission to avoid ennoying advertisements. And I am not the only one.

Apllicmz

Nice Work
Good Mod

i translate Portugues and brazilian

<file name="$themedir/languages/index.portuguese.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['view_image'] = 'Ver Imagem';]]></add>
</operation>
</file>

<file name="$themedir/languages/index.brazilian.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['view_image'] = 'Ver Imagem';]]></add>
</operation>
</file>



Bulakbol

Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

If you tried attached image's url, FF won't open it. It's fine with Opera ang IE.
[img]http://.../testboard/index.php?action=dlattach;topic=116.0;attach=17;image[/img]
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

уιℓмαz

#7
Thanks I installed it.

Translation in Turkish:

<file name="$themedir/languages/index.turkish.php" error="skip">
      <operation>
         <search position="end"></search>
         <add><![CDATA[
$txt['view_image'] = 'Resmi Görüntüle';]]></add>
      </operation>
   </file>

tsis_k

Thanks for the Mod.

Is it possible to disable the picture link in the quote?

What I want is to completely remove any link or reference to the picture in the quote.

Thanks for you help.

Windy

#9
Sure it's possible, just open up the zip file and open the modification.xml file
You'll want to remove this part down here as you won't be needing it anymore

<file name="$themedir/script.js">
<operation>
<search position="before"><![CDATA[indicator.style.display = turn_on ? "block" : "none";
}
}]]></search>
<add>
<![CDATA[

// Shows the image when it is clicked on.
function showImage(obj)
{
obj.parentNode.childNodes[1].style.display = "";
obj.style.display = "none";
return false;
}

]]>
</add>
</operation>
</file>


then take this part here

$tag['content'] = '<span><input type="button" value="' . $txt['view_image'] . '" onclick="return showImage(this);" /><span style="display:none">' . $tag['content'] . '</span></span>';

and replace it with

$tag['content'] = '';
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

MissyNL

Quote from: JohnyB on May 14, 2008, 12:02:26 AM
Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

If you tried attached image's url, FF won't open it. It's fine with Opera ang IE.
[img]http://.../testboard/index.php?action=dlattach;topic=116.0;attach=17;image[/img]

it there anyone who has a solution for this problem?
Sorry for my poor English, but i think it's probably better then your Dutch :)

DadL

I got these errros:
http://www.forum.com/index.php?topic=8325.15
8: Undefined index: view_image
File: /home/username/public_html/Sources/Subs.php
Line: 2261


And there is no phrase "Image removed. Click here to view quoted image." when quoted.
Only a small box appeared, and when click that small box- the image shows.

Any help? I want this mod.

Harvest

#12
Quote from: DadL on June 13, 2008, 04:00:58 AM
I got these errors:
http://www.forum.com/index.php?topic=8325.15
8: Undefined index: view_image
File: /home/username/public_html/Sources/Subs.php
Line: 2261



And there is no phrase "Image removed. Click here to view quoted image." when quoted.
Only a small box appeared, and when click that small box- the image shows.

Any help? I want this mod.

I'm guessing Your language file was not properly modified.

Check if You have

$txt['view_image'] = 'View Image';

In Your "./Themes/default/languages/index.[your_language_here].php "file


Quote from: Lafemme on June 11, 2008, 03:39:02 AM
Quote from: JohnyB on May 14, 2008, 12:02:26 AM
Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

If you tried attached image's url, FF won't open it. It's fine with Opera ang IE.
[img]http://.../testboard/index.php?action=dlattach;topic=116.0;attach=17;image[/img]

it there anyone who has a solution for this problem?

I've changed
Code (find) Select

obj.parentNode.childNodes[1].style.display = "";


Code (replace) Select

obj.parentNode.childNodes[1].style.display = "display";


And it seems to work on FF.

DadL

#13
Quote from: Harvest on June 13, 2008, 08:31:28 AM
I'm guessing Your language file was not properly modified.

Check if You have

$txt['view_image'] = 'View Image';

In Your "./Themes/default/languages/index.[your_language_here].php "file

Hi Harvest, i do not have $txt['view_image'] = 'View Image'; in my index.english.php file

where will i place that?

Harvest


saosangmo

very nice hack. Thank Windy

MissyNL

hi... them stranges thing happend.. when i installad.. and modified.. it did nothing.. when i put back the original file with the intention to uninstall it again.. it worked... very weird! but.. anyway.. thank you for your help!! Bey :D
Sorry for my poor English, but i think it's probably better then your Dutch :)

marko_andres


Version SMF: 2.0 RC3
Theme        : Inferno
Portal          : Simple Portal 2.3.2


Por un cambio de conciencia --> http://thezeitgeistmovement.com/

Windy

Quote from: marko_andres on December 14, 2009, 01:03:14 PM
works fine in 1.1.11 ??
I haven't tested it, but it should do, as long as you use version emulate.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

-SyN-

Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

Quote from: MissyNL on June 11, 2008, 03:39:02 AM
Quote from: JohnyB on May 14, 2008, 12:02:26 AM
Quote from: Jelle Mees on May 13, 2008, 07:58:20 PM
The modification works fine on SMF 2.0 Beta 3.1, but only in Internet Explorer.
Nothing happens in Firefox 2.0.14 when I click on the button.

If you tried attached image's url, FF won't open it. It's fine with Opera ang IE.
[img]http://.../testboard/index.php?action=dlattach;topic=116.0;attach=17;image[/img]

it there anyone who has a solution for this problem?

I had the same problem and I did a hard refresh, using the latest firefox that is by pressing ctrl+f5, afterwards the mod worked like it should. Give that a try.

Quote from: marko_andres on December 14, 2009, 01:03:14 PM
works fine in 1.1.11 ??

Yes, thats what version im using. You have to edit the package info xml file to make it compatible though.

Also thank you for this mod. "points to topic starter!"

Advertisement: