Posts Tagged bbcode

Lots of pondering going on

Right now Myles and I are pondering about quite a few things to put into SnowCMS.

Mod system
Of course SnowCMS will have a modification system, and the dev team and I were thinking about how to do it. Some systems have a sort of API system, where basically every so often, the system will call on some kind of hooks are integrated for developers to latch on to. But there is not much power. Sure it would be simple for use to make, and then updating SnowCMS powered sites would be a snap, we don’t want to take the easy way out :-P

Other systems allow you to modify all the files themselves. It can be a little more complicated, but it also poses a threat to users if they were to install malicious modifications. Probably pretty unlikely, but hey! It can happen…

Another way is super easy. Not having one at all. Of course, we wouldn’t do that. We have come to a unanimous decision to have file based editing for the modification system. Oh, and did I mention modifications are referred to as ‘flakes’?

Mod security
As I mentioned about allowing people to modify the sources of the system can be dangerous. So how are we as developers going to combat that?

Pretty simple, well, at least simple in concept. What will happen is people will be able to submit modifications to our site (Eventually we will have a modifications database, of course!) and once the team has reviewed it (Either developers, or maybe a modification team) and approved the modification to be done well and doesn’t do anything bad, the file will have its hash taken (SHA-1, most likely) and stored in a publically accessible way (In a database and can have the data retrieved). Now once the modification is uploaded to your site, and once your about to install it, your system will hash the file and send it off to SnowCMS.com. We (well, the server…) will then take that hash and check to see if it exists and is approved in our database. If it is, you will see a message saying the modification is safe and has been approved by the SnowCMS team.

A pretty good idea. Because if that modification which you uploaded to your site was changed in any way, it won’t be in our database. Simple, but darn effective =P.

Updating
Since SnowCMS will feature a modification (flake) system, updating will be pretty straight forward. Once SnowCMS goes gold, whenever an update is out (Like 1.0.1) we will have those updates put into a flake package. That way even when you have modifications installed, you should be able to update pretty easily with little to no errors. But of course, in the beta and RC stage, you will not be able to update via this system due to the major amount of code changes that will occur. Sorry!

BBCode
Like I talked about in previous posts, I certainly hope by either public beta release or when 1.0 goes gold, we will have the new BBCode parser complete. Still working on it.

Well, a lot of information about SnowCMS v1.0. Until next time, see ya! XD.

, , , , , ,

No Comments

Topic posting complete

Today I worked quite a bit, and I finally got topic posting completed and working without errors :D Still no replying or editing done yet, but I am working on it!

And about the BBCode, I still haven’t completely finished it, but it is almost there XD.

, , , , , ,

No Comments

Update on the BBCode parser

Last night I posted about me beginning the creation of a brand new BBCode parser which had the potential of allowing nested tags… Of course it has been done :-P But I myself haven’t done it, until now!

 

After working on the new function for hours (And adding ~320 more lines of code) I am getting really close to finishing the new product which allows nested tags! XD.  I have yet to test how fast it is because it isn’t fully finished, but it is getting there! However, I am quite sure it will be much faster than the older one because it just used regex to find tags on the message, one after another, and regex on a huge message isn’t that fast.

 

I hope to finish this tomorrow! As long as I don’t run into any major problems.

, , ,

No Comments

New BBCode parser?

I was working on SnowCMS (Yeah, I am back again :-P ), and I started to become super annoyed that the same BBCode tags cannot be nested within one another. So in just a couple minutes, I tried to figure out a way to get those to work. I tried doing something like this before, but for the life of me, I couldn’t get it!

 

Not to long ago I began pondering how I could approach this problem, and how other systems do it. I then thought, XML! I remembered that in PHP using XML Parser it parses the XML file into levels with by tags, and that is how I am approaching it :-)

 

I already have a very very very (Did I say very?) rough prototype, only ~32 lines of code, the function parses this string:

[b]Hello there![/b] [i]Why? [color=red]CAUSE![/color][/i]

Into:

Array
(
    [1] => [b]
    [2] => Hello there!
    [3] => [/b]
    [4] => 
    [5] => [i]
    [6] => Why?
    [7] => [color=red]
    [8] => CAUSE!
    [9] => [/color]
    [11] => [/i]
)

Right now it isn’t parsed very pretty like :-P But for the time being, it works for the most part! I can’t wait to dig deeper into this idea tomorrow… Seeya for now! (It is 12:15AM at the time I am posting this, Lol)

, , ,

No Comments