Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Rik© on September 19, 2008, 07:43:00 AM

Title: Reflection BBCODE
Post by: Rik© on September 19, 2008, 07:43:00 AM

Reflection BBCODE
Author: SimpleTweaks (http://simpletweaks.co.nr) - Rik©
Additional Author: NIBOGO


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1397) | Support Topic (http://www.simplemachines.org/community/index.php?topic=262885.0) | My Mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=17803)



This mod adds a reflect to posted images.
Features:
- Reflection for Images
- Use [reflect]http://www.images.com/sample.gif[/reflect]
- Support SMF 1.1.X and SMF 2.0
- Supports the Enhanced Quick Reply 2.0 by Kirby



Languages

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg98.imageshack.us%2Fimg98%2F9286%2F26016941.png&hash=8cc58858fe8413e0ef77e81196aa77e6c2c72833) english + english-utf8
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg17.imageshack.us%2Fimg17%2F6196%2F46331734.png&hash=8b482091c199d352532a3e2ad6a89dd154c71ba6) brazilian + brazilian-utf8 (by Costa)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg685.imageshack.us%2Fimg685%2F9704%2F22081073.png&hash=048efd0fea5baf0abf12aac31634b76c66bc983d) dutch + dutch-utf8

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg340.imageshack.us%2Fimg340%2F88%2F70395122.png&hash=49f0dea821888d83ce2c58738c917e3a51e1498a) spanish _es+ spanish_es-utf8
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg340.imageshack.us%2Fimg340%2F88%2F70395122.png&hash=49f0dea821888d83ce2c58738c917e3a51e1498a) spanish_latin + spanish_latin-utf8
SimpleTweaks welcomes translations.
Please submit your translation @ the support topic or SimpleTweaks site (http://simpletweaks.co.nr).



Compatibility

- 2.0 RC3
- 2.0 RC2
- 1.1.X



Copyright & Credits

Reflection.js (http://cow.neondragon.net/stuff/reflection/)
Copyright (c) 2005-2008, cow.neondragon.net
All rights reserved.


By downloading and/or using Reflection BBCODE you agree to adhere to the following conditions:
- You are FREE to use this MOD on your SMF Forums, however, in no way can the Author/Creator of this MOD be held responsible under any circumstances.
- You understand that this MOD is provided "as is" and the said Author/Creator will not be held responsible for any use and/or misuse of this MOD by any and/or all members on your forum(s).
- You are FREE to redistribute this MOD in its original, released state ONLY!




Changelog

! bug fix | x changed | + added feature | - Info only

1.0.5 (28 Feb 2010)
!  Fixed 'Failed Modification Subs-Editor.php' bug
x New bbcode button image
x New demo image
+ Spanish-es support

1.0.4 (26 Feb 2010)
x Reflection.js v2.0
-  Support for Google Chrome

1.0.3 (20 Feb 2010)
x New developer
x New readme file
+ Dutch translation
-  Mod adopted by Rik©

1.0.2 (08 Oct 2009)
x New readme file
+ Added support for SMF 1.1.10
+ Brazilian translation thanks to Costa

1.0. (10 September 2008)
- Initial Release by NIBOGO



Silk icons by Mark James http://www.famfamfam.com/lab/icons/silk/
©2010, SimpleTweaks (http://simpletweaks.co.nr)
Title: Re: Reflection BBCODE
Post by: cme1st2302 on September 19, 2008, 09:56:00 AM
The "Go To Mod" picture link up top goes to the wrong mod.  Just thought I'd let you know.
Title: Re: Reflection BBCODE
Post by: jayc7176 on September 19, 2008, 12:39:10 PM
This is an Awsom mod! can't wait to Try it out!!!  Thanks!
Title: Re: Reflection BBCODE
Post by: Nibogo on September 19, 2008, 05:29:49 PM
Quote from: cme1st2302 on September 19, 2008, 09:56:00 AM
The "Go To Mod" picture link up top goes to the wrong mod.  Just thought I'd let you know.

Fixed

Thanks
Title: Re: Reflection BBCODE
Post by: jayc7176 on September 19, 2008, 10:42:18 PM
Hey Mod installed Perfectly on Default theme but doesn't do anything at all. .  --

bbc code comes up fine ... the Image shows up but no Reflection..

Any help will be Appriciated


These r the mods  i have :)

Mod Name     Version     
1.    Ad Managment    2.3    
2.    FavIcon    1.1 
3.    Integrate Lightbox    1.6    
4.    SMF 1.0.14 / 1.1.6 Update    1.0 
5.    Integrate Lightbox    1.6    
6.    Reflect BBCODE    1.0    
7.    Images On Board    1.0 
8.    SMF 1.0.14 / 1.1.6 Update    1.0    
9.    Advanced Login Form    1.0    
10.    Custom Profile Field Mod    3.19    
11.    URL Popup    1.0    
12.    Users Online Today Mod    1.4.0    
13.    SMF 1.0.14 / 1.1.6 Update    1.0    
14.    Display Age and Location next to posts    1.0    
15.    SMF Gallery Lite    1.8.3    
16.    TinyPortal    0.983    
17.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0 
18.    Auto Embed Video/Audio Clips    3.1.2    
Title: Re: Reflection BBCODE
Post by: Sabre™ on September 20, 2008, 05:07:18 PM
Quote from: jayc7176 on September 19, 2008, 10:42:18 PM
Hey Mod installed Perfectly on Default theme but doesn't do anything at all. .  --
bbc code comes up fine ... the Image shows up but no Reflection..

Check that the reflect.js is installed into your default theme folder/dir.


@ NIBOGO
Hi mate.
I have the image resize mod installed to keep Large images from overflowing the page.
The reflection mod lets the images expand to their full size.
Where would I have to add the line of code to stop this from happenin?
Would it be the display template, or the subs?
And what is added?
If you dont know what Im talkin about, click [HERE] (http://custom.simplemachines.org/mods/index.php?mod=1197) to see.

Thank You champ :)
Title: Re: Reflection BBCODE
Post by: Nibogo on September 20, 2008, 06:03:02 PM
Quote from: jayc7176 on September 19, 2008, 10:42:18 PM
Hey Mod installed Perfectly on Default theme but doesn't do anything at all. .  --

bbc code comes up fine ... the Image shows up but no Reflection..

Any help will be Appriciated


These r the mods  i have :)

Mod Name     Version     
1.    Ad Managment    2.3     
2.    FavIcon    1.1 
3.    Integrate Lightbox    1.6     
4.    SMF 1.0.14 / 1.1.6 Update    1.0 
5.    Integrate Lightbox    1.6     
6.    Reflect BBCODE    1.0     
7.    Images On Board    1.0 
8.    SMF 1.0.14 / 1.1.6 Update    1.0     
9.    Advanced Login Form    1.0     
10.    Custom Profile Field Mod    3.19     
11.    URL Popup    1.0     
12.    Users Online Today Mod    1.4.0     
13.    SMF 1.0.14 / 1.1.6 Update    1.0     
14.    Display Age and Location next to posts    1.0     
15.    SMF Gallery Lite    1.8.3     
16.    TinyPortal    0.983     
17.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0 
18.    Auto Embed Video/Audio Clips    3.1.2     

You have installed twice the Lightbox Mod xD , maybe this mod have any bug with the Lughtbox mod or you dont have the reflection.js in your /Themes/default

Quote from: Sabre™ on September 20, 2008, 05:07:18 PM
Quote from: jayc7176 on September 19, 2008, 10:42:18 PM
Hey Mod installed Perfectly on Default theme but doesn't do anything at all. .  --
bbc code comes up fine ... the Image shows up but no Reflection..

Check that the reflect.js is installed into your default theme folder/dir.


@ NIBOGO
Hi mate.
I have the image resize mod installed to keep Large images from overflowing the page.
The reflection mod lets the images expand to their full size.
Where would I have to add the line of code to stop this from happenin?
Would it be the display template, or the subs?
And what is added?
If you dont know what Im talkin about, click [HERE] (http://custom.simplemachines.org/mods/index.php?mod=1197) to see.

Thank You champ :)

mmm maybe i can check that bug later , thanks for report  :)
Title: Re: Reflection BBCODE
Post by: jayc7176 on September 25, 2008, 01:33:24 PM
I can confirm the Mod works fine with LightBox mod..!

I have it working on the default theme but for some reason it doesn't work on Custom Theme.

I think issue maybe within display.Template?!

While doing the Edits i notice  it says to  Find in Display .Template

Find:
'img' => array('code' => 'img', 'before' => '(http://',%20'after'%20=>%20')', 'description' => $txt[435]),

But this is no where in Display  it is in Post.Template instead , could there be an issue here?many Thanks for all the help .


Title: Re: Reflection BBCODE
Post by: Nibogo on September 25, 2008, 07:21:35 PM
Quote from: jayc7176 on September 25, 2008, 01:33:24 PM
I can confirm the Mod works fine with LightBox mod..!

I have it working on the default theme but for some reason it doesn't work on Custom Theme.

I think issue maybe within display.Template?!

While doing the Edits i notice  it says to  Find in Display .Template

Find:
'img' => array('code' => 'img', 'before' => '(http://%27,%20%27after%27%20=%3e%20%27)', 'description' => $txt[435]),

But this is no where in Display  it is in Post.Template instead , could there be an issue here?many Thanks for all the help .


You have to add the code of my mod to your index.template.php and the post.template for show the buttom

The display.template edit if only for the people of have installed the Enhaced Quick Reply
Title: Re: Reflection BBCODE
Post by: Costa on October 18, 2008, 09:16:40 AM
Great MOD!
A really GREAT MOD!

Translation to brazilian
Modifications.brazilian.php$txt['reflect'] = 'Imagem com reflexo';

Farewell folks
Title: Re: Reflection BBCODE
Post by: TheMaker on February 26, 2009, 05:18:48 AM
AMAZING MOD!
Thanks!  :)
Title: Re: Reflection BBCODE
Post by: Nibogo on February 26, 2009, 02:25:38 PM
Quote from: TheMaker on February 26, 2009, 05:18:48 AM
AMAZING MOD!
Thanks!  :)

Glad to hear that :)
Title: Re: Reflection BBCODE
Post by: johnsonbobby on May 23, 2009, 01:59:57 AM
any way to angle the reflection ?
mine shows the reflection but its a "straight down" reflection .
Title: Re: Reflection BBCODE
Post by: johnsonbobby on May 28, 2009, 07:31:40 PM
any way to angle the reflection ?
mine shows the reflection but its a "straight down" reflection .

i would really like to have the reflection angled . but i dont know how to do that .
Title: Re: Reflection BBCODE
Post by: Nibogo on May 28, 2009, 08:30:04 PM
Quote from: johnsonbobby on May 28, 2009, 07:31:40 PM
any way to angle the reflection ?
mine shows the reflection but its a "straight down" reflection .

i would really like to have the reflection angled . but i dont know how to do that .

Maybe if you know javascript
Title: Re: Reflection BBCODE
Post by: devil_jin on August 02, 2009, 06:07:16 AM
Hi NIBOGO,

I am using SMF 2.0 RC 1.2 with The Carbon Orange Theme.

I installed the Mod and checked that :

<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/reflection.js"></script>

is showing befor </Head>

I also copied the reflection.js to the The Carbon Orange Theme folder.

The button shows on the forum but when I use it the image is not reflected.

Also I checked Post.template.php to find :

'img' => array('code' => 'img', 'before' => '', 'description' => $txt[435]),

and replace it with

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

But in Post.template.php I am unable to find

'img' => array('code' => 'img', 'before' => '', 'description' => $txt[435]),


Thanks for helping..
Title: Re: Reflection BBCODE
Post by: Shortie on August 02, 2009, 07:26:06 AM

In the mod if you find

<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/reflection.js"></script>

and change to this

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/reflection.js"></script>

You wont have to copy the .js file to each theme

Shortie


Title: Re: Reflection BBCODE
Post by: asifnur on August 24, 2009, 03:31:18 PM
doesnt work with 1.1.10 !!! OMG FIX PLZ I WANT THIS MOD
Title: Re: Reflection BBCODE
Post by: Nibogo on October 08, 2009, 05:03:02 PM
Changelog:

1.0.2 - 08 Oct 2009
o Added Support for SMF 1.1.10
o Added Brazilian Translation thanks to Costa
o New readme file
Title: Re: Reflection BBCODE
Post by: Membre on February 26, 2010, 09:38:02 AM
Can you add spanish_es ? thanks :)
Title: Re: Reflection BBCODE
Post by: Rik© on February 26, 2010, 10:42:43 AM
Quote from: Membre on February 26, 2010, 09:38:02 AM
Can you add spanish_es ? thanks :)
Yes, is it the same as spanish_latin?
Quote from: spanish_latinImage Reflection = Imagen Reflejada

-Rik©
Title: Re: Reflection BBCODE
Post by: Nibogo on February 26, 2010, 11:37:08 AM
Quote from: Rik© on February 26, 2010, 10:42:43 AM
Quote from: Membre on February 26, 2010, 09:38:02 AM
Can you add spanish_es ? thanks :)
Yes, is it the same as spanish_latin?
Quote from: spanish_latinImage Reflection = Imagen Reflejada

-Rik©

Yes it's
Title: Re: Reflection BBCODE
Post by: waruna on February 26, 2010, 11:52:56 AM
The test failed.  :-[

Execute Modification   ./Sources/Subs-Editor.php   Test failed

It says:

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

Add before:

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



Subs-Editor.php attached  ;D .. Thank you!  :)

Title: Re: Reflection BBCODE
Post by: Rik© on February 26, 2010, 01:31:37 PM
Quote from: waruna on February 26, 2010, 11:52:56 AM
The test failed.  :-[

Execute Modification   ./Sources/Subs-Editor.php   Test failed

It says:

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

Add before:

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



Subs-Editor.php attached  ;D .. Thank you!  :)
Thanks for the 'Bug Report'.
I checked it and the bug is assigned.
Looks like the '$context['bbc_tags']' is formatted differently in RC2.
I will fix it asap as it has a 'high' priority.
Later tonight i hope to release the fix.

-Rik©
Title: Re: Reflection BBCODE
Post by: waruna on February 26, 2010, 01:47:40 PM
Oh okay! ;). Thanks Rik© for the response :). Great and interesting mod you have here.
Title: Re: Reflection BBCODE
Post by: Rik© on February 26, 2010, 01:54:36 PM
Quote from: waruna on February 26, 2010, 01:47:40 PM
Oh okay! ;). Thanks Rik© for the response :). Great and interesting mod you have here.
I took over this mod from NIBOGO but haven't had the time to take a closer look at it.
I only updated the javascript file and added dutch.
But since this bug breaks the mod in RC2 i will have to fix this asap.

-Rik©
Title: Re: Reflection BBCODE
Post by: Rik© on February 26, 2010, 07:29:42 PM
I resolved the 'failed test subs-editor.php' bug  ;D
Also added the tag to the 'Bulletin Board Code Settings' (Select the tags allowed to be used).

Tomorrow i'll release RBBC 1.0.5

-Rik©
Title: Re: Reflection BBCODE
Post by: Membre on February 26, 2010, 07:47:26 PM
Quote from: Rik© on February 26, 2010, 10:42:43 AM
Quote from: Membre on February 26, 2010, 09:38:02 AM
Can you add spanish_es ? thanks :)
Yes, is it the same as spanish_latin?
Quote from: spanish_latinImage Reflection = Imagen Reflejada

-Rik©

Yep :)
But
Imagen Reflejada = Reflected Image
Reflejo de Imagen = Image Reflection
Title: Re: Reflection BBCODE
Post by: Rik© on February 26, 2010, 08:15:31 PM
I'll stick with NIBOGO's spanish (imagen reflejada) since he's language moderator AND the original author of Reflection BBCODE  ;D

-Rik©
Title: Re: Reflection BBCODE
Post by: aw06 on March 30, 2010, 07:31:35 AM
Hey ric, slight flaw in this mod .... if you have smf set to recize images when you use the reflec that is ignored and the actual image size is posted....

Is there a fix ?? Using SMF 2.0 Rc3

Also changing this value don't seem to have any effect .. i want to make the reflection a little smaller

var Reflection = {
defaultHeight : 0.5,


Disabling mod until these things addressed 8)
Title: Re: Reflection BBCODE
Post by: Rik© on March 30, 2010, 09:15:20 AM
Quote from: aw06 on March 30, 2010, 07:31:35 AM
Hey ric, slight flaw in this mod .... if you have smf set to recize images when you use the reflec that is ignored and the actual image size is posted....

Is there a fix ?? Using SMF 2.0 Rc3
Thanks for the 'Bug Report'.
I'll look into it when i've released SIS v3.1.0

Quote from: aw06
Also changing this value don't seem to have any effect .. i want to make the reflection a little smaller

var Reflection = {
defaultHeight : 0.5,


Disabling mod until these things addressed 8)
Read this if you want to customize the reflection. (http://cow.neondragon.net/stuff/reflection/src/readme.html#custom)
Maybe i will make it configurable in the ACP...

-Rik©
Title: Re: Reflection BBCODE
Post by: aw06 on March 30, 2010, 09:22:44 AM
Well when i adjust the opacity that works...

so i need to add this value ??

class="reflect rheight33"  ???
Title: Re: Reflection BBCODE
Post by: Rik© on March 30, 2010, 09:54:48 AM
Quote from: aw06 on March 30, 2010, 09:22:44 AM
Well when i adjust the opacity that works...

so i need to add this value ??

class="reflect rheight33"  ???
At the moment the mod uses class="reflect rheight33" (33% the height of the original image).
If you want to change this you'll have to edit subs.php (make a backup!)

- Open /Sources/Subs.php
- Find:
'content' => '<img src="$1" alt="" border="0" class="reflect rheight33" />',
- Replace with
'content' => '<img src="$1" alt="" border="0" class="reflect rheight66" />',
This will give the reflection 66% the height of the original image.

-Rik©


Title: Re: Reflection BBCODE
Post by: aw06 on March 30, 2010, 10:00:10 AM
Cool, will make changes when you release update ... i actutally want it 33% of image
Title: Re: Reflection BBCODE
Post by: TheListener on April 18, 2010, 08:34:36 PM
This is a rather an unusual mod.

Looks good too.

May I suggest a way for members to turn the function off when making a post?

Just a thought.
Title: Re: Reflection BBCODE
Post by: aw06 on April 18, 2010, 11:06:02 PM
Quote from: Brack1 on April 18, 2010, 08:34:36 PM
This is a rather an unusual mod.

Looks good too.

May I suggest a way for members to turn the function off when making a post?

Just a thought.

this only works if the users puts the image in the reflect tags..
Title: Re: Reflection BBCODE
Post by: TheListener on April 19, 2010, 10:28:03 AM
I didn't think about it properly until after I had logged off for the night.

Oops
Title: Re: Reflection BBCODE
Post by: XxN!N3 on June 16, 2010, 03:23:25 PM
Turkish Translation

$txt['reflect'] = 'Resim Yansıması';
Title: Re: Reflection BBCODE
Post by: Rik© on June 17, 2010, 03:52:48 AM
Quote from: xxnine on June 16, 2010, 03:23:25 PM
Turkish Translation

$txt['reflect'] = 'Resim Yansıması';
Thanks.
Will be added to a new release.

-Rik©
Title: Re: Reflection BBCODE
Post by: LHW on June 17, 2010, 04:53:16 AM
Quote from: Rik© on March 30, 2010, 09:15:20 AM
Maybe i will make it configurable in the ACP...

-Rik©

Suggestion for ya, Rik©: Add an attribute to the code, so people can post what they wish.  Something along the lines of [reflect height=66] for a 66% value.

Just an idea. 8)
Title: Re: Reflection BBCODE
Post by: Krysia on October 03, 2010, 10:02:48 PM
Can anyone tell me if this mod works in Safari? I've installed it and it works insofar as posting the image, but I don't see the "reflection".

The reflection.js page is in the theme directory.

Thank you! :)
Title: Re: Reflection BBCODE
Post by: T3CHN0 on October 02, 2011, 01:42:37 AM
Not sure if anyone else hase had this error but thought I better post it to help others

I have been getting allot of members telling me about a stack over flow error 171 error message
when using Internet explorer; as this does not impact any other browser I never bothered with it untill now
to find a fix

After allot of researching I found the answere to my error with Internet Explorer why everyone
gets "Stack overflow at line: 171" 'was this mods .js script'

works with all browsers except IE,8 or before if you have the java script fault but also depends on users computers setups
I found by removing this string everyone who uses my forum with IE no longer get the 171 error anymore
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/reflection.js"></script>
but in saying that this mod works very well with IE my problem was I had 2 of the same strings as to why it was a problem
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/reflection.js"></script><script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/reflection.js"></script></home>
removed the doubled string and walla all good now.

hope this helps other, take care all
Title: Re: Reflection BBCODE
Post by: T3CHN0 on October 02, 2011, 01:58:35 AM
Quote from: aw06 on March 30, 2010, 07:31:35 AM
Hey ric, slight flaw in this mod .... if you have smf set to recize images when you use the reflec that is ignored and the actual image size is posted....
Is there a fix ?? Using SMF 2.0 Rc3

Hi Ric I know this mod has had no posts for the past year apart from mine.
I was just wondering if you ever fix this error posted before.. I have the same problem
on my smf 2.0.1 site. images are not resized.

Not a biggy as very few members use reflection on there images and I edit it after there post
and resize them my self but would be good if there is a fix for it.

cheers buddy.

P.S.
if there is a better way then yeah fix it but for now I found a fix by doing this

Subs.php
Find
'content' => '<img src="$1" alt="" border="0" class="glossy rheight33"/>
change to this
'content' => '<img src="$1" alt="" border="0" width="50%" height="50%" class="glossy rheight33" />
and it will resize the image by 50% not a good fix for little images but works all the same :)