This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
9631
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 17th, 2011, 06:30 PM »
I don't think forum wide would be very logical. This is a helper and it isn't as buggy as, say, the Wysiwyg engine...
A per-user setting, yeah, I thought about that but am too lazy ;) Spent too much time and that feature and it didn't even end up the way I wanted... (I wanted the > stuff, and in the end I did something else :P) (I still have the code for ">", btw... Maybe I'll commit it in the future, in the wip folder.)
A per-user setting, yeah, I thought about that but am too lazy ;) Spent too much time and that feature and it didn't even end up the way I wanted... (I wanted the > stuff, and in the end I did something else :P) (I still have the code for ">", btw... Maybe I'll commit it in the future, in the wip folder.)
9632
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 17th, 2011, 04:17 PM »
Did you look into it, or shall I..?
9634
Features / Re: New revs
« on March 16th, 2011, 12:16 PM »
rev 658
(12 files, 16kb)
* Applied new foldable code to category collapsing and news. Also fixed plenty of minor issues regarding IE support for these icons. Grmpf. (Subs-BoardIndex.php, BoardIndex.template.php, ie6.css, ie7.css, index.css, rtl.css, sections.css
* Removed #boardindex_table id and used #board_list instead. Also indenazi and added a placeholder class for category RSS icons. (BoardIndex.template.php, */settings.xml)
* Topic titles need different things. They can't use we:cat anymore. Let it go, now. We need the freedom to style these. (Display.template.php)
! Fixed validation on IE6/7. Not that anyone cares... (index.template.php)
As always... Some complicated shit! Also, can't get category collapse icons to show both states in IE6 because of its inability to style two classes at once. It works in other icons only because they're linked to a smc_Toggle() object. I changed the order from &.fold to .fold& (which, admittedly is uglier), because I think it's best to always see the "-" icon, rather than either the "+" icon or no icon at all...
(12 files, 16kb)
* Applied new foldable code to category collapsing and news. Also fixed plenty of minor issues regarding IE support for these icons. Grmpf. (Subs-BoardIndex.php, BoardIndex.template.php, ie6.css, ie7.css, index.css, rtl.css, sections.css
* Removed #boardindex_table id and used #board_list instead. Also indenazi and added a placeholder class for category RSS icons. (BoardIndex.template.php, */settings.xml)
* Topic titles need different things. They can't use we:cat anymore. Let it go, now. We need the freedom to style these. (Display.template.php)
! Fixed validation on IE6/7. Not that anyone cares... (index.template.php)
As always... Some complicated shit! Also, can't get category collapse icons to show both states in IE6 because of its inability to style two classes at once. It works in other icons only because they're linked to a smc_Toggle() object. I changed the order from &.fold to .fold& (which, admittedly is uglier), because I think it's best to always see the "-" icon, rather than either the "+" icon or no icon at all...
9635
Features / Re: New revs
« on March 15th, 2011, 05:42 PM »
rev 657
(4 files modded, 3 deleted, 9 added, 48kb)
* Replaced foldable system with a simple div instead of the cool, but slightly annoying inline blank image. This saves a total of 83 bytes per call. (index.css, sections.css, upshrinks.png, index.template.php, BoardIndexInfoCenter.template.php, more files to come.)
+ Added other/images folder, where we should store 32-bit, unedited versions of our icons and such before optimizing them for filesize. The menu sprite, I'm afraid, is a bit outdated, but I couldn't find a fresher copy. (buttons-32bit.png, quickbuttons-32bit.png, sprite-32bit.png, sprite-32bit (menu, old).png, upshrinks-32bit.png, also moved foldable.gif and shrinkable.png)
(4 files modded, 3 deleted, 9 added, 48kb)
* Replaced foldable system with a simple div instead of the cool, but slightly annoying inline blank image. This saves a total of 83 bytes per call. (index.css, sections.css, upshrinks.png, index.template.php, BoardIndexInfoCenter.template.php, more files to come.)
+ Added other/images folder, where we should store 32-bit, unedited versions of our icons and such before optimizing them for filesize. The menu sprite, I'm afraid, is a bit outdated, but I couldn't find a fresher copy. (buttons-32bit.png, quickbuttons-32bit.png, sprite-32bit.png, sprite-32bit (menu, old).png, upshrinks-32bit.png, also moved foldable.gif and shrinkable.png)
9636
The Pub / Re: Logo Madness (Was: New revs)
« on March 14th, 2011, 05:12 PM »
Possibly.
I'm thinking we could use the wedge triangular shape anywhere we need a logo but don't want to use the 'wedge' title.
Also, I'd be interested in resuming work on the logo. I liked Bloc's view of a purely monochrome logo the other day, even though I'd never been excited with the idea. I also still like the crossing line, and I'm not too fond of the upper part of the 'd' (it's too lifeless.) I'm good with the current logo (it really whips the llama's ass™), but it doesn't mean it can't be improved.
I'm thinking we could use the wedge triangular shape anywhere we need a logo but don't want to use the 'wedge' title.
Also, I'd be interested in resuming work on the logo. I liked Bloc's view of a purely monochrome logo the other day, even though I'd never been excited with the idea. I also still like the crossing line, and I'm not too fond of the upper part of the 'd' (it's too lifeless.) I'm good with the current logo (it really whips the llama's ass™), but it doesn't mean it can't be improved.
9637
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 11:27 PM »
Okay, I've generated the list dynamically. (Query-free, since parse_bbc(false) generates the list from the current bbc cache.)
You might wanna test the entire thing on complex messages if you have some time... Notably, mixing quotes with code tags is okay but if you do several in a row, Wedge seems to give up at some point... It ends up emptying the taglist array, indicating that it 'missed' the matching tag when going through the pop() loop.
Bed time for me, so if you can find the 'culprit'... Please fix it for me :)
AFAICS, the bug (also?) happens when we just press the Enter key in an area that is NOT within a quote... So, obviously, Wedge will return an empty array, uh. Dull! :lol: But I'm pretty sure I still managed to trigger the bug within a code tag.
You might wanna test the entire thing on complex messages if you have some time... Notably, mixing quotes with code tags is okay but if you do several in a row, Wedge seems to give up at some point... It ends up emptying the taglist array, indicating that it 'missed' the matching tag when going through the pop() loop.
Bed time for me, so if you can find the 'culprit'... Please fix it for me :)
Posted: March 13th, 2011, 11:21 PM
AFAICS, the bug (also?) happens when we just press the Enter key in an area that is NOT within a quote... So, obviously, Wedge will return an empty array, uh. Dull! :lol: But I'm pretty sure I still managed to trigger the bug within a code tag.
9638
Features / Re: New revs
« on March 13th, 2011, 11:23 PM »
rev 655
(2 files, 6kb)
* Wedge now correctly uses the current list of protected and self-closed tags (disabled or not), to build the list of exceptions for the auto-quote splitter. (Class-Editor.php, post.js)
! Fixed selectionStart processing in IE. (post.js)
! Fixed an error in JS logic... Well, actually, fixed the error popup, not the actual error. Will need some extra work... (post.js)
rev 656
(+1 file, 6kb... Err, the file itself is 107 bytes though :P)
! Fixed sidebar position in Firefox when in hidden mode. (gecko.css)
:edit: the bug showed up in Wine. I fixed it in Warm so hopefully it was theme-wide, not Wine-wide. Otherwise the file needs to be moved to the Wine folder ;)
(2 files, 6kb)
* Wedge now correctly uses the current list of protected and self-closed tags (disabled or not), to build the list of exceptions for the auto-quote splitter. (Class-Editor.php, post.js)
! Fixed selectionStart processing in IE. (post.js)
! Fixed an error in JS logic... Well, actually, fixed the error popup, not the actual error. Will need some extra work... (post.js)
Posted: March 13th, 2011, 11:18 PM
rev 656
(+1 file, 6kb... Err, the file itself is 107 bytes though :P)
! Fixed sidebar position in Firefox when in hidden mode. (gecko.css)
:edit: the bug showed up in Wine. I fixed it in Warm so hopefully it was theme-wide, not Wine-wide. Otherwise the file needs to be moved to the Wine folder ;)
9639
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 09:32 PM »We'd actually have to pass the list of closed tags to the JS because although the list is only three tags now, it might not be in future.
BTW, I forgot to add nobbc to the list. Done locally.
Anyway, I figured you can do it if you want, now that the stuff is committed ;)
Also, what do you think of the result...? I haven't added anything to make it disablable (is that a real word?), because let's just say... I'm quite happy with it. Of course it's going to crash/behave badly in plenty of situations... I'm sure a [quo[b][/b]te] wouldn't behave well... Or splitting a quote right inside a [url=something_very_long] tag...
As for the theme, just playing with some different header ideas and seeing how well the sidebar worked on the right.
9640
Features / Re: New revs
« on March 13th, 2011, 09:26 PM »
My work for the weekend... (Not including a few WIPs.)
rev 653
(5 files, 10kb)
+ Added support for automatic quote splitting. (editor.js, post.js)
* Allow single-character selectors (a, p...) to extend something else. (Class-CSS.php)
! Fixed self::strlen() not working in itself. (Class-String.php)
! Fixed regression in preg_split's. (Class-String.php)
! Fixed in-topic moderation checkboxes. (topic.js)
rev 654
(2 files, 8kb)
+ Added a 'wip' folder (Works in progress), because we need some place to commit stuff that is either not finished but could use retooling, or finished but not actually used anywhere. (other/wip, other/wip/text-overflow.js)
* Minor restyling of topic titles. (sections.css)
rev 653
(5 files, 10kb)
+ Added support for automatic quote splitting. (editor.js, post.js)
* Allow single-character selectors (a, p...) to extend something else. (Class-CSS.php)
! Fixed self::strlen() not working in itself. (Class-String.php)
! Fixed regression in preg_split's. (Class-String.php)
! Fixed in-topic moderation checkboxes. (topic.js)
Posted: March 13th, 2011, 08:47 PM
rev 654
(2 files, 8kb)
+ Added a 'wip' folder (Works in progress), because we need some place to commit stuff that is either not finished but could use retooling, or finished but not actually used anywhere. (other/wip, other/wip/text-overflow.js)
* Minor restyling of topic titles. (sections.css)
9641
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 08:34 PM »
Here's the complete code, updated for self-closing tags... I've laid the tags out to make them easier to mod (oh... How I hate the word. But I can hardly do it differently. Unless you have an idea...)
Code: [Select]
// Split a quote if we press Enter inside it.
function splitQuote(oEvent)
{
// Did we just press Enter?
if (oEvent.which != 13)
return true;
// Where are we, already?
if ('selectionStart' in this)
var selectionStart = this.selectionStart;
else
{
var range = document.selection.createRange(), dul = range.duplicate();
dul.moveToElementText(this);
dul.setEndPoint('EndToEnd', range);
var selectionStart = dul.text.length - range.text.length;
}
// Build a list of opened tags...
var
selection = this.value.substr(0, selectionStart), lcs = selection.toLowerCase(),
lcsl = lcs.length, pos = 0, tag, bbcode, taglist = [], extag, log_tags = true,
protect_tags = [
'code',
'php',
'html',
],
closed_tags = [
'br',
'hr',
'more',
];
while (true)
{
pos = lcs.indexOf('[', pos) + 1;
if (!pos)
break;
tag = selection.substring(pos, lcs.indexOf(']', pos + 1));
bbcode = tag.substr(tag.charAt(0) === '/' ? 1 : 0);
if (tag.charAt(0) === '/')
{
if (!log_tags && bbcode != taglist[taglist.length - 1].substr(0, bbcode.length))
continue;
do
{
extag = taglist.pop();
if (in_array(extag, protect_tags))
log_tags = true;
}
while (extag && bbcode != extag.substr(0, bbcode.length).toLowerCase());
}
else if (log_tags && !in_array(bbcode, closed_tags))
taglist.push(bbcode);
if (log_tags && in_array(bbcode, protect_tags))
log_tags = false;
}
for (var closers = [], j = 0, l = taglist.length; j < l; j++)
closers.push('[/' + (taglist[j].indexOf(' ') > 0 ? taglist[j].substr(0, taglist[j].indexOf(' ')) : taglist[j]) + ']');
surroundText(closers.reverse().join('') + '\n', '\n\n[' + taglist.join('][') + ']', this);
return true;
};9642
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 08:26 PM »
Ah, yes indeed... Something I didn't think of.
A theme, eh? Based on something?
A theme, eh? Based on something?
9643
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 07:32 PM »
It's quite complicated per se...
But I've made it. (Phew.)
This isn't optimized, but it's working at least.
This replaces the second half of the function... Obviously it's much longer. Can't do much about that... Feel free to optimize yourself, too.
Code: [Select]
NB: this uses the original quote params, rather than "continued".
But I've made it. (Phew.)
This isn't optimized, but it's working at least.
This replaces the second half of the function... Obviously it's much longer. Can't do much about that... Feel free to optimize yourself, too.
// Build a list of opened tags...
var
selection = this.value.substr(0, selectionStart), lcs = selection.toLowerCase(),
lcsl = lcs.length, pos = 0, tag, bbcode, taglist = [], extag, log_tags = true,
protect_tags = ['code', 'php', 'html'];
while (true)
{
pos = lcs.indexOf('[', pos) + 1;
if (!pos)
break;
tag = selection.substring(pos, lcs.indexOf(']', pos + 1));
bbcode = tag.substr(tag.charAt(0) === '/' ? 1 : 0);
if (tag.charAt(0) === '/')
{
if (!log_tags && bbcode != taglist[taglist.length - 1].substr(0, bbcode.length))
continue;
do
{
extag = taglist.pop();
if (in_array(extag, protect_tags))
log_tags = true;
}
while (extag && bbcode != extag.substr(0, bbcode.length).toLowerCase());
}
else if (log_tags)
taglist.push(bbcode);
if (log_tags && in_array(bbcode, protect_tags))
log_tags = false;
}
for (var closers = [], j = 0, l = taglist.length; j < l; j++)
closers[] = '[/' + (taglist[j].indexOf(' ') > 0 ? taglist[j].substr(0, taglist[j].indexOf(' ')) : taglist[j]) + ']';
surroundText(closers.reverse().join('') + '\n', '\n\n[' + taglist.join('][') + ']', this);
return true;NB: this uses the original quote params, rather than "continued".
9644
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 12:45 AM »
It's a bit complex but... Well, I guess I can get a copy of the text between the last [quote] opened and the current cursor position, get a list of all opened and unclosed tags, and reopen them in order.
Still... It's going to make the code at least twice bigger. Meh.
Still... It's going to make the code at least twice bigger. Meh.
9645
Features / Re: Another life-changing fantastic idea for quotes! (Bit silly, too.)
« on March 13th, 2011, 12:24 AM »
Or maybe just that...
Code: [Select] Quote from Arantor on March 13th, 2011, 12:21 AM What about... If I cut a code tag that's located in a nested quote? (i.e. not directly inside the main quote.)
surroundText(new Array(num).join('[/quote]') + '\n', '\n\n[quote continued]' + new Array(num - 1).join('[quote]'), this);It probably should, to be honest.Quote It still won't deal with things that are cut in the middle, like code tags or even anchors or whatever. Dunno if it's that important... Is it?