News:

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

Main Menu

BBC Glow

Started by oOo--STAR--oOo, July 20, 2016, 12:17:01 PM

Previous topic - Next topic

oOo--STAR--oOo

I just wanted to know the reasons for putting [ glow=red,2,300 ] as changing the 2,300 values does nothing to the glow? Also shadow seems to be close glow but with position.

Shouldn't the style on glow be
    text-shadow: red 0px 0px 7px, red 0px 0px 7px;
    padding-left: 3px;
    padding-right: 3px;

where 7px is the blur, padding so the glow doesn't get closed off.

It just popped to mind as I was creating a drop down box for glow. If you want I can edit the source for you and post the changes to give an actual glow instead of a shadow effect. I don't know if anyone has noticed this, but I feel its not giving and actual glow and the shadow bbc is pretty much the same.

What do you think?
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Suki

Old relics from distant times. 2.0 is only receiving security patches by now.  A mod would be the way to go for this as these kind of BBC are rarely used by users.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

oOo--STAR--oOo

Quote from: Suki on July 20, 2016, 12:32:09 PM
Old relics from distant times. 2.0 is only receiving security patches by now.  A mod would be the way to go for this as these kind of BBC are rarely used by users.

I understand you have this in the 2.1 editor which is the same editor I have put into 2.0.11. Are you going to remove these from the 2.1 editor if they are not used?

I was going to submit code for a glow dropdown. Same as the colour dropdown in the 2.1 WYSIWYG editor. Just wanted to know the reasons for these numbers in the glow.
I also see that with the glow, you don't have WYSIWYG preview of the actual glow, only BBC code, I have fixed this to give a preview. In 2.1 its also the same, you have those numbers that serve no purpose as I can see.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Suki

I don't know the reasons, that code predates me. If I have to guess I say it was coded thinking about browser compatibility at that time.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

oOo--STAR--oOo

Quote from: Suki on July 20, 2016, 12:50:46 PM
I don't know the reasons, that code predates me. If I have to guess I say it was coded thinking about browser compatibility at that time.

Okay thanks and no problem, I will carry on cleaning my code up after testing, and submit my code and changes for you to analyse and possibly add to the new WYSIWYG editor in 2.1.
Glow preview in live editor, drop down list of colours.. Because of the way I am, I will also be removing these numbers from the source as I feel they are not needed, will post those edits 2 from both sources, 2.1 and 2.0.11.

I am also creating a drop down for shadow 2.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Suki

To be honest, that tag is rarely used so a full drop down seems too much for it.  Thats another reasons for the tag to accept parameters, to add more options to the user without the need to create a full drop down.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

oOo--STAR--oOo

I see why those values exist its for 9 < only.

'before' => $context['browser']['is_ie'] ? '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">' : '<span style="text-shadow: $1 1px 1px 1px">',

filter glow, uses those number to determine strength, but there is no strength on text-shadow for other webkits. This is only for the glow = red, 2, I have no idea what the other number is for but its not even used.

Seems only 0.2% of internet users use IE 9 or below, I don't think these numbers should be used at all.

My idea was a drop down of colours not strength options, strength would be a default as it already is now.

I'll just edit my own source to suit my needs stripping these numbers and adjust the styling to suit my needs.

Maybe I'll make a mod to address these changes.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

oOo--STAR--oOo

Changes if you wish to apply them! This will add real glow and remove the 2,300 from the glow bbc tag. As changing these options has no effect anyway.. Just confusing. Unless you use IE 9 Or below and really who does? Lol. ;)

Sources/Subs-Editor.php
FIND


array(
'image' => 'glow',
'code' => 'glow',
'before' => '[glow=red,2,300]',
'after' => '[/glow]',
'description' => $txt['glow']
),


REPLACE


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


Sources/Subs.php

FIND


array(
'tag' => 'glow',
'type' => 'unparsed_commas',
'test' => '[#0-9a-zA-Z\-]{3,12},([012]\d{1,2}|\d{1,2})(,[^]]+)?\]',
'before' => $context['browser']['is_ie'] ? '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">' : '<span style="text-shadow: $1 1px 1px 1px">',
'after' => $context['browser']['is_ie'] ? '</td></tr></table> ' : '</span>',
),


REPLACE


array(
'tag' => 'glow',
'type' => 'unparsed_equals',
'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,20}|rgb\(\d{1,3}, ?\d{1,3}, ?\d{1,3}\))\]',
'before' => $context['browser']['is_ie'] ? '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=2); font: inherit;">' : '<span style="text-shadow: $1 0px 0px 7px, $1 0px 0px 7px; padding-left: 3px; padding-right: 3px">',
'after' => $context['browser']['is_ie'] ? '</td></tr></table> ' : '</span>',
),


Problem solved...
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

oOo--STAR--oOo


Source code for GLOW colour drop down, working excellent and checked for bugs!


glow: {
tags: {
span: {
style: null
}
},
quoteType: p.QuoteType.never,
format: function(a, b) {
var s = a.attr('style');
var c = s.substr(13, s.indexOf(' 0px')-13);
return '[glow='+r(c)+']' + b + '[/glow]';
},
html: function(a, b, c) {
return '<span style="text-shadow: ' + f(r(b.defaultattr), !0) + ' 0px 0px 7px, ' + f(r(b.defaultattr), !0) + ' 0px 0px 7px, ' + f(r(b.defaultattr), !0) + ' 0px 0px 7px">' + c + "</span>"
}
},



glow: {
txtExec: function(a) {
                    var b = this;
                    j("glow")._dropDown(b, a, function(a) {
                        b.insertText("[glow=" + a + "]", "[/glow]")
                    })
                }
},



glow: {
                    _dropDown: function(b, c, d) {
                        var e, g, h, i, j = {
                                r: 255,
                                g: 255,
                                b: 255
                            },
                            k = a("<div />"),
                            l = b.opts.colors ? b.opts.colors.split("|") : new Array(21),
                            m = [],
                            n = f.glow;
                        if (!n._htmlCache) {
                            for (e = 0; e < l.length; ++e) {
                                for (i = l[e] ? l[e].split(",") : new Array(21), m.push('<div class="sceditor-glow-column">'), g = 0; g < i.length; ++g) h = i[g] || "#" + j.r.toString(16) + j.g.toString(16) + j.b.toString(16), m.push('<a href="#" class="sceditor-glow-option" style="background-color: ' + h + '" data-glow="' + h + '"></a>'), g % 5 === 0 ? (j.g -= 51, j.b = 255) : j.b -= 51;
                                m.push("</div>"), e % 5 === 0 ? (j.r -= 51, j.g = 255, j.b = 255) : (j.g = 255, j.b = 255)
                            }
                            n._htmlCache = m.join("")
                        }
                        k.append(n._htmlCache).find("a").click(function(c) {
                            d(a(this).attr("data-glow")), b.closeDropDown(!0), c.preventDefault()
                        }), b.createDropDown(c, "glow-picker", k)
                    },
                    exec: function(a) {
                        var b = this;
                        f.glow._dropDown(b, a, function(a) {
b.wysiwygEditorInsertHtml('<span style="text-shadow: ' + a + ' 0px 0px 7px, ' + a + ' 0px 0px 7px, ' + a + ' 0px 0px 7px">', '</span>')
                        })
                    },
                    tooltip: "Glow Color"
                },
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

moner

Hello ,aljo1985

can i have link for download this wysiwyg editor mod ?
if this mod  :)

oOo--STAR--oOo

Quote from: moner on July 21, 2016, 05:45:17 AM
Hello ,aljo1985

can i have link for download this wysiwyg editor mod ?
if this mod  :)

I'm still developing it for my own website, but sure once I finished it, I will help you put it on your website! Its actually nearly complete, just need to cleanup some code and add some buttons.
I am going on vacation tomorrow, so I won't be here till next week. So I will be continuing to develop it then.

Because I have been developing it for myself, there is no admin panel or anything to design any options, but the disable bbc options as default works and all other previous options work.
Someone has made a mod for this wysiwyg editor for 2.0.11 in the mod section, but from what i gathered it has a few problems, you can try that for now if you like and see if those problems still exist.

Once I am back and have finished designing/putting all the features in, I will get this installed on your website for you.

You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

moner

Nice wysiwyg editor

can you see HotEditor ? i was install it on SMF1.1.21 and working fine.
but my site now on SMF2.0.11

if you want see it.

HotEditor Site

Download HotEditor

thank you ,aljo1985

oOo--STAR--oOo

Quote from: moner on July 21, 2016, 06:18:02 AM
Nice wysiwyg editor

can you see HotEditor ? i was install it on SMF1.1.21 and working fine.
but my site now on SMF2.0.11

if you want see it.

HotEditor Site

Download HotEditor

thank you ,aljo1985

It okay, just seems a lil outdated.. Got some interesting buttons.
Thanks for the link.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Advertisement: