Miss All Sunday


Because reasons!

Looking for stuff!



6bvqglH.png

In recent days I've been building a nice blog, will create an entry about it in detail later when I'm actually using it 😜 its been pretty fun and I'm learning lots of new stuff. I've been using third party libraries for the most part and I wanted to do the same for parsing BBcode to HTML.

Unfortunately, there doesn't seem to be any good libraries out there or perhaps I just didn't searched properly, dunno, the ones I found are pretty old and the only recent one I found, while nice it has its limitations. It doesn't auto-parse urls, it doesn't even correctly recognize https urls 😜  and the way the lib adds new tags its somehow weird and creates a large amount of instances, that last one isn't actually bad, I just don't like it!

Anyway... it seems I will have to build one myself. Its not the first time I think about it and this might be a lot more easier since I don't have to build a very robust lib or cover every possible aspect.

What I really need is autoparsing urls, code, b, center, img, url, quote, youtube and replace the old smileys with emojis. That's about it, I don't really care about anything else.

I wish I could just use markdown but I can't, unless of course I write a converter which might be fun to do!

Another idea is to just save the messages already parsed, it won't be a security risk since, well, I wrote them all!

mmmm I actually like this idea... I already wrote a simple and quite ugly converter, I can use the old parsebbc function and store the result.


Oh, I actually forgot about Decoda will give it a try and see how it goes, storing in HTML will be my second and building my own my third choice.


Last edited by Suki reason: add tags on 20 Feb 2017, 11:42 am

Re: Looking for stuff!

By Suki on 24 Dec 2016


You know what?  although decode is actually quite nice and I got it working just fine, I decided to go with the full HTML route, it will be a lot more easy for me that way. I have full control over everything, meaning I don't have to worry about user input, heck if really needed I don't really have to have a "posting" controller, I can just keep on using my XML file like I've been doing lately.

Besides, the editor I'm planing to use doesn't really have a bbc format, it only parses text into full HTML.

Anyway, I'm  thinking on also converting smileys into emojis and remove that stuff completely.

Oh, as a nice bonus, the images posted so far will all have the structured data stuff, meaning I don't have to re-do it myself.

Yeah, now that I sleep on it, the full HTML stuff seems like the way to go, less headaches.

There are other "technicalities" I need to sort out, for example, replies.  I'm quite used to replying to myself and keep on updating an entry. Sometimes updates just keep on happening like the code monkey topic which has been going on for years now!

I don't really want to write an entire topic - reply system, that would be too much. Instead I want to write an "update" system, a way to show updates on a particular entry following the same entry style and not necessarily brake the "conversation" by splitting it into several replies.

I still have no idea if any type of comments will be implemented, probably not since it will just be a magnet for spammers and the last thing I want is having to write some spam prevention tools, too much work for little to no reward.

Re: Looking for stuff!

By Suki on 24 Dec 2016


So.... putting the parsing and editor aside, now I'm currently thinking how the hell am I going to convert replies.

Take the "what am I doing" topic for example, that topic alone has 544 replies...


BTW I really, really should stop linking to topics like that.... the new format is different, it won't have any topic ID on it and it won't have any .html fake extension either  but thats material for another blog... I just wanted to remind myself to stop linking stuff...

Anyway, theres a few topics between 20 and 50 replies, the code monkey one has 201. I think thats it, the rest have less than 5.

Now, I can simply send everything to hell and start fresh but I will be losing quite a bit of info. This very own topic is the perfect example, this is the third or so reply I'm doing and chances are as I make progress or take decisions I will come back and write about them. Thats what I do, thats what I've been doing all this time and thats what I will continue to do so.

So I kinda need to find a way to port all that info, problem is, I still haven't made up my mind about the scheme I want to use, I converted the 170~ blog entries several times already, all of them because I always add new stuff to it.

I started with a 4 column table, right now I'm up to 11 and counting...   lucky for me, the converter is pretty simple and it takes a couple of minutes. Sometimes Vivaldi complains about too much redirects bu thats because I'm super lazy and just used a redirectexit() call with a new GET start param, works well but if I want to convert replies too I will need to build a more robust thing, something that refresh itself rather than abusing redirects, or use flush() and sleep() and whatever other weird function php has to offer and my server can handle, screw hitting the server... worst thing that can happen is bots not reaching the same pages they reach every day...

Anyway,  I gotta start making some yummy apple and carrot yogurt salad... maybe I come up with something while doing it.


Oh! before I forget, I also want to convert the One Piece releases and spoilers, I have years and years of info there and the bots love every single message on it...   can't afford missing all that.

Also want to port the "what are you listening to" topic, mostly because I like to go back and see what kind of music I've been listening all these years.

Re: Looking for stuff!

By Suki on 26 Dec 2016


And after a couple of fail attempts I managed to get fugly converted to work, best part is I can add as many boards as I want which means I can also convert the spoilers and release topics. Since I'm paranoid about taking down the server the actual process takes almost an hour or so but thats OK.

The smileys to emojis is also working, at least partially... its just a pain in the posterior to map each one and also a pain in the posterior to work with emojis but its getting there.

And yes, I went down the html route, I gotta modify a couple of BBC but thats minor stuff.

Anyway, this is going great, even the whole theme stuff which I always found it frustrating to work with has resulted quite nice and fluid.

Re: Looking for stuff!

By Suki on 30 Dec 2016


Been keep on working on this. Modified the bbc code and img tags so they kinda look funny now but it doesn't really matter.

I added a couple more boards to the converted which means almost 70% of the total messages are going to be converted.  Also worked on some tools to automatically create meta tags and description for entries.

Oh the emoji stuff is also done! 😄 😉


Can't wait to start working on the posting stuff, I got a couple of ideas to really speed up the process. Also have a couple of ideas on how to create cronjobs, fake ones of course  or go the extra mile and build a proper cron script I just need to make sure it doesn't upset my hosting provider. I suppose once a week shouldn't be an issue.