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.
4321
The Pub / Re: Skins and the skins selector question
« on October 11th, 2012, 04:33 PM »
You don't even have to 'install' them, you just upload them to your skins folder and you're done. It's enabled, and available in the Skin Selector page (in your profile menu).
If you're talking about the Skin Selector selectbox in the sidebar, it's the same, it's automatically available in it as well, but that selectbox isn't a core feature of Wedge, it's an external plugin. (A very simple one... Could probably warrant being core with a switch in the admin area.)
If you're talking about the Skin Selector selectbox in the sidebar, it's the same, it's automatically available in it as well, but that selectbox isn't a core feature of Wedge, it's an external plugin. (A very simple one... Could probably warrant being core with a switch in the admin area.)
4323
Bug reports / Re: Nobbc
« on October 10th, 2012, 09:55 PM »
Well, and has it got anything to do with nobbc not being handled in preparsecode...?
Also, could be simpler to just do something like this at the beginning of parse_bbc:
Code: [Select]
I don't remember the name for the text variable so I used $message.
It's a prototype, typed directly in here... What do you think..?
Woohoo, bug... A code tag gets added at the beginning, and it even hid the beginning of the post in the process. Fixed by adding spaces in nobbc tags. Poetic irony...
Also, could be simpler to just do something like this at the beginning of parse_bbc:
<?php
while (($pos = stripos($message, '[ nobbc]')) !== false)
{
$end = stripos($message, '[/ nobbc]', $pos);
if ($end == false)
$end = strlen($message);
$message = substr($message, 0, $pos) . str_replace('[', '&something;', substr($message, $pos + 7, $end - $pos - 7)) . substr($message, $end + 8);
}
I don't remember the name for the text variable so I used $message.
It's a prototype, typed directly in here... What do you think..?
Woohoo, bug... A code tag gets added at the beginning, and it even hid the beginning of the post in the process. Fixed by adding spaces in nobbc tags. Poetic irony...
4324
Bug reports / Re: Nobbc
« on October 10th, 2012, 07:09 PM »
Yes, actually I thought that was how it was done in the first place..?!
Code tags are parsed the same way aren't they...?
Of course, it won't fix existing posts but... Not much of a problem.
Code tags are parsed the same way aren't they...?
Of course, it won't fix existing posts but... Not much of a problem.
4325
Features / Re: New revs - Public comments
« on October 10th, 2012, 12:08 PM »Well, it might be primarily for me but it's not even a case of 'I don't know, let me think about it', but simply a 'I have no idea which is the best course of action'. There's simply so much stuff that it relates to, potentially, that I can't tell you which would be best.
- Weaving: div system, linktree inside content, with margins and stuff. Sidebar is positioned through negative margin hacks.
- Wine: table system, linktree above content, solves the margin problem because the sidebar is no longer stuck to the menu
- Wuthering: inherits Wine
- Warm: TBD (inherits Wine or Weaving?), because it changes the skeleton anyway...
What I will say is that I dislike a, either the sidebar should be full height or not at all.
I will note that I am personally not averse to using tables to fulfil this, but that's because I don't give two hoots about good design :lol:
No, the fact is that I really want to have a 'simple' skin as default, and introduce more complex stuff in sub-skins and the likes. The main issue for me is to determine whether the table workaround is a simple or complex addition.
As far as 2 goes, that sounds very nice and flexible.
However, err... I've been thinking about something. Something silly really...
Currently, wetem takes the skeleton tags, turns them into a multi-dimensional array, and then we are allowed to apply various operations to it before it's rendered.
I was thinking, why exactly didn't I think of something simpler...? Or, at the very least, if I think of it, why did I give up on it? I don't remember...
The 'simpler' solution would be to apply all operations on the skeleton tags, and THEN at render time, build an array out of them...
Currently, because we're working on an array, doing simple changes to it can be quite hard. I'd even venture into saying, although I wrote the whole damn thing and I actually understand what the code is about (damn, I even commented a LOT of it!), I had a short WTF moment in front of one of the functions. Ever since, I've been wondering if it wouldn't be better to simply do the work on the tags themselves... It can't be much slower than working on the array...?! It's probably even faster, if I may say...
The only drawback of this approach, is that, ahem.... I actually have to rewrite all of the main manipulation functions.
Yeah. Well, I'd be ready to do just that... I'm sure it'll be no more than a few hours of work. (I'm not kidding.)
4326
Archived fixes / Re: Popup event doesn't bubble properly
« on October 9th, 2012, 06:40 PM »
It's worse than that actually... If you try moving the popup, it triggers the zoomedia item as well.
I did get the close button to work, though... (?)
I did get the close button to work, though... (?)
4327
Features / Re: New revs - Public comments
« on October 9th, 2012, 06:10 PM »
Okay... I'm a bit lost in my work right now.
I'm working on several things at a time, and can't seem to make any progress.
1/ Moving linktrees into the container: this has proven to work well thanks to the post above, but I just realized that Wine causes a problem... (And Wuthering too, probably.) Namely, because the sidebar is a very stylish one and its style is applied to the containing table cell, I can not apply a margin-top above the sidebar to compensate for the absence of a linktree. Table cells only accept padding-top, and obviously the only effect is to make the sidebar's insides bigger rather than add padding above the sidebar.
Solutions:
a- Move the sidebar to a contained div, and give up on having it fill the entire height,
b- Move the sidebar to a contained div, apply an equal-height CSS hacks (basically: padding-bottom: 10000px and margin-bottom: -10000px or something like that), and give up on having the bottom of the sidebar rounded (instead, it will disappear behind the footer.) I can apply this solution to Weaving and Warm easily, BTW, this way I could even get rid of the table macros for IE6/7...
c- Move Warm to be a child of Weaving, and have Wine and Wuthering use solution (b),
d- Add margins above the sidebar's container's container, but this also adds space above the content area, and I can't apply a negative margin to it either, unless I do some positioning magic, which is sure to cause problems later in the process...
e- Maybe something else...?
2/ I'm working on an alternative way of modifying a skeleton through skin.xml, but I can't seem to get the hang of it... (Mostly in terms of writing standards...) Would it make sense or not? I'm thinking about doing something like this...
<move block="linktree:bottom" to="main" where="before" />
Which would allow blocks to be moved around without having to reproduce the original skeleton, essentially making it more solid when the skin is moved below another new default skin.
I know I'm annoying, but a small bump is really needed here :P
Because the message is primarily for Pete and I'd rather have a 'I don't know, let me think about it' than nothing... :whistle:
I'm working on several things at a time, and can't seem to make any progress.
1/ Moving linktrees into the container: this has proven to work well thanks to the post above, but I just realized that Wine causes a problem... (And Wuthering too, probably.) Namely, because the sidebar is a very stylish one and its style is applied to the containing table cell, I can not apply a margin-top above the sidebar to compensate for the absence of a linktree. Table cells only accept padding-top, and obviously the only effect is to make the sidebar's insides bigger rather than add padding above the sidebar.
Solutions:
a- Move the sidebar to a contained div, and give up on having it fill the entire height,
b- Move the sidebar to a contained div, apply an equal-height CSS hacks (basically: padding-bottom: 10000px and margin-bottom: -10000px or something like that), and give up on having the bottom of the sidebar rounded (instead, it will disappear behind the footer.) I can apply this solution to Weaving and Warm easily, BTW, this way I could even get rid of the table macros for IE6/7...
c- Move Warm to be a child of Weaving, and have Wine and Wuthering use solution (b),
d- Add margins above the sidebar's container's container, but this also adds space above the content area, and I can't apply a negative margin to it either, unless I do some positioning magic, which is sure to cause problems later in the process...
e- Maybe something else...?
2/ I'm working on an alternative way of modifying a skeleton through skin.xml, but I can't seem to get the hang of it... (Mostly in terms of writing standards...) Would it make sense or not? I'm thinking about doing something like this...
<move block="linktree:bottom" to="main" where="before" />
Which would allow blocks to be moved around without having to reproduce the original skeleton, essentially making it more solid when the skin is moved below another new default skin.
Posted: October 9th, 2012, 05:30 PM
I know I'm annoying, but a small bump is really needed here :P
Because the message is primarily for Pete and I'd rather have a 'I don't know, let me think about it' than nothing... :whistle:
4328
Plugins / Re: Active Members
« on October 9th, 2012, 06:09 PM »
I don't remember having this discussion before..?
I had this mod installed on one of my earlier SMF1 sites, no longer there though, but I liked it...
I had this mod installed on one of my earlier SMF1 sites, no longer there though, but I liked it...
4329
Plugins / Re: Active Members
« on October 9th, 2012, 05:42 PM »
Hey, nice... It's actually one of the many features I had on my (core) to-do list. I guess I can give it up now... :)
Maybe it should be made core, BTW...? Or at least an official plugin...
Can you share it for now? :P
Maybe it should be made core, BTW...? Or at least an official plugin...
Can you share it for now? :P
4330
Archived fixes / Re: Large images jut out of post area
« on October 9th, 2012, 05:40 PM »
Hmm, well... The problem with max-width: 100% in this situation is that you can click the item to view it at max width, like the 'resized' feature usually does. (But this, IIRC, only triggers if you set a hardcoded width on the img tag.)
Maybe an overflow: auto..?
Ouch, that's complicated...
overflow: auto works when applied to a container div (which we can insert automatically.) But it then means that you can't show multiple img tags next to each other...
Something tells me it's going to be a matter of compromise.
Maybe an overflow: auto..?
Posted: October 9th, 2012, 05:37 PM
Ouch, that's complicated...
overflow: auto works when applied to a container div (which we can insert automatically.) But it then means that you can't show multiple img tags next to each other...
Something tells me it's going to be a matter of compromise.
4331
Archived fixes / Re: Large images jut out of post area
« on October 9th, 2012, 05:19 PM »
The max-width thingy should work..? Can you point me to a sample URL here that shows the problem...?
4332
Archived fixes / Re: Large images jut out of post area
« on October 9th, 2012, 04:34 PM »
Isn't there a max-width:100% on these thumbs already..?
4333
Features / Re: New revs
« on October 9th, 2012, 02:25 PM »
rev 1737
(4 files, 3kb)
+ Added support for simple variables in skeleton blocks. Used these to make the bottom linktree code cleaner, giving control to the skeleton rather than a random block not related to the linktree at all. Please note that while I'm declaring the top linktree as <linktree />, it can just as easily be declared as <linktree:top /> (like in the Warm skeleton), as the default value is set to 'top'. (Load.php, Subs-Template.php, index.template.php, Warm/skin.xml)
* Modified param order in RSS feed declaration, to match the other meta tags'. Also removed a few globals that weren't used at all, and $shown_linktree (same reason). (index.template.php)
(4 files, 3kb)
+ Added support for simple variables in skeleton blocks. Used these to make the bottom linktree code cleaner, giving control to the skeleton rather than a random block not related to the linktree at all. Please note that while I'm declaring the top linktree as <linktree />, it can just as easily be declared as <linktree:top /> (like in the Warm skeleton), as the default value is set to 'top'. (Load.php, Subs-Template.php, index.template.php, Warm/skin.xml)
* Modified param order in RSS feed declaration, to match the other meta tags'. Also removed a few globals that weren't used at all, and $shown_linktree (same reason). (index.template.php)
4334
Features / Re: New revs - Public comments
« on October 8th, 2012, 09:54 PM »Then either the locale database is wrong or it's using the strings in the language file which are also capitalised.Quote I hadn't looked into it before, but your change made me realize that my local install capitalizes month names in French, unlike what should be done. It works here on wedge.org, but not on my local install.
Problem is, I thought that these months were stored in there to be used in things like the calendar, where you show JUST the month, right..? And a lowercase month name looks silly, I guess, as a title...
Why? Why serialize it twice? That's just overly complicating the matter (and is why I want nothing the hell to do with it) It's an array, not an array inside an array.
The more I think about it, the less reasons I can think for this to fail... The only issue right now is with empty arrays. If they're not initialized, it's impossible for Wedge to tell that we should return an empty array. For instance, if 'js_lang' is not initialized, it's an empty string. Thus we're not turning it back into an empty array. Thus $settings['js_lang'] is an empty string, rather than an empty array, when js_lang hasn't been set yet. It might create some confusion/errors. The logical solution would be to either store ALL array-types variables in install.sql (with a default set to "a:0:{}" or whatever the content is to represent an empty array), or have fallback code for every occurrence...
Maybe I could/should simply do a quick commit at some point -- the bare minimum required to make it work, and if it fails to work correctly, then we can easily revert it.
In other news, I've just finished implementing block variables.
e.g. in the main skeleton, we have a <linktree> block, right? And it's called *again* but manually if in a topic page. I already worked with this before and gave up on it because I can't define two blocks with the same name. Then it occurred to me today that I could simply store the variable list inside the block name... Eh, why not? Then it works. I just need to extract the variable list at render time.
So, we have something like this...
<linktree />
<content />
<linktree:1 />
The second one calls template_linktree with the first parameter set to '1'. I've invertedt the two variables so that $on_bottom is set to 1 in that second call. It works perfectly... :)
Now people are finally going to be able to call a single block multiple times, either with multiple variables or simply entering dummy variables like:
<my-block:to-the-left />
<my-block:to-the-right />
If you have several variables to pass, just separate them with commas (<linktree:1,2,3 />)
There's just one weakness: you can't pass strings between quotes or anything with spaces in them. I decided against it because it would slow down the code for nothing IMHO. Really, if you're declaring a variable inside a skeleton, you're only telling the block what behavior to use in that position... No?
Of course it would be cool to have something like <title:"Hello, world!" /> and create a block that is a title saying that. But it doesn't sound too realistic to me.
This isn't something that's impossible to implement. It's just that it makes the regex longer, more complex, and I don't really trust long regexes, at least not too many... ;)
So, what do you think...?
4335
Features / Re: New revs - Public comments
« on October 8th, 2012, 06:44 PM »
Okay, before I forget...
Regarding the setlocale thingy.
I hadn't looked into it before, but your change made me realize that my local install capitalizes month names in French, unlike what should be done. It works here on wedge.org, but not on my local install.
Where should I start looking to fix that...?Quote from Arantor on October 8th, 2012, 06:16 PM That's exactly as expected...
array(1,2,3,4,5,6,7,8,9,10)
Serializes to
a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;}
Which serializes to
s:88:"a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;}";
Which unserializes to the a:10 string, which then unserializes to the proper array.
Meaning that you can store serialized arrays in an array, and it won't screw them up.
I guess you'd only need to be careful not to send a serialized array to updateSettings, or maybe I should simply check at updateSettings time whether the variable is (1) an array (in which case, serialize it and store it serialized), (2) or a string, in which case, test whether it has { in it, in which case try to unserialize it, and if it works, then serialize it again so that the $settings loader will correctly unserialize that and store the serialized array (rather than its unserialized version) into the variable.
Do you know what I mean...? :^^;:Quote from Arantor on October 8th, 2012, 06:16 PM In which case these arrays will be serialized twice, and then unserialized back into a serialized array, which should ensure that you don't even have to fix your code... (You can, of course.)Quote Possibly not. :)
Looked into my setlocale problem...
If I do this: (as suggested by http://www.php.net/manual/en/function.setlocale.php)
setlocale(LC_TIME, '');
It correctly uses French & lowercase on names. If I don't, it will actually return dates in capitalized English...?! (Using strftime.)
I'm not exactly sure where this needs fixing...
Regarding the setlocale thingy.
I hadn't looked into it before, but your change made me realize that my local install capitalizes month names in French, unlike what should be done. It works here on wedge.org, but not on my local install.
Where should I start looking to fix that...?
Firstly, serializing a serialized string gives you a doubly serialized string. Yes, no kidding, there was a bug in earlier releases of Project Tools where this was happening. So you have to unserialise it before unserialising it.
array(1,2,3,4,5,6,7,8,9,10)
Serializes to
a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;}
Which serializes to
s:88:"a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;}";
Which unserializes to the a:10 string, which then unserializes to the proper array.
Meaning that you can store serialized arrays in an array, and it won't screw them up.
I guess you'd only need to be careful not to send a serialized array to updateSettings, or maybe I should simply check at updateSettings time whether the variable is (1) an array (in which case, serialize it and store it serialized), (2) or a string, in which case, test whether it has { in it, in which case try to unserialize it, and if it works, then serialize it again so that the $settings loader will correctly unserialize that and store the serialized array (rather than its unserialized version) into the variable.
Do you know what I mean...? :^^;:
Secondly, the point I have been making is that certain things in prepareDBSettingsContext already have arrays, and it serialises them before sending to updateSettings.
If you want to add it, you go add it. I just want nothing to do with the debugging that I know will result. (You'll need to update Topic Solved and possibly other plugins too)
Posted: October 8th, 2012, 06:34 PM
Looked into my setlocale problem...
If I do this: (as suggested by http://www.php.net/manual/en/function.setlocale.php)
setlocale(LC_TIME, '');
It correctly uses French & lowercase on names. If I don't, it will actually return dates in capitalized English...?! (Using strftime.)
I'm not exactly sure where this needs fixing...