Show Posts

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.

Messages - Nao
166
Features / Re: New revs
« on February 19th, 2017, 04:34 PM »
[Commit revision 871993e]
Author: Nao
Date: Sun, 19 Feb 2017 16:34:41 +0100
Stats: 1 file changed; +3 (insertions), -3 (deletions)

  • Okay, okay... I botched my testing after refactoring the minification code. Let's not talk about it again, okay? (Subs-CachePHP.php)
167
Features / Re: New revs
« on February 19th, 2017, 02:55 PM »
[Commit revision 82b795f]
Author: Nao
Date: Sun, 19 Feb 2017 14:55:20 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Quick fix for 'out of bounds' file browsing error in the error log, due to files having UTF8 characters. (ManageErrors.php)
168
Bug reports / [Security] Re: BBCode in SQL Database
« on February 12th, 2017, 09:58 PM »
Quote from CerealGuy on February 12th, 2017, 07:16 PM
A little progess which is worth to mention in my opinion. We can now use the process function on all bbc types :cool:
and i wrote a small plugin to show you what this can now do.
A markdown parser? Nice... :)
I'm sure it could be useful.
I don't think you have to use the CDATA block around such short code, though!
Although now I understand your point about leaving BBCode support in the database.
Quote from CerealGuy on February 12th, 2017, 07:16 PM
It's just hacked together, but still works quite well. Besides this autolink stuff wedge does (inserting random http://tags on everything which looks like a url to something) :D
'unparsed'? ;)
169
Bug reports / [Security] Re: BBCode in SQL Database
« on February 12th, 2017, 09:54 PM »
Quote from CerealGuy on February 12th, 2017, 10:21 AM
Nope, everything is in Subs-BBC.php. This Shift-Enter thing is nice, you should tell more people about that :D
I know right... Well, when I introduced it, it was pretty popular in Wedge. I was even a bit scared that the feature would end up in SMF... Yeah, I guess I overestimated them. :P
One of the downsides with the auto-splitter, is that if there's a newline after the point where you're splitting, Wedge won't notice it, and will insert an opening quote tag, then that newline, then the original text. It looks ugly. I've gotten used to just editing those out, but honestly it'd be best to add some code at the beginning of splitQuote() to look for space/newline characters immediately before and after the split point, select them together, and remove them, then adjust the starting position. THEN it'd be the perfect splitter. Or maybe you have a simpler idea..?
Quote from CerealGuy on February 12th, 2017, 10:21 AM
There wouldn't be a need for it, but I would keep the database stuff. I like it that you can add bbcodes over plugin-info.xml.
Ah, yes indeed. It's just that I like simplifying the database as much as possible, like removing extra tables...
Quote from CerealGuy on February 12th, 2017, 10:21 AM
Wouldn't be possible without loading bbcodes from database.
Are you positive about that?
After all, an XML file can also contain function declarations...
Quote from CerealGuy on February 12th, 2017, 10:21 AM
If you still know what's the difference between the 'unparsed_equals', 'unparsed_commas', 'unparsed_commas_content', 'unparsed_equals_content', 'parsed_equals' bbc types this would be very helpful :D
Well, I could explain it, but I won't bother, as the SMF documentation (I think?) did it well... But Pete removed it in his commit to move BBCode to the database (December 3, 2010 -- quite soon after we started work on Wedge.)

(edit: removed block, since you've already seen it.)

Unparsed content just means that the contents won't be parsed by parse_bbc(), like in... Well, the code tag?
IIRC, one of the things I added to the system is the ability to have multiple (optional) parameters.Oh gee, looks like you found it by yourself. Sorry for wasting your time (and mine!) ;)
Quote from CerealGuy on February 12th, 2017, 10:21 AM
When we're already talking about SSL, what about ssl for wedge.org?
Well it's supported already, it's just not the 'default'.
The reason why it's not default is that Wedge uses http-based avatars, which means browsers showing an HTTPS page will consider it 'insecure' because there's an HTTP-based image embedded in the HTML.
The solution, of course, is to 'simply' fix all local avatar links to the correct protocol, but Wedge stores the URL in multiple places, so that's a bit annoying, unless we change it directly in the database, but that means if you switch back to HTTP (e.g. expired certificate), you're likely to get empty images (expired cert + image link = no image at all, because the browser won't trust it until it's approved manually, and since it won't show a popup for a simple image, you're screwed.)
Also, doesn't help with external avatars. There's no way to know if they're compatible with HTTPS.

And I'm pretty sure HTTPS fans would want that address bar icon to be green, not gray...
Quote from CerealGuy on February 12th, 2017, 10:21 AM
Yup, remove it and only let the preview thing there. Maybe split the editor in two tabs, one for modifying and one for preview. Like the github editor.
Yeah, I wouldn't know about removing it... But it's certainly worth posting a poll. Only, on this site, we wouldn't be getting many answers... Probably likelier to get proper answers at sm.org, of course, but I stopped going there years ago.
Quote from CerealGuy on February 12th, 2017, 10:21 AM
I will give it a try, people who quote a lot will use it. I just like quotes for off topic or threads with many questions/answers. Like this one :D
But you're talking about preventing people to quote parts of your message, no?
Maybe there's a misunderstanding.
Were you instead talking about a multi-quote feature? Like the one that's been in Invision Power Board literally since forever..?
That would also imply that topics ARE flat. My own 'implementation' of the thing is the soft-merging of posts, so that multiple answers don't take more space, and yet if you click Quote on a post, your reply is automatically threaded below that post, even if it doesn't show on the default flat skins.
Quote from CerealGuy on February 12th, 2017, 10:21 AM
ElkArte looks like a good SMF fork. But I prefer the look and feel of wedge. They seem to have a nice codebase. Tests and stuff :D
Yeah, I'd tend to say Elk is made by hardened professionals, and Wedge by enlightened amateurs.
The fact that they've been at work on it for the last 5 years is impressive, too. When they started, I doubted they'd 'last' for 5 years. In the end I worked fulltime on Wedge for 5 years, and they did too.
Personally though, I'd hate being restricted by test suites when it comes to adding new features. These aren't even a guarantee your feature will work in every situation. I prefer to rely on beta testers.
Quote from CerealGuy on February 12th, 2017, 10:21 AM
nginx + latest php + mariadb. Works like a charm.
Nginx is the php server too? Did you convert your htaccess to use Nginx too?
Quote from CerealGuy on February 12th, 2017, 10:21 AM
They are, but as soon as we use JS, we could use all the JS features, even the new fancy ones. For a chat system for example :D
Ahah.
I don't know. I'm not used to using a nuclear bomb to break a window.
Quote from CerealGuy on February 12th, 2017, 10:21 AM
Maybe something like js-doc for php would already be enough with generated html docs. Many functions and classes are documented inside the code.
Yeah. There's 'something' called phpdoc, I think.
Actually, that was the idea behind the comment refactoring that Pete did for a while. He wanted to use a tool to later automatize the extraction of function descriptions. I wasn't comfortable with that tool, so I just left him to his devices, unfortunately he never finished it. But he did a good job at what he did. (Basically, he commented most of what matters...)
Quote from CerealGuy on February 12th, 2017, 10:21 AM
Maybe this would be an idea. For real WYSIWYG wedge would need a full bbc parser in js... Or a basic bbc parser which lets the server render the html if it's a more complex bbcode.
A full bbc parser in JS..? But how is it different than using Ajax to parse said bbc?
Quote from CerealGuy on February 12th, 2017, 10:21 AM
I don't really have an idea, but definetly something more like a chat, even if it's pseudo and without ajax features.
But would be a neat thing. Maybe we can just reuse the database structure.
Yeah, I looked into it, and:
- there are a few columns that'd be useless, like the subject one. Not a big problem.
- PMs don't have a recipient ID assigned to them, instead it's done through an extra table that can hold multiple people as recipients. While it's a good idea to make it more flexible, it also makes it harder to sort PMs by conversation. How do we 'recognize' that a specific conversation should be treated separately? Maybe by having some sort of id_conversation toggle, I don't know. It's a possibility, just makes it harder. Then again, a multi-user chat message, aka a chat room, sounds good to me...

This is definitely the next refactoring work I'll be doing, as soon as I'm done with the new site (Lestrade's, if you're curious! Although, if you dont have a Steam account, it'll be quite useless to you ;))
170
Bug reports / [Security] Re: BBCode in SQL Database
« on February 11th, 2017, 11:04 PM »
Quote from CerealGuy on February 11th, 2017, 06:43 PM
So loading bbcodes from file works, language parsing works, additional loading bbcodes from sql works too.
The bbcodes as an array take 602 lines.
Did you simply turn it back into something similar to SMF's version?
Because it'd be best, I suppose, for plugin authors to 'understand' the thing...
Quote from CerealGuy on February 11th, 2017, 06:43 PM
Only problem i have is thinking of a good name for the sql fields and the array field.
Currently the functions are called 'validate' functions, which is in my opinion not describing it well, because you can also modify the content and do more advanced stuff as only validating. Any ideas for a better name? @Nao
Sure.
preprocess for pre-validation
postprocess for validation
Or just 'process' if you want to keep it simple.
171
Bug reports / [Security] Re: BBCode in SQL Database
« on February 11th, 2017, 11:02 PM »
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- First thing I want to do is moving all "validate_funcs" to
  Subs-BBC (nearly done with that).
Yeah, as long as it's not in a Load.php or Subs.php file that gets loaded even if no BBCode parsing takes place.
(Gee, I just remembered about the Shift+Enter feature in Wedge to cut off quoted posts... How cool. Why am I not using it more?!)
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- If this is done I want to look if it's possible to "hardcode" all those
  default bbc tags in a nice function. Something like loadBBCodes(),
  which returns all default bbc tags plus loads all others from sql.
  Have to see how the disable tag stuff is done. Want to add a
  hook here too, so plugins really have all the power over bbcodes
  without the need of modifying the bbc parse code or doing some
  regex stuff on top of it.
Oh yeah, hooks, good idea... Maybe with hooks, there's really no need to use the database at all..?
Quote from CerealGuy on February 9th, 2017, 01:06 PM
It's a bit to do, won't get bored the next days. The Problem is not
the coding, it's understanding what goes on in Subs-BBC :lol:
If I'd seen that post earlier, I could have offered to do it for you, I still have a wide knowledge of what everything does.
(And I'm saying that just after discovering/remembering that SMF/Wedge use a set_error_handler() function to show errors, when I was implementing my own for a debug session lol...)
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Didn't play with a pure webspace in years, and i know why :D You just have more control, more power and of course more responsibility. But stuff like let's encrypt (free ssl certificates in case you don't know them), full control about software which is running and the configuration will always let me choose an vps/kvm/whatever over a webspace.
You don't need a VPS to use Let's Encrypt. In fact it's starting to become a generic feature in many shared hosting environments. IIRC you don't even need a unique IP to use a SSL certificate.
My hosting is a VPS, BTW, not shared hosting. My only shared hosting is for cynagames.com, and even then I'm considering moving my site somewhere else because it's getting really expensive for a SINGLE mostly static site with barely any visitors... Hmmm. But my current hosting being PHP7 only, it would take days to convert cynagames to use it, since it's running an old SMF 1.1!
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Wedge is quite finished. It's totally usable, I only tweak stuff which I don't like how it behaves. For example the WYSIWG Editor. It's fully working, but awful :D
Well, if it were just up to me, I'd remove it entirely, I never use WYSIWYG. And I'm pretty sure 95% of all SMF/Wedge users don't, either.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Will be the next thing i want to look at. And some features I see around other forum softwares which i like. For example mark quotes. So you mark a part of post and you can only quote this part. Really like this idea, have to see how i can implement that. Maybe stuff for a plugin.
Interesting. I don't know if it's a feature people would use, though.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Besides that, i said it already in parts here and there, wedge is in my opinion the only good forum software around.
You probably haven't tried them all ;)
Maybe XenForo 2 is better, I don't know...
I know ElkArte has its fans, too. (Plus its authors are eminently respectable, so that helps!)
I'm not a big fan of their design though. I don't like Wedge's either, but Wilde is very tweakable and close to something both usable and good-looking.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
It's nearly perfect with balancing out pure html/css functions and extra js. It has many js stuff which makes it feel modern and dynamic without making it unusable on browsers without js. I mean solutions like nodebb they won't work in a browser without js.
Yes, that's true. Anything that tries to reinvent forums is a failure in my opinion. I understand their point, not the execution.
I have a weakness for threaded forums, though. My main concern with that system is how new posts are presented to the user who already dead a previous version of the topic. At one point I wanted to have a hybrid solution, where updated topics are shown flat, and you can view posts "in context" if you'd like. Pretty much what I did for Thoughts...! Also, Wedge internally supports parent/children for posts, you could build a skin that shows posts in threaded mode.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
The next thing is mobile/responsive design. A lot of forum softwares aren't able to this. Xenforo just looks really really bad on a smartphone. They didn't understand this *less thing which wedge does. Less padding and style elements is more on a mobile screen.
Well, I don't think Wedge is fantastic on mobile either, but yeah I'll agree with you on one point, it's the best mobile skin I've ever used on my phone. (IIRC it also had the shift-enter split by default for practical reasons... ^^)
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Wedge feels lightweight, it loads super fast on the browser.
Because I spent so much time optimizing it... ;)
Then again, with modern browsers, modern servers and modern web software, it doesn't feel like much of a difference anymore.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
It looks modern, has a special touch to it which you will recognize. And it has a lot of really good ideas implemented. Besides that, it's super stable. I think we use wedge on our forum since 3 years. Never had a serious problem with the forum software. Not even a small one.
I must be the only one, then... ;)
Or generally people who use weird setups like Nginx + Apache.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- PHP is just not modern anymore. In fact, it's a bit dying.
With PHP7 increasing performance ten-fold, I don't think it's dying anytime soon...
Quote from CerealGuy on February 9th, 2017, 01:06 PM
I'm not sure about that, but for example websockets aren't
  supported yet in php.
There are libraries like Ratchet. But websockets are more of a JS thing, aren't they..?
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Which could be a nice thing to have,
  also for wedge. Especially for notifications. Wedge is maybe
  the last and best php Forum Software.
Well, for notifications I agree websockets are a good idea, but Wedge's implementation is already good enough-- it loads as little data as possible and pauses itself when needed. I could add some code to send the notifications through Chrome's own notification system, though.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- Besides the PHP thing, the codebase is old and unmaintained.
  No unit tests, no coding style standards. You also don't want to
  touch that code, risks are too high to break a thing and don't even
  notice it. Not a big of a problem, there aren't too many who use wedge
  anyway :D
Whenever I see code I don't understand, I'll just use git blame on the file, and find out what commit added it, and the related commit notes. That's often how I figure out something was improperly added.
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- No documentation, no helper/"framework like" functions to make life
  easier for plugin developers.
Well, I never wanted to document the whole thing, I hate writing docs... Pete was supposed to do it, then someone else, been there done that... :-/
Quote from CerealGuy on February 9th, 2017, 01:06 PM
As a plugin developer you write so many
  functions again, which are maybe already implemented in the wedge
  core and you just could reuse. But you don't know of them and never will.
Agreed. Can't help much here.
Same can be said for SMF, though. Didn't stop it from being successful and having tons of mods. (Most of them being shit, though. Not all mods were of Aeva Media quality :P)
Quote from CerealGuy on February 9th, 2017, 01:06 PM
- Some standard functions are just not as good as they should. For example
  the editor. Color chaning is bad, you can't asign a choosen color to another
  marked text without first changing it's color to something else and than to
  the color you want. Makes no fun.
Quite honestly, I should remove that kind of 'feature'... Even from non-WYSIWYG... Leave the bbcode in, but just don't advertise it. Let's just say it was just a good excuse to make use of sbox.js's advanced features!
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Or Private Messages. It's this old private messaging system you know from
  Bulletin Boards. It's just old and feels bad to use. It's a bit like emails and this
  is already bad. In fact i would always prefer to write you a message on any
  instant messanger instead of using wedge.
Yeah, you know what, I actually considered that for my new site, and was wondering if I should just replace it with a pseudo-chat system between 2 users... Something similar to Facebook, really.
Could be a path to explore.
Only problem is: how exactly do you 'import' the old PMs into that system... ;)
Also, it would probably encourage people to post more 'PMs', thus more entries in the PM base, thus slower to use... (?)
Quote from CerealGuy on February 9th, 2017, 01:06 PM
Wow this is more of an essay and totally off topic. But who cares.
Yeah, it's not like there's too many people around ;)
172
Features / Re: New revs
« on February 11th, 2017, 07:49 PM »
Quote from Nao on February 11th, 2017, 04:00 PM
A departure from SMF-based forums: redirectexit() will no longer add the session variable to the URL if it's already in a cookie. I'll be honest with you, I never noticed that variable before, but it's started showing up everywhere in my new server. If you know why, feel free to share! Other than that, this update is very logical, so for those like me who have the problem, there you go. (Subs.php)
Okay, I may have found out why this happened...
https://bugs.php.net/bug.php?id=72940
Apparently, there was a bug between PHP 7.0 and 7.0.10 where the SID constant was defined even when a session cookie was set.
I'm using PHP 7.0.8, so that could be the reason.
At least I wasn't mad... :^^;:
I'm likely to keep that code in place, it's not like it's gonna cause issues after PHP 7.0.10.
173
Features / Re: New revs
« on February 11th, 2017, 04:06 PM »
[Commit revision fe4f2b8]
Author: Nao
Date: Sat, 11 Feb 2017 16:06:04 +0100
Stats: 3 files changed; +10 (insertions), -14 (deletions)

  • I think I also need to update the language files in the main repo... (Help.english.php)
  • Colornazi. Some text was not readable enough. (index.css)
  • Reverted a previous login page fix, and just kept (and tweaked) the mobile version. Apparently works just fine. (sections.css)
174
Features / Re: New revs
« on February 11th, 2017, 04:00 PM »
[Commit revision 4584563]
Author: Nao
Date: Sat, 11 Feb 2017 15:57:59 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • A monstruous GROUP BY to fix the now dreaded MySQL strict mode error, this time when viewing thoughts. Yes, ouch. There's no way to get around it, except by disabling that flag, and I don't know if it would be acceptable. (I already have some code for that...) (Thoughts.php)

[Commit revision 213537f]
Author: Nao
Date: Sat, 11 Feb 2017 16:00:27 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • A departure from SMF-based forums: redirectexit() will no longer add the session variable to the URL if it's already in a cookie. I'll be honest with you, I never noticed that variable before, but it's started showing up everywhere in my new server. If you know why, feel free to share! Other than that, this update is very logical, so for those like me who have the problem, there you go. (Subs.php)
175
Features / Re: Language revs
« on February 10th, 2017, 11:20 PM »
[Commit revision b0cda21]
Author: Nao (Signed-off)
Date: Fri, 10 Feb 2017 23:20:08 +0100
Stats: 4 files changed; +6 (insertions), -3 (deletions)

  • Added a note to the 'Enable compressed JS/CSS' help popup indicating that servers behind a reverse proxy like Nginx should disable gz extensions from being processed by it. I wasted a few hours trying to understand why the feature wouldn't work, and that was it. (Help.english.php, Help.french.php)
  • I think I forgot to commit an old change in an English file. (ManageMaintenance.english.php)
  • Old Casenazi, too. I think. Last modification date for that file was back in August, oops. (index.english.php)
176
Archived fixes / [CSS] Re: Login looking bad on small screens
« on February 10th, 2017, 02:00 PM »
I dunno, the 600px size was decided upon several years ago, and I don't remember exactly why I chose that threshold...
All I know is that the smartphone-specific code isn't there, it's in @media $responsive, that one is only for narrow windows (as well as smartphones of course.)
177
Features / Re: Language revs
« on February 9th, 2017, 03:49 PM »
[Commit revision 9cb9724]
Author: C3realGuy
Date: Thu, 09 Feb 2017 12:49:30 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Typo in "Identifizierungs-Erinnerung"

[Commit revision 4103afe]
Author: Nao
Date: Thu, 09 Feb 2017 15:49:22 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Merge pull request #31 from C3realGuy/fix_typo_identifizierung
  • German is a fascinating language.
178
Bug reports / [Security] Re: BBCode in SQL Database
« on February 9th, 2017, 11:26 AM »
Quote from CerealGuy on February 7th, 2017, 11:58 AM
Yup, totally aggree with your points. On the other hand, adding bbcodes via plugins is quite a handy thing. So i won't say the idea is bad, just the way it's done in the moment is not the best.
Maybe do... BOTH?!
- Have the main BBCode in a source file,
- Give plugins the ability to add or replace BBCode,
- Only, plugins can't add code in the database, rather a function name. IIRC plugin files are always loaded so it's easy enough to just put the code in a plugin file and it should get executed.

Or, if it's too much to handle, just do points 2 and 3, because it still means putting the code to be executed into a source file, goddammit.
Yeah, that's probably the most realistic solution..?!
Quote
What kind of a server are you using that the configuration issues give you nightmares :hmm:
Well, I've moved Wedge.org and Noisen.com at the same time. Wedge.org was flawless, but Noisen.com is running a heavily customized SMF 2.0 RC, with none of the code fixes to make it run on PHP 7. However, that server can ONLY run one version of PHP (because the admin doesn't want to bother, and it's okay), so I had to manually convert SMF code to PHP 7 *and* my custom code as well, of course... Took at least a day.
If I move my site again, I'll make sure it has PHP 5 as an option. I'd rather use PHP 5 for Noisen, even though it's now working correctly in PHP 7.
Sorry if it was confusing. Wedge was fine.
I'm having Wedge problems with my other new site though, ahah. But again-- server problem. Another server, other problems: this time it's file permissions. The difference is, the admin has been AWOL for 2 months now. Not great...
Quote
PS: It feels good to see wedge back under active developement :D
Yeah, me too. And thank you for being the only developer who still believes in it. :)

Although I never felt back about leaving it -- I just considered it finished. What I'm doing is maintenance work, plus extra minor features from time to time because, well, it's fun?
My game development plans were set aside due to the state of the market. Purely from a business point of view, there just isn't enough visibility for a new game, and for now I don't want to rely on my 'Kyodai' brand name to attain more recognition. So I just focus on selling that old game and building that game trading site. (Which for now is just a game trade matching site. Supposed to be unveiled today, except the site isn't working due to aforementioned permissions ahah.)
179
Archived fixes / [CSS] Re: Login looking bad on small screens
« on February 9th, 2017, 11:15 AM »
Thanks.
180
Archived fixes / [CSS] Re: Login looking bad on small screens
« on February 8th, 2017, 08:21 PM »
So... Looked a bit into this commit, and I have a few remarks.
- overflow: auto isn't about adding scrollbars, it's about clearfixing the item. It's a well-known advantage of that overflow type. As long as you don't actually have a div big enough to get scrollbars, it's all fine.
- I tried to revert the commit locally, and only keep the @media override at the end. It worked perfectly that way (i.e. I'm getting what you showed in your last screenshot.). Are you sure you didn't commit too much...? I understand that precedence might be a problem, but you could simply add body #wedge before the declaration, and the .login dt will then get better precedence. However I didn't even get problems myself...
I tried to change the media width to 600px instead of 450, and same results to me.
Interestingly, I also removed the overflow entirely, and didn't get any issues.

Can you look into this..? (e.g. just try wedge.org on your mobile phone and browser...)