Jump to content

Forum Upgraded


rich
 Share

Recommended Posts

On 12-1-2016 at 2:48 PM, rich said:

No-one ever likes change. Ever. Least of all on the internets.

I've been active on a few forums, and with these change/update moments people always(!) complain about the layout changes. :D A major update like this at least shows the community is still alive and I assume/hope the update will make the forum easier to manage for the people who are running it, so more power to you and all that good stuff. :)

The only downside for now is that older posts are missing linefeeds in the code blocks (some users already mentioned this) makes them look messy and hard to read. I hope this can be fixed in due time, because the forum has accumulated a lot of valuable tips and tricks with example code.

Link to comment
Share on other sites

2 minutes ago, BdR said:

The only downside for now is that the code blocks with missing CRLF look messy and harder to read. I hope this can be fixed in due time, because over the forum has accumulated a lot tips and tricks with example code.

That is a problem, all these great examples are now difficult to read.

Link to comment
Share on other sites

10 hours ago, staff0rd said:

Strangely this post has the first two code samples with broken line endings, but the last one appears fine.

There's nothing I can do about that. The forum conversion process when it 'upgraded' from 3 to 4 screwed all of the line-endings. It's impossible to go back through and fix it.

Link to comment
Share on other sites

7 hours ago, rich said:

There's nothing I can do about that. The forum conversion process when it 'upgraded' from 3 to 4 screwed all of the line-endings. It's impossible to go back through and fix it.

That's pretty unfortunate - it lowers the readability of the code considerably, and most of my google searches land me right in these forums.

Here's a proposition - does the forum have any kind of permissions that can be granted to certain users that would allow them to edit other users's posts?  If so, perhaps you could get volunteers to fix these line endings manually?  I would certainly offer to help, as this forum is the main resource for me to learn phaser, and I'd at least fix every post I land on from google that has broken line endings.  Fixing such issues would likely improve my memory retention of the framework also.

Link to comment
Share on other sites

Lovely quirk of the new code editor...

var v = vertices;

vs.


var v = vertices[ i ];

these lines differ by the white space around "i" (which is in square brackets), but without the whitespace some of the code disappears (the open square bracket, the i and the close square bracket) which I presume has something loosely to do with this sequence having meaning in BBcode source.

I suggest it's an issue as i is like the most common iterator for loops and it is not unreasonable to expect it to will be used to index arrays often in posted code

Link to comment
Share on other sites

Hey Rick,

is there a way to 1. preview posts and 2. to disable the wysiwyg editor?

I can't find those options anymore. 

 

I would also be happy if there is a way to reduce the lineHeight for messages.

This kinda gives the facebook vibe. No double checking, type it and send it, feels so spammy xD

Link to comment
Share on other sites

  • 3 weeks later...

Just a thought - presumably the code is stored in the database with its various carriage returns and such - and presumably the issue is that the forum software isn't recognizing them as it should.

I'd expect that this issue is fairly consistant across the data, so it might be possible with a big of RegEx and SQL magic to convert the old format to the new format.

I'm happy to give it a try if you can send me a couple of samples of new and old post records?

I have to say, as a very new Phaser developer (Loving Phaser... love love love!), I'm finding myself Googling constantly, and hitting these old style formatting issues every time. It makes it pretty much unreadable and due to comments and such, the JS beautifiers aren't much help.

It's an absolute shedload of content that really isn't fulfilling its potential at the moment!

Link to comment
Share on other sites

I looked in the database at some of the old posts with code in. The code is wrapped with a <pre> tag. Looks like this:

<pre class="ipsCode prettyprint">betterUpdateBounds: function() {        this.width = this.sprite.width;        this.height = this.sprite.height;        this.halfWidth = Math.floor(this.width / 2);        this.halfHeight = Math.floor(this.height / 2);        this.center.setTo(this.x + this.halfWidth, this.y + this.halfHeight);        //this.offset.x = (this.sprite.anchor.x * this.width);        //this.offset.y = (this.sprite.anchor.y * this.height);}</pre>

An here's a gist because the forum will no doubt screw the above up: https://gist.github.com/photonstorm/50d6a94aba9704441c7a

So I reckon we could probably get away with just using some css and the prettyprint library and not have to actually modify the database contents at all.

Link to comment
Share on other sites

Is that the post table data post migration scripts, if so do you have a before version?

I had a look at the text in a hexeditor... there's no indication of newlines in there, though I did find the mix of space characters with multi-byte sequences for non-breaking spaces interesting (to use the term loosely)

Link to comment
Share on other sites

I'd have to assume copying and pasting it up to a gist will mess with any line breaks that may be in there. If there's a raw copy of the SQL you can zip and upload I'll certainly give it a shot... No promises, but y'know, I've had to squangle this kind of stuff before.

What OS is the database server running?

 

Link to comment
Share on other sites

Here: http://gametest.mobi/html5gamedevs-posts.7z

It's the new posts table and the original one. When the forum upgraded it automatically converted from the original format to the new one, but the data still remains.

Feel free to see what you can do with this - I will need a SQL script (or php script is ok) back from anyone who wants to take this on, as obviously sending me the SQL back is useless.

Link to comment
Share on other sites

  • rich unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...