New revs - Public comments

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #555, on March 19th, 2013, 04:27 PM »
Oh, now I know... I think EmailTemplates was ISO earlier, because it didn't have any accents in it. I added accents when I translated your 'desc' strings... :^^;:

Also...

- Although I'm not enchanted with the idea (when it comes to updating website files via FTP, it's two or three extra folders to check out), I guess it'd make sense to put all languages into their own folders, for simplicity. If you don't want that, then good; if you do, then I won't oppose it.
Quote from Arantor on February 3rd, 2013, 11:00 PM
I did wonder about that, but I thought since it was configurable, there was really no reason for me to make it unconfigurable as such.
Well, there are many settings we never hesitated to remove to make room for others or just breathing space... ^^
Quote from Arantor on February 3rd, 2013, 11:00 PM
But yeah, realistically I don't see anyone looking to remove it any time soon.
I'd rather the draft autosave be attached to the editor to be honest. In practical respects it makes little difference; there aren't many cases where guests will be able to post (so we won't be loading the editor anyway)
Speaking of which. Isn't it feasible (ah, finally got the spelling right!) to just keep the editor out of topic pages, and when clicking 'Full editor', load it through Ajax instead...? I'm not afraid of these Ajax calls anymore. :P And it would save quite many bytes to topic page.
Quote from Arantor on February 3rd, 2013, 11:00 PM
Quote
- txt.done in spellcheck.js -- however, I'd advise against adding it for one reason: if you're not using the default language, you'll get another instance of your language name in the spellcheck JS URL,
Well, this strikes me as a reason not to do it there - if we keep the spell check, and I'm not entirely sold on that yet. For my money we need to support enchant if we're keeping it going forward (and I can't seem to get enchant to play nicely), and browsers often do a better job anyway.
Speaking of spellcheck, I'd like to point out, the buttons/spell.png file is still in SVN... Shouldn't we remove it? It's not used anywhere right now...
Quote from Arantor on February 3rd, 2013, 11:00 PM
I have to be honest I always found the entire toggle code something of a strange one, it always seemed more complicated than it had to be.
In SMF, definitely. Nearly 4900 bytes of crap! Wedge reduces the (uncompressed) code to about 2300. It's still useless, but at least it's the size it should be!

Regarding JS, I have more issues on my side with the reqWin rewrite. Well, just one really. Before committing it, I'd like to ask: is it really worth having a flexible first parameter..? 99% of all calls are "reqWin(this)". This then takes the href param in the owner anchor. Then there are, IIRC, four other calls:
- say/ask both pass an empty string as the first parameter, because they don't want to provide a title anyway; doing $('') shouldn't cause any trouble, so no need for the extra test;
- there's an occurrence in Active Topics (from John) and one in one of your plugins (I think it's WedgeDesk, I'm not sure though), where it sends reqWin('url string'). I've fixed Active Topics to do it the 'proper' way, i.e. put the URL into the href (so that it actually gets prettified and optimized by Wedge... I think??!!), and do reqWin(this) instead.
- I didn't fix yours, because it's more complicated... It's in your attachment code, have a look, in WedgeDesk-Display.php. Do you think it's fixable, if anything..?

The only thing I can say is, while it's a good thing to say "reqWin can open a custom URL if you provide it in the first parameter", I don't know if it's worth the extra 3 bytes of code to account for this when it's actually used nowhere at all in Wedge...?

(And please, please please say "yes it's worth it, now bugger off with your three petty bytes".. I'll feel better about it!)
Quote from Arantor on February 3rd, 2013, 11:00 PM
Quote
* Naoism: comment typos. Also, Pete, you must have a 4K screen if you're able to read that MessageIndex comment without scrolling... ;) (MessageIndex.php, Pin.php)
Or not. MBP 17" = 1920x1200. Just see the attached.
Now that's pretty crazy... ;)
I still prefer for // comments at the end of a line of code to be either very short (a few words at most), or moved to their own line (or move, if needed). That's pretty much a 'SMF/Wedge coding guideline' to me... Do you think you could do that in the future..?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #556, on March 21st, 2013, 06:53 PM »
Quote
Oh, now I know... I think EmailTemplates was ISO earlier, because it didn't have any accents in it. I added accents when I translated your 'desc' strings...
Nothing wrong with that. It's now UTF-8, and I glanced through the first half a dozen French files and they all seemed to be UTF-8, so it's probably OK.
Quote
- Although I'm not enchanted with the idea (when it comes to updating website files via FTP, it's two or three extra folders to check out), I guess it'd make sense to put all languages into their own folders, for simplicity. If you don't want that, then good; if you do, then I won't oppose it.
The only real issue with doing it vs not doing it is that we already have about 40 files per language, multiplied by the number of languages installed by Shitastico and friends when translations are available (remember, SMF has around 70 language packs) and that can start to cause other issues.
Quote
Well, there are many settings we never hesitated to remove to make room for others or just breathing space... ^^
True, but it seemed like such an easy thing to keep compatibility for.
Quote
Speaking of which. Isn't it feasible (ah, finally got the spelling right!) to just keep the editor out of topic pages, and when clicking 'Full editor', load it through Ajax instead...? I'm not afraid of these Ajax calls anymore. :P And it would save quite many bytes to topic page.
Yes, if you want to load the JS files and code dynamically, followed by all the requisite event handling. It's doable but it's really not pretty.
Quote
- there's an occurrence in Active Topics (from John) and one in one of your plugins (I think it's WedgeDesk, I'm not sure though), where it sends reqWin('url string'). I've fixed Active Topics to do it the 'proper' way, i.e. put the URL into the href (so that it actually gets prettified and optimized by Wedge... I think??!!), and do reqWin(this) instead.
WedgeDesk has a bunch of reqWin(this), reqWin(this.href) and a couple of weird reqWin instances. I have a vague memory of those being related to showing attachments in a popup window, but Zoomedia would be infinitely better in this case.

WedgeDesk is also one of the issues around attachments/media items, to ensure permissions remain tied to the helpdesk and not anything else.
Quote
I still prefer for // comments at the end of a line of code to be either very short (a few words at most), or moved to their own line (or move, if needed). That's pretty much a 'SMF/Wedge coding guideline' to me... Do you think you could do that in the future..?
I'll try :)
Posted: March 19th, 2013, 04:43 PM

OK, upcoming change I'm not entirely happy about.

The 'correct' behaviour is for loadLanguage to complain bitterly if a given language file doesn't exist - even if there will be a suitable fallback, it is still going to complain about the missing file. The only problem is that a small percentage of the language files for English UK will be identical to English US (e.g. so far the Home language file is in that category), so I need to include a placeholder for those so that I don't write exceptions directly into loadLanguage for a fringe language case. I don't like it either but it's the least worst alternative.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #557, on March 24th, 2013, 05:32 PM »
Was just wondering... When you did your add_linktree conversions, did you check whether $context was being used elsewhere in the functions..? It's likely they are of course (we've been putting so many things in that one :P), but I'm asking so I can know whether I should bother checking myself, or not ;)
Quote from Arantor on March 21st, 2013, 06:53 PM
The only real issue with doing it vs not doing it is that we already have about 40 files per language, multiplied by the number of languages installed by Shitastico and friends when translations are available (remember, SMF has around 70 language packs) and that can start to cause other issues.
Yeah, that's true...
Considering I'm the only one who'd be annoyed by the change (i.e. having to move my FTP updates to one extra folder), it's probably best to just ignore me and move them to their own folders. :)
Quote
Yes, if you want to load the JS files and code dynamically, followed by all the requisite event handling. It's doable but it's really not pretty.
How pretty it is depends on what you're ready to give up on, eh eh.
Personally, I'd say that the less Display is crowded, the prettier it is overall.
As always, my main concern is with reactivity. But as long as the main editor is there, and Ajax is called only when going for 'full editor', I don't really see any issues with it.
i.e., loading smileys and buttons through Ajax seems like a given to me, but the wysiwyg and non-wysiwyg editors, along with their shortcuts etc, should always be loaded.

Also... I've been considering the recent discussion on shift+enter. As I said, I allowed touch devices to run the function automatically on Enter (since it doesn't have shift), and it's a life-changer when trying to quote stuff. (Not likely to push me into doing it more regularly, but at least it makes my life less miserable, should I ever want to do it on mobile!)

I was wondering whether we shouldn't be inverting the process on desktop..? Enter splits quotes by default, and Shift+Enter prevents it. It's very tempting. But I think I won't do it, because of one main issue: imagine you're typing something, then doing [b], then typing more, and pressing Enter... Oh! You didn't want to close the tag, did you..? I don't see how to avoid that. Maybe, hmm... Maybe keeping a copy of the original post and checking whether the line we just split was present in the original post. If it was, smart-split. Otherwise, ignore the split.
I can't think of a cleaner way, hm...
Quote
WedgeDesk has a bunch of reqWin(this), reqWin(this.href) and a couple of weird reqWin instances.
reqWin(this.href) is wrong code. Perhaps inherited from an old version of Wedge..? Can't remember how I used to do it. (I fixed it manually. I have tons of compatibility-related updates I'll commit at some point for plugins... 29 files, half of which are from WedgeDesk.)
Quote
I have a vague memory of those being related to showing attachments in a popup window, but Zoomedia would be infinitely better in this case.
Probably, yeah...
I'd still like for you to look into your code for WD and tell me if you can think of a better way of doing it. The onclick stuff, I mean.
Quote
I'll try :)
:thanks:
Quote
The 'correct' behaviour is for loadLanguage to complain bitterly if a given language file doesn't exist - even if there will be a suitable fallback, it is still going to complain about the missing file. The only problem is that a small percentage of the language files for English UK will be identical to English US (e.g. so far the Home language file is in that category), so I need to include a placeholder for those so that I don't write exceptions directly into loadLanguage for a fringe language case. I don't like it either but it's the least worst alternative.
I can understand you don't like the idea... And, I'll just say, I agree I'd rather not do it that way.

I'm thinking, *maybe* we could have a 'special setting', such as $txt['parent_language'] = 'english' or something, that says Wedge shouldn't worry about missing files, and instead look for the file inside the 'english' folder. What do you think..?

And yes. I know US English isn't UK English's parent, it's the other way around. Now get off my lawn :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #558, on March 27th, 2013, 01:54 PM »
Quote
did you check whether $context was being used elsewhere in the functions..?
No, I didn't. But any place with a linktree is also going to be setting the title, which is a context variable.
Quote
Considering I'm the only one who'd be annoyed by the change (i.e. having to move my FTP updates to one extra folder), it's probably best to just ignore me and move them to their own folders.
I'm not overly looking forward to the changes in the language editor, or for that matter, themes[1] with their own language files.
Quote
How pretty it is depends on what you're ready to give up on, eh eh.
Personally, I'd say that the less Display is crowded, the prettier it is overall.
As always, my main concern is with reactivity. But as long as the main editor is there, and Ajax is called only when going for 'full editor', I don't really see any issues with it.
Generally, that's fine.
Quote
i.e., loading smileys and buttons through Ajax seems like a given to me, but the wysiwyg and non-wysiwyg editors, along with their shortcuts etc, should always be loaded.
Ah... that's where you and I differ. WYSIWYG pretty much demands the buttons from a usability perspective and realistically the buttons are more important to me than the shortcuts are.
Quote
I was wondering whether we shouldn't be inverting the process on desktop..?
I don't know. I just know I hate crazy and inconsistent interfaces - you know my thoughts about Enter vs Ctrl Enter on Facebook for example ;)
Quote
reqWin(this.href) is wrong code. Perhaps inherited from an old version of Wedge..? Can't remember how I used to do it. (I fixed it manually. I have tons of compatibility-related updates I'll commit at some point for plugins... 29 files, half of which are from WedgeDesk.)
Actually, it's probably from SMF originally.
Quote
Probably, yeah...
I'd still like for you to look into your code for WD and tell me if you can think of a better way of doing it. The onclick stuff, I mean.
I don't remember much of WD, mostly it was brute-force conversion of SD original to whatever was current in Wedge at the time.
Quote
I can understand you don't like the idea... And, I'll just say, I agree I'd rather not do it that way.

I'm thinking, *maybe* we could have a 'special setting', such as $txt['language_parent'] = 'english' or something, that says Wedge shouldn't worry about missing files, and instead look for the file inside the 'english' folder. What do you think..?
The problem with a language indicating its parent like that means you implicitly have to load the file twice - load index once, learn that you need to have a parent, load the parent, reload the index to reinstate changes from that. Though once you've done that, you can avoid it further.

I dunno. I don't really like what's in SVN but I think it's best for now since it does actually enforce that you know you have all the files you should.
Posted: March 24th, 2013, 05:47 PM
Quote
* Because the registration agreement is a special language string that's explicitly parse_bbc'd
Which means now what's in the database is explicitly different to what's used for actual users, but heigh ho and all that. Reason: preparsecode will convert out all the line breaks.
Quote
This also makes them easier to use them as base for your own registration agreement.
Please tell me why a user would do this. Translators are the only people who should be looking at raw language files.
Quote
Missing file. Note that Home files are not supposed to be in the final distro, and that I'm sure I'll forget all about it soon enough, but whatever...
So users who get the final distro are going to be expected to hand code stuff? Might as well write off Wedge now then because most users do NOT want to hand code ANYTHING. If anything, not only does it need to stay but it needs an admin UI as well.
 1. Assuming we still have *themes* as things that can replace entire template files

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #559, on March 28th, 2013, 10:37 AM »
Code: [Select]
<?php
- if (empty($group['name']) || empty($group['type']) || empty($group['classic']) || empty($group['simple']))
+
if (empty($group['name']) || empty($group['type']) || empty($group['name']))
Your removal of simple permissions seems to have been done, to a point, on auto-pilot. Just look at the line above, with a test repeated twice...
At some point you renamed 'simple' and 'classic' to 'name', at other points to 'group'. I suspect the one above should say 'group' instead of 'name', but I'm not sure, I haven't tested anything. I'm just trying to update all the plugins to use the new permissions, and I'm stuck with that.
Quote from Arantor on March 27th, 2013, 01:54 PM
No, I didn't. But any place with a linktree is also going to be setting the title, which is a context variable.
True enough. Although not always done... (e.g. notification action.)
Quote
I'm not overly looking forward to the changes in the language editor, or for that matter, themes[1] with their own language files.
 1. Assuming we still have *themes* as things that can replace entire template files
(It is so tempting for me to remove themes as a feature entirely, because skins can do so much more... The only thing they have for themselves, is the ability to replace a template file. But it should be possible to simply put these files into our skin files... Why not?! I'm so familiar with my skin code, and so unsure about theme code... Heck, I've never tried to install an additional theme in Wedge. Everything can be done with skins so...)
Quote
Ah... that's where you and I differ. WYSIWYG pretty much demands the buttons from a usability perspective and realistically the buttons are more important to me than the shortcuts are.
By shortcuts, I mean keyboard shortcuts themselves, not the text that mentions the list of keyboard shortcuts.
Thanks to shortcuts (which are dealt by a cached JavaScript file, and thus always available), even in Wysiwyg mode you can easily bold a text by pressing Ctrl+B, if you're used to Word or Wordpad or Write or whatever... Of course, the browser has to cooperate, too -- there are some that use this shortcut for a bookmark popup, like Sleipnir (my current default) or IE IIRC. Still. I don't see a need for buttons in most cases.
Quote
Quote
I was wondering whether we shouldn't be inverting the process on desktop..?
I don't know. I just know I hate crazy and inconsistent interfaces - you know my thoughts about Enter vs Ctrl Enter on Facebook for example ;)
Yes, absolutely, but in this case it'd be more consistent because it'd be enabled everywhere.
I'll tell you my preference -- the way it's done right now. But the sane and consistent choice? Probably the other way around, I guess...
Quote
Actually, it's probably from SMF originally.
Ah, yes indeed!
And it was unneeded. No need to waste HTML for 'this.href' when we can pass 'this' and then get the href in the cached JavaScript.
Apparently, the SMF team thought it was still too short though, so they renamed the whole thing to reqOverlayDiv(this.href) :lol:

To think that I've always considered renaming reqWin() to just popup()... :^^;: (I don't know why I'm not doing it.)
Quote
I don't remember much of WD, mostly it was brute-force conversion of SD original to whatever was current in Wedge at the time.
So, I take it it's untested, right..?
Quote
The problem with a language indicating its parent like that means you implicitly have to load the file twice - load index once, learn that you need to have a parent, load the parent, reload the index to reinstate changes from that. Though once you've done that, you can avoid it further.
Hmm...

- load default index.english.php
- load language (English UK, French...) index
- do nothing.
- cache results.

Then, later:
- load default specificfile.english.php
- if $txt['lang_parent'] != 'english', load specificfile.$txt['lang_parent'].php, if not there, ERROR.
- attempt to load specificfile.language.php -- if not there, if empty($txt['lang_parent']) ERROR (because we ARE supposed to have a full file in this case), else ignore.
- cache results.

And that's the worst case scenario, to me...?
Quote
Quote
* Because the registration agreement is a special language string that's explicitly parse_bbc'd
Which means now what's in the database is explicitly different to what's used for actual users, but heigh ho and all that. Reason: preparsecode will convert out all the line breaks.
I don't know, Pete.
All I know is that SMF has this:

Code: [Select]
$context['agreement'] = parse_bbc(file_get_contents($boarddir . '/agreement.' . $user_info['language'] . '.txt'), true, 'agreement_' . $user_info['language']);

And you have a similar one, except you're using $txt instead of file_get_contents.
The rest is the same, i.e. you parse_bbc it. If you didn't want it to be parsable, you should remove the parse_bbc call and revert the $txt strings to use HTML instead.
Quote
Quote
This also makes them easier to use them as base for your own registration agreement.
Please tell me why a user would do this. Translators are the only people who should be looking at raw language files.
Well, exactly... I was talking about translators, in this case.
In which case, having a long line of text will be annoying to translate for them, unless they enable wrap mode, but not everybody thinks of that. (Heck, I pretty much never enable wrap mode, except when I have to read a TXT file that was built that way...)
Quote
Quote
Missing file. Note that Home files are not supposed to be in the final distro, and that I'm sure I'll forget all about it soon enough, but whatever...
So users who get the final distro are going to be expected to hand code stuff? Might as well write off Wedge now then because most users do NOT want to hand code ANYTHING. If anything, not only does it need to stay but it needs an admin UI as well.
What do you mean, Pete? They get the Welcome template by default. Which is geared towards a 'starting' forum. Heck, I can't bother to write the UI for the default homepage target, allowing for users to choose whether they want to target a specific page, or action, or board list, or specific board (or even topic, why not...)

The purpose of the differentiation between Home and Welcome is that in the case of Home, I could distribute it separately from the package, but the entire package itself is suppose to be comprised only of files that should NOT be modified. Well, Welcome is here to say, "create your own homepage now... And name it differently!", it doesn't do that yet, but that's the idea.
I know that as a forum admin hobbyist, back in the day, I wanted to change the homepage but was wary of having my changes overwritten by new forum updates. In the end, I had to create patches and other horrible things.

One of my goals with Wedge (and yours, see plugin system!) is to allow users to update their forum files without any influence over their modifications (as long as they follow the guidelines to modify things.) First thing for that is to allow for the homepage (most often modified page) to be overridden and redirected to another page of yours.

Your post wasn't very... lively... Any problems..?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #560, on March 28th, 2013, 04:00 PM »Last edited on March 28th, 2013, 04:10 PM
Quote
At some point you renamed 'simple' and 'classic' to 'name', at other points to 'group'. I suspect the one above should say 'group' instead of 'name', but I'm not sure
Hrm, yes it was done on auto pilot to a degree. It's also complicated because of what's going on :/ It may even be broken, I don't know. But the changes to plugin-info.rng should indicate what is intended.

:edit: One deals with the permission groups, one deals with the individual permissions and the group it is supposed to go into. They should not both be the same. I will fix it in my next rev.
Quote
True enough. Although not always done... (e.g. notification action.)
Fairly sure I gave the notification action a title some days ago.
Quote
(It is so tempting for me to remove themes as a feature entirely, because skins can do so much more... The only thing they have for themselves, is the ability to replace a template file. But it should be possible to simply put these files into our skin files... Why not?! I'm so familiar with my skin code, and so unsure about theme code... Heck, I've never tried to install an additional theme in Wedge. Everything can be done with skins so...)
Can a skin replace part of index.template.php?
Quote
So, I take it it's untested, right..?
I tested it a long time ago, haven't bothered to test it again since I wasn't sure I wanted to keep any of it; it distinctly occurred to me that I could start from fresh and fix some of the logic issues in it by better design. For example multi-user assignment was a big request but it's not just a schema change.
Quote
I don't know, Pete.
All I know is that SMF has this:
And I see no reason off hand why this should even work. preparsecode has always converted line breaks out - always.
Quote
And you have a similar one, except you're using $txt instead of file_get_contents.
The rest is the same, i.e. you parse_bbc it. If you didn't want it to be parsable, you should remove the parse_bbc call and revert the $txt strings to use HTML instead
I'm not being funny but did you even look at the UI in the admin panel for this?

The reason my file had no line breaks and br tags in it is because I ran it through preparsecode. That's what preparsecode does, amongst other things: strips the line breaks and converts them to br tags. I then specifically call un_preparsecode on it when I prepare it for the rich text editor so that people can use full formatting it without having to get their hands dirty like they had to in the old days - hell, most people didn't even know the agreement supported bbc parsing.

So I checked parse_bbc and lo, there is a linebreak to br conversion, yet I cannot think of a single time outside of this one area where this ever EVER comes into play.

The news area... stores all news items, one per line, with preparsecode having chewed through and converted all the line breaks to br tags.

Posts... they're all on one line, not that it seriously matters either way.

Agreements... they're the odd ball. I deliberately tried to harmonise it - working under the assumption that it had to be that way as it was my understanding that parse_bbc didn't do linebreaks.

But now everywhere that uses parse_bbc gets its content with preparsecode attached, agreements never used to get that IIRC. Result: everywhere that parse_bbc gets content, it's doing it without line breaks, therefore no need for parse_bbc to convert line breaks, therefore agreements shouldn't have line breaks anyway.
Quote
Well, exactly... I was talking about translators, in this case.
In which case, having a long line of text will be annoying to translate for them, unless they enable wrap mode, but not everybody thinks of that. (Heck, I pretty much never enable wrap mode, except when I have to read a TXT file that was built that way...)
And, as ever, I wasn't intending them to have to edit it as such. The grand plan involves having language editing tools for translators on this site. Which would naturally have a variation of the editor as in the admin panel... which means they wouldn't see the raw code (because they don't really need to)
Quote
What do you mean, Pete? They get the Welcome template by default. Which is geared towards a 'starting' forum. Heck, I can't bother to write the UI for the default homepage target, allowing for users to choose whether they want to target a specific page, or action, or board list, or specific board (or even topic, why not...)
You are not a regular user. You're a user who is more than willing to get your hands dirty with code. Almost every single other admin out there won't dare touch a PHP file unless they're having their hands held.

The idea of having a template like this is a noble one, but it's also sadly naive of our userbase - it's giving them infinitely more credit than most of them would actually be due.

This is why I've been talking about content management and adding a CMS into the mix for the simple reason that most admins can only manage something if given a nice UI to play with, it's why so many of them jump to Simple Portal and co, so that they can have nice front pages and so on.
Quote
First thing for that is to allow for the homepage (most often modified page) to be overridden and redirected to another page of yours.
So instead of giving them the barest bones tools for the job, we need to give them more powerful tools.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #561, on March 28th, 2013, 06:30 PM »
Quote from Arantor on March 28th, 2013, 04:00 PM
:edit: One deals with the permission groups, one deals with the individual permissions and the group it is supposed to go into. They should not both be the same. I will fix it in my next rev.
So may I leave everything to you on this..? It was quite a large patch, so I know it's not going to be fun...

Hmm, a bug with the auto splitter... Sometimes it inserts two blank lines after opening the quote again. Uh.
Quote from Arantor on March 28th, 2013, 04:00 PM
Fairly sure I gave the notification action a title some days ago.
Yup, yup, you probably did. I'm talking about the original commit.
Quote from Arantor on March 28th, 2013, 04:00 PM
Can a skin replace part of index.template.php?
Nope. It's the mission of Custom.template.php, where you can declare template_whatever_override() to replace a function.
We discussed it at length back in the day. Having template files inside skin folders is very doable, but it's not 'clean'. I'm always torn between the two sides of the problem, eh...
Quote from Arantor on March 28th, 2013, 04:00 PM
And I see no reason off hand why this should even work. preparsecode has always converted line breaks out - always.
And parse_bbc() has this near the beginning:

$message strtr($message, array("\n" => '<br>'));

Meaning what it means... ;)
(And you noticed that too, now that I'm reading the rest of your post.)
Quote from Arantor on March 28th, 2013, 04:00 PM
I'm not being funny but did you even look at the UI in the admin panel for this?
I remember looking at it when you committed it. I think I asked a few questions about it, even... But at the time, I don't think it was even possible to change an entry. It had these 'master' things, but that's all... I think.
Quote from Arantor on March 28th, 2013, 04:00 PM
The reason my file had no line breaks and br tags in it is because I ran it through preparsecode. That's what preparsecode does, amongst other things: strips the line breaks and converts them to br tags. I then specifically call un_preparsecode on it when I prepare it for the rich text editor so that people can use full formatting it without having to get their hands dirty like they had to in the old days - hell, most people didn't even know the agreement supported bbc parsing.
I didn't. I just noticed that adding line breaks manually in the string would add more physical line breaks to the thing. So I checked the code, and noticed the parse_bbc call. Which is why I decided to go for a 100% BBCode version. (Not that there's ANY BBCode in these strings, but... I mean the line breaks...)
Quote from Arantor on March 28th, 2013, 04:00 PM
So I checked parse_bbc and lo, there is a linebreak to br conversion, yet I cannot think of a single time outside of this one area where this ever EVER comes into play.
I don't know either, I'll have to say.
Maybe we could simply remove that line (and fix anything it breaks), remove the parse_bbc call from agreements, and use HTML to break lines. (And still keep line breaks to make the strings breathe. i.e.,

$txt['...'] = 'Hello,
<br><br>
World.';

Would work for me...
Quote from Arantor on March 28th, 2013, 04:00 PM
Agreements... they're the odd ball. I deliberately tried to harmonise it - working under the assumption that it had to be that way as it was my understanding that parse_bbc didn't do linebreaks.
Yeah but that's no reason to throw a hadōken at me in your previous post, buddy... :lol:
Quote from Arantor on March 28th, 2013, 04:00 PM
And, as ever, I wasn't intending them to have to edit it as such. The grand plan involves having language editing tools for translators on this site.
Considering the amount of work we still have to finish, I don't see this happen in a realistic time frame. I'd rather we focus on more urgent matters -- translators can work on existing language files, if they're in such a hurry to have it done ;)
Quote from Arantor on March 28th, 2013, 04:00 PM
The idea of having a template like this is a noble one, but it's also sadly naive of our userbase - it's giving them infinitely more credit than most of them would actually be due.
Perhaps it is. But it's a stock file. It's what I'm doing by default. I'm saying, "now that your Wedge copy is installed, download this separate file, Home.php and its related files, copy them to their respective folders, and point the homepage to Home, so you can have the Wedge.org homepage code on your site. Now you can modify it all you want (if you want!), because a Wedge upgrade will never overwrite it.
Quote from Arantor on March 28th, 2013, 04:00 PM
This is why I've been talking about content management and adding a CMS into the mix for the simple reason that most admins can only manage something if given a nice UI to play with, it's why so many of them jump to Simple Portal and co, so that they can have nice front pages and so on.
There's always room to improve all of that, yeah. But it's not something I'm willing to do for now... There are many complex features I want to add to Wedge, and by now I think that it's more reasonable to postpone them to a 1.1 or 2.0 version. v1.0 is only the beginning... Hopefully..?!
Quote from Arantor on March 28th, 2013, 04:00 PM
So instead of giving them the barest bones tools for the job, we need to give them more powerful tools.
And working on these tools will deprive Wedge of other features that could be added to it, and that could be used by more people... :-/

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #562, on March 28th, 2013, 06:38 PM »
Quote
So may I leave everything to you on this..? It was quite a large patch, so I know it's not going to be fun...
Eh, it's a one line fix (and even tested)
Quote
Nope. It's the mission of Custom.template.php, where you can declare template_whatever_override() to replace a function.
We discussed it at length back in the day. Having template files inside skin folders is very doable, but it's not 'clean'. I'm always torn between the two sides of the problem, eh...
If you can replace a given template somewhere, that's cool. Though I can see one horrible situation.

master skin
  sub skin 1
    sub skin 2

If both sub skins declare a Custom template, in theory both would have to be included since sub skin 2 is inheriting from sub skin 1 - but if they replace the same things, you're going to get a function collision.
Quote
I didn't. I just noticed that adding line breaks manually in the string would add more physical line breaks to the thing. So I checked the code, and noticed the parse_bbc call. Which is why I decided to go for a 100% BBCode version. (Not that there's ANY BBCode in these strings, but... I mean the line breaks...)
But that's the thing... it's *not the same* as any other bbcode. Any other bbcode in the system will be a long one line string. This is the only area that's different.
Quote
Yeah but that's no reason to throw a hadōken at me in your previous post, buddy...
I'm sorry, I'm operating on something of a frustration level because I seem to be doing the rounds at the moment of explaining my point several times over and no-one's listening :(
Quote
Considering the amount of work we still have to finish, I don't see this happen in a realistic time frame. I'd rather we focus on more urgent matters -- translators can work on existing language files, if they're in such a hurry to have it done ;)
And they can even do what I did: edit it in the editor, the DB will give them a shiny preparsecode'd version of the content. I didn't manually translate anything - I just copied the original agreement.txt into a post and saved it, then grabbed it straight out the DB.
Quote
now that your Wedge copy is installed, download this separate file, Home.php and its related files, copy them to their respective folders, and point the homepage to Home, so you can have the Wedge.org homepage code on your site. Now you can modify it all you want (if you want!), because a Wedge upgrade will never overwrite it.
Then it's still a usability write-off. Only hardcore users are going to want to do that. The rest will just want a nice UI to play with and expect it to remain in place anyway (i.e. stored in the DB)
Quote
And working on these tools will deprive Wedge of other features that could be added to it, and that could be used by more people...
Having content management in the core will encourage more people to use it than not, IMHO.

MultiformeIngegno

  • Posts: 1,337

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #564, on March 28th, 2013, 08:31 PM »
Also, after clicking on the Notifications option (now it's at the top), it's wrapped under the language icons rather than next to them where it currently is, plus there's no background.

* Arantor can provide screenshots if needed.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #565, on March 28th, 2013, 08:36 PM »
No need for a screenshot -- as I said in my thoughts, I broke the site™™™™.
I don't know why avatars are invisible, but it's certainly due to loadMemberAvatar(). I'll look into it.

Notifs... Meh!! This is mostly due to the fact that I had to 'backtrack' my CSS code because I was starting to tear everything apart to load as little HTML as possible, and I wasn't sure where exactly I should stop backtracking... I guess I stopped at the wrong place! :^^;:

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #566, on March 28th, 2013, 08:41 PM »
I know that feeling, heh :)

I'm currently attacking the polls template, separating the elements so I can make a fun plugin ;)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #567, on March 28th, 2013, 08:53 PM »
Avatars fixed...

As for notifications -- I have about 5 minutes left to fix them... So I guess it'll be hard for tonight. I'll just focus on the missing background ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Nao

  • Dadman with a boy
  • Posts: 16,082