News:

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

Main Menu

Reflection BBCODE

Started by Rik©, September 19, 2008, 07:43:00 AM

Previous topic - Next topic

Rik©


Reflection BBCODE
Author: SimpleTweaks - Rik©
Additional Author: NIBOGO


Link to Mod | Support Topic | My Mods



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

english + english-utf8
brazilian + brazilian-utf8 (by Costa)
dutch + dutch-utf8

spanish _es+ spanish_es-utf8
spanish_latin + spanish_latin-utf8
SimpleTweaks welcomes translations.
Please submit your translation @ the support topic or SimpleTweaks site.



Compatibility

- 2.0 RC3
- 2.0 RC2
- 1.1.X



Copyright & Credits

Reflection.js
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




cme1st2302

The "Go To Mod" picture link up top goes to the wrong mod.  Just thought I'd let you know.
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

jayc7176

This is an Awsom mod! can't wait to Try it out!!!  Thanks!
I cannot teach anybody anything, I can only make them think -  Socrates™ 469 BC

SMF- 1.1.5


jayc7176

#4
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    
I cannot teach anybody anything, I can only make them think -  Socrates™ 469 BC

SMF- 1.1.5

Sabre™

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] to see.

Thank You champ :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Nibogo

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] to see.

Thank You champ :)

mmm maybe i can check that bug later , thanks for report  :)

jayc7176

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' => '', '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 .


I cannot teach anybody anything, I can only make them think -  Socrates™ 469 BC

SMF- 1.1.5

Nibogo

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' => '', '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

Costa

Great MOD!
A really GREAT MOD!

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

Farewell folks
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

TheMaker



johnsonbobby

any way to angle the reflection ?
mine shows the reflection but its a "straight down" reflection .

johnsonbobby

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 .

Nibogo

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

devil_jin

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..

Shortie


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



asifnur

doesnt work with 1.1.10 !!! OMG FIX PLZ I WANT THIS MOD


Membre

Can you add spanish_es ? thanks :)

Rik©

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©


waruna

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!  :)

Trust of Lust

Rik©

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©

waruna

Oh okay! ;). Thanks Rik© for the response :). Great and interesting mod you have here.
Trust of Lust

Rik©

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©

Rik©

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©

Membre

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

Rik©

I'll stick with NIBOGO's spanish (imagen reflejada) since he's language moderator AND the original author of Reflection BBCODE  ;D

-Rik©

aw06

#29
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)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Rik©

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.
Maybe i will make it configurable in the ACP...

-Rik©

aw06

Well when i adjust the opacity that works...

so i need to add this value ??

class="reflect rheight33"  ???
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Rik©

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©



aw06

Cool, will make changes when you release update ... i actutally want it 33% of image
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

TheListener

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.

aw06

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..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

TheListener

I didn't think about it properly until after I had logged off for the night.

Oops

XxN!N3

Turkish Translation

$txt['reflect'] = 'Resim Yansıması';

Rik©

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©

LHW

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)


Krysia

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! :)



T3CHN0

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

T3CHN0

#42
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 :)

Advertisement: