Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP, MySQLi] BoostCMS 2.0 ~ The return of Packages!

☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
Guys, this isn't another phpretro. Don't expect it to be plug-n-play. To use this you'll have to know at least some code and be able to read error messages.

Anyway, I want to comment on the code. There are a few things I'm not a fan of; many rewritten functions that is in the php library already, some parts are extremely messy, the wrong usage of capitalization, how the config has been handled, how the "library" is being loaded. Those things are what i'm personally not a fan of, that does not make it bad code, just what I personally wouldn't have done if I was the developer.

Cons:
Rewriting PHP functions:
Why waste the RAM, CPU which equals execution time in production mode, and time in development mode when what you're doing is already included in the PHP library? The config parser for instance. Why cant you just use parse_ini_file() or json_decode() instead of handling it with a custom parser?

How the "library" is loaded:
Why get all the books from your local library if you're just going to use one of them for your science project at school? You are just going to use the ones that are necessary so why bother carrying them in your bag/backpack home or the place you're staying. What I mean by this; load the classes that you KNOW you need, then load the rest as there is need for them. This way you're going to save specs and execution time.

How the config has been handled:
Same thing as the library. Why bother carrying around your books if you're not going to use them. If you absolutely want to, at least get them from a sql query or cache the results instead of opening and reading 10 files on each web request.


Pros:
Static classes:
Absolutely amazing that you've chosen to build this upon static classes! Static classes are something that occurs once. In this script all classes are only used once. I personally prefer instances due to how messy static classes can get sometimes, but this is the right way.

Framework:
What you've made is actually a framework for Habbo retros, all actions happens inside already written classes. This makes it so much easier for others to work with it and for newbies to learn. People can for example do Users::Add('ZenLulz', 'zenlulz@ragezone.com', 'password', 'M') instead of preparing a sql statement, writing the query, executing the query, closing it and so on. That often makes up to 10-20 lines of extra code which is absolutely a waste of time and makes the code look ugly. You've just made the life for developers so much easier (if they just have the brain to use this).

Template system and routing:
Beautiful, can't say anything else.


Now! You're probably not going to be bothered to read all of this. I recommend doing it though, you might learn something
:fanny:
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
Can i use this for Plus?
Great that want to work on this as its definitely worth it. Of course you may use this for whatever future project you're planing, its publicly released. But no one likes renames so make sure you edit it enough to call it "Plus" or whatever
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
I mean Plus Emulator...
Ahh.. forgive me for my lack of brain cells. However, if it does not you can just edit the queries. Easier said than done.
 
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
Anyone got a solution for this pls?

Notice: Undefined index: mysql.localhost in D:\xampp\htdocs\Boost\Library\MySql.php on line 11

Notice: Undefined index: mysql.root in D:\xampp\htdocs\Boost\Library\MySql.php on line 11

Notice: Undefined index: mysql.xxxxxx in D:\xampp\htdocs\Boost\Library\MySql.php on line 11

Notice: Undefined index: mysql.phoenix in D:\xampp\htdocs\Boost\Library\MySql.php on line 11

Fatal error: Call to a member function fetch_assoc() on a non-object in D:\xampp\htdocs\Boost\Packages\Extension_Staff\Maps.php on line 7

I think something went wrong with the Configuration Parsing. Can you clear the directory /Boost/Cache/ and retry?



Really well done, I'm happy for you azaidi that your skills have improved so much and that you're this skilled at such a young age! :) Keep up the good work and make sure to keep a change log and any information you can. With the info you can start building yourself a portfolio for the future if you should decide to go professional.

I won't be using this right now because I've already edited UberCMS to my liking. However if I'm unsuccessful with my beginner/amatuer PHP skills to install homes and groups the way I would like, then I will consider slapping my styling onto Boost.

Thanks for this and keep up the good work with supporting people and releasing your projects!

Thanks :):



Guys, this isn't another phpretro. Don't expect it to be plug-n-play. To use this you'll have to know at least some code and be able to read error messages.

Anyway, I want to comment on the code. There are a few things I'm not a fan of; many rewritten functions that is in the php library already, some parts are extremely messy, the wrong usage of capitalization, how the config has been handled, how the "library" is being loaded. Those things are what i'm personally not a fan of, that does not make it bad code, just what I personally wouldn't have done if I was the developer.

Cons:
Rewriting PHP functions:
Why waste the RAM, CPU which equals execution time in production mode, and time in development mode when what you're doing is already included in the PHP library? The config parser for instance. Why cant you just use parse_ini_file() or json_decode() instead of handling it with a custom parser?

How the "library" is loaded:
Why get all the books from your local library if you're just going to use one of them for your science project at school? You are just going to use the ones that are necessary so why bother carrying them in your bag/backpack home or the place you're staying. What I mean by this; load the classes that you KNOW you need, then load the rest as there is need for them. This way you're going to save specs and execution time.

How the config has been handled:
Same thing as the library. Why bother carrying around your books if you're not going to use them. If you absolutely want to, at least get them from a sql query or cache the results instead of opening and reading 10 files on each web request.


Pros:
Static classes:
Absolutely amazing that you've chosen to build this upon static classes! Static classes are something that occurs once. In this script all classes are only used once. I personally prefer instances due to how messy static classes can get sometimes, but this is the right way.

Framework:
What you've made is actually a framework for Habbo retros, all actions happens inside already written classes. This makes it so much easier for others to work with it and for newbies to learn. People can for example do Users::Add('ZenLulz', 'zenlulz@ragezone.com', 'password', 'M') instead of preparing a sql statement, writing the query, executing the query, closing it and so on. That often makes up to 10-20 lines of extra code which is absolutely a waste of time and makes the code look ugly. You've just made the life for developers so much easier (if they just have the brain to use this).

Template system and routing:
Beautiful, can't say anything else.


Now! You're probably not going to be bothered to read all of this. I recommend doing it though, you might learn something
:fanny:

I did read all of this and I like the fact you're atleast giving me useful feedback. Does php_parse_ini have a cacher though? I liked my Config parser because of the cached php files it makes, if php_parse_ini does that internally I might switch. Also for the Library, I don't think there's one class I'm not using every page. I could organise them differently so I can leave out some parts of the Users class but ATM I need all of them every page.



Can i use this for Plus?

You'll need to Enable the R63B Package if it uses the sso_ticket table in the Database, if not you can just use the swfs (Plus is new crypto right?). I've heard some people got bugs with R63B, if you do you have to put all swfs in /swfs/ so no files get redirected to index.php.

--

Enjoy Boost :):
 
Experienced Elementalist
Joined
Jul 31, 2008
Messages
289
Reaction score
22
No help on my error? :/
maybe i am missing some php functions? could you tell me which are needed? :)
 
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
No help on my error? :/
maybe i am missing some php functions? could you tell me which are needed? :)

Wait, are you using a subDOMAIN or subURL? If you're using a SubURL you'll have to use this fix:
Open Boost/Library/Request.php

Before $Split = explode('?', trim(l$Url, '/'), 2);
Add
$Url = substr($Url, 9999); <- Replace 9999 by your SubURL Length + 1 so if it's in /boost/ make it 6

Then retry :):
 
Experienced Elementalist
Joined
Jul 31, 2008
Messages
289
Reaction score
22
its on site2.domain.com in the wwwroot folder
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
I did read all of this and I like the fact you're atleast giving me useful feedback. Does php_parse_ini have a cacher though? I liked my Config parser because of the cached php files it makes, if php_parse_ini does that internally I might switch. Also for the Library, I don't think there's one class I'm not using every page. I could organise them differently so I can leave out some parts of the Users class but ATM I need all of them every page.
I dont think it has an in-built cacher. But PHP uses it to parse their php.ini so there shouldn't be any performance issues.

Btw, have you looked into APC or memcached?
 
The one and only!
Loyal Member
Joined
Nov 24, 2008
Messages
2,529
Reaction score
1,435
I know what APC and memcached are but I don't use them because not everyone has them installed/knows how to install them.
That's not your problem. As a developer you should strive to make the absolute best that you can and there's plenty of tutorials on installing APC/memcached.
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
Just asking, doesn't PHP have any functions built-in to access RAM and/or store variables in a RAM Cache?
No, that is what we have extensions for! XCache, APC, WinCache, Memcached etc. makes us able to. I recommend using XCache if you're just going to use it in your web application. But what would really have been leet is to use memcached synced between your emulator and web application.
 
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
No, that is what we have extensions for! XCache, APC, WinCache, Memcached etc. makes us able to. I recommend using XCache if you're just going to use it in your web application. But what would really have been leet is to use memcached synced between your emulator and web application.

We should use ASP.NET to sync the webserver with the emulator, the question is how hard it's going to be :?:
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
It's easier to talk between .NET languages, and ASP.NET is already made for webpages. Using memcached from C# is probably a hard task, and I've been thinking about making a synchronised website/client for a long time now, I just have no idea how to start.
I'm talking about a shared cache, not to actually connect them. They serve two different tasks, with the same database. That's it.
 
Back
Top