• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Peace Hotel CMS (BoltCMS v1)

"(still lacks brains)"
Loyal Member
Joined
Sep 2, 2011
Messages
2,371
Reaction score
1,361
> They are university lecturers.
> Look before posting :)
> Can you tell me what I did wrong, so I can improve? Telling me it's poop without any recommendations is not constructive whatsoever.
> Yes, but Node.JS is realtime. Doing that in PHP would also use more Resource.

When hosted on a live environment, many commented on the speed. I hosted it here for any who wish to click around. It's faster than Rev any day. - Seems perfectly fine for me.

> They should be fired. If they taught you to code like this, they should lose their job and you should scrap everything you've learned in their lessons.
> I cringed so much when looking I decided not to continue because I was in tears of laughter with Marit.
> Everything, literally.
> No, it wouldn't.

It's faster than Rev is it? Yes, this was done after multiple reloads - not on first load.

positivewire - Peace Hotel CMS (BoltCMS v1) - RaGEZONE Forums


I hope to god that in v2 you're not using the same base, please - if you have any common sense - use a framework like CodeIgniter, CakePHP, even Ducking Zend. By the way, if you're using CloudFlare on your website, you haven't correctly configured it - there is no minification on the HTML. You're also not using the minified libraries for the JS.
 
  • Like
Reactions: Geo
Newbie Spellweaver
Joined
Apr 28, 2014
Messages
33
Reaction score
11
> They should be fired. If they taught you to code like this, they should lose their job and you should scrap everything you've learned in their lessons.
> I cringed so much when looking I decided not to continue because I was in tears of laughter with Marit.
> Everything, literally.
> No, it wouldn't.

It's faster than Rev is it? Yes, this was done after multiple reloads - not on first load.

positivewire - Peace Hotel CMS (BoltCMS v1) - RaGEZONE Forums


I hope to god that in v2 you're not using the same base, please - if you have any common sense - use a framework like CodeIgniter, CakePHP, even Ducking Zend. By the way, if you're using CloudFlare on your website, you haven't correctly configured it - there is no minification on the HTML. You're also not using the minified libraries for the JS.

> They only told me about putting every class in the one PHP file.
> I don't care?
> Still not helpful. My posts are being deleted, yet yours are worse and they aren't? And you're supposed to be a Mod? TF? lol
> Can you explain how it'd work in PHP? I'd have jQuery requesting a json response from php every 10 seconds, and alert the user if the php specifies an alert. How would you do it?

And 31.1s? That's got to be shenanigans, either your net is some dodgy poop, or that's not even my site. We're not talking about asset load either, we're talking about PHP speed. The PHP in this renders pages in about 0.002 - 0.005 seconds. The HTML etc is all habbos old stuff, so if that's slow, it's on them (Apart from the unminified jquery, which is an easy change).

I'm not. v2 was totally started again - I'm not using a framework, I prefer to code all it myself without any framework.

In all honesty, the PHP is fast, and would be fine for any hotel. I released this because people wanted it, not to get poop for it. If you're going to respond, be helpful, give me things to improve on. As I said to Chris, don't respond if it's not helping. (My post got deleted tho.. rip). Being a stick doesn't help anyone, and if you get a buzz out of it, then you're sick in the head.



Missing credits for the avatargenerator.
But nice to see that someone is using it. +1
Added your credits :)
 
  • Like
Reactions: pel
"(still lacks brains)"
Loyal Member
Joined
Sep 2, 2011
Messages
2,371
Reaction score
1,361
> They only told me about putting every class in the one PHP file.
> I don't care?
> Still not helpful. My posts are being deleted, yet yours are worse and they aren't? And you're supposed to be a Mod? TF? lol
> Can you explain how it'd work in PHP? I'd have jQuery requesting a json response from php every 10 seconds, and alert the user if the php specifies an alert. How would you do it?

And 31.1s? That's got to be shenanigans, either your net is some dodgy poop, or that's not even my site. We're not talking about asset load either, we're talking about PHP speed. The PHP in this renders pages in about 0.002 - 0.005 seconds. The HTML etc is all habbos old stuff, so if that's slow, it's on them (Apart from the unminified jquery, which is an easy change).

I'm not. v2 was totally started again - I'm not using a framework, I prefer to code all it myself without any framework.

In all honesty, the PHP is fast, and would be fine for any hotel. I released this because people wanted it, not to get poop for it. If you're going to respond, be helpful, give me things to improve on. As I said to Chris, don't respond if it's not helping. (My post got deleted tho.. rip). Being a stick doesn't help anyone, and if you get a buzz out of it, then you're sick in the head.

Look, I'm not trying to personally attack you I'm just giving you brutal criticism and I apologise if I'm coming across as an idiot. I can't see the reason as to why you posts are being deleted (it just says "Thread cleanup"), I don't moderate this section anymore so I can't see your deleted posts. :p

I swear to you, it's your website information using the Developer Tools in chrome. I just redid it on my laptop and it's at 13.29 seconds for a complete page load and my internet is fine, I do blame most of it to the static files Sulake made (they're awful). As for the code (etc.) here are a few tips;

  • Use a framework, it makes life so much easier and in professional environments they use frameworks just because there's no need to re-invent the wheel.
  • If you're writing a small personal script which you aren't releasing, classes in one file is fine. For public releases use your own custom made (preferably MVC framework) or just use one of the many frameworks available. There's no point re-inventing the wheel. Thus you avoid having 10,000 questions and they can fix it themselves easier.
  • Go absolutely ballistic about security. Even Gooby (Gaby) picked up on a few exploits and she's a trap. ;)
  • Absolutely avoid 'SELECT *' in queries.
  • Keep the HTML mixing with the PHP to a minimum, it was horrendous when I was looking through the code.
  • I also noticed in some places your code consistency was off. You were probably tired while writing it, idk.
  • USE PREPARED STATEMENTS. Cannot stress this enough.
  • I'm not too sure what password hashing you're using but if it's MD5 or SHA1, change it. I recommend using the built in PHP function to handle passwords.
  • CSRF protection is an absolute must. Frameworks can handle this for yoooouuuuu, another benefit there. :)
  • Minify your static files and absolutely make sure they're up to date.
  • As for the database driver (unsure as to what you were originally using), PDO is my personal recommendation.
  • Follow the PSR standard.

There's tons more I could list through but I just don't have the time. From what I can tell as well, the v1 system is no where near fit for a live environment.

I'm being serious about ignoring your lecturers on the store all classes in one file. You may think it's messy to have one class per file but it's a lot easier to manage in terms of code updates and more, version controlling is so much easier as well, on top of that PHP will have to load the entire file into memory (even if it only needs one or two things at that particular time), if you get more developers on this project it will also be difficult for them to get to grips with the system. Which of course could all be fixed if you used a public framework (e.g. CakePHP). :)

I probably got things mixed up in some cases but I'm exhausted from a long day at work so you'll have to excuse me there.
 
Last edited:
Joined
Apr 24, 2013
Messages
1,685
Reaction score
1,132
It doesn't look like you know what you're doing if you can't take pea-brains feedback and just use it to improve. He has given some great advice to improve your code. PHP takes at LEAST 100ms to load ITSELF on a page, so saying it takes 0.002 seconds is shenanigans, that is probably the time it took for the server to handle the request to the specified file.

You know PHP works on top of another programming language right? Every line of code you write, gets translated into that programming language and then translated into bytecode and then executed. This is why PHP needs at least 100ms to load itself. This is also why some people prefer a programming language where you have to compile your code, because it can make your page load in 10ms, since the code is already compiled(duh).

Don't release something and think everybody will just give you compliments, that's not what a forum is for. They might be shitting on you, but because of this you now know that MVC exists and some sqlis in your CMS are patched, which is only positive right? It will improve your programming skills so much if you start thinking object oriented and implement a MVC structure. It will keep your PHP separate from HTML, which makes everything nice and clean.
 
Newbie Spellweaver
Joined
Apr 28, 2014
Messages
33
Reaction score
11
Look, I'm not trying to personally attack you I'm just giving you brutal criticism and I apologise if I'm coming across as an idiot. I can't see the reason as to why you posts are being deleted (it just says "Thread cleanup"), I don't moderate this section anymore so I can't see your deleted posts. :p

I swear to you, it's your website information using the Developer Tools in chrome. I just redid it on my laptop and it's at 13.29 seconds for a complete page load and my internet is fine, I do blame most of it to the static files Sulake made (they're awful). As for the code (etc.) here are a few tips;

  • Use a framework, it makes life so much easier and in professional environments they use frameworks just because there's no need to re-invent the wheel.
  • If you're writing a small personal script which you aren't releasing, classes in one file is fine. For public releases use your own custom made (preferably MVC framework) or just use one of the many frameworks available. There's no point re-inventing the wheel. Thus you avoid having 10,000 questions and they can fix it themselves easier.
  • Go absolutely ballistic about security. Even Gooby (Gaby) picked up on a few exploits and she's a trap. ;)
  • Absolutely avoid 'SELECT *' in queries.
  • Keep the HTML mixing with the PHP to a minimum, it was horrendous when I was looking through the code.
  • I also noticed in some places your code consistency was off. You were probably tired while writing it, idk.
  • USE PREPARED STATEMENTS. Cannot stress this enough.
  • I'm not too sure what password hashing you're using but if it's MD5 or SHA1, change it. I recommend using the built in PHP function to handle passwords.
  • CSRF protection is an absolute must. Frameworks can handle this for yoooouuuuu, another benefit there. :)
  • Minify your static files and absolutely make sure they're up to date.
  • As for the database driver (unsure as to what you were originally using), PDO is my personal recommendation.
  • Follow the PSR standard.

There's tons more I could list through but I just don't have the time. From what I can tell as well, the v1 system is no where near fit for a live environment.

I'm being serious about ignoring your lecturers on the store all classes in one file. You may think it's messy to have one class per file but it's a lot easier to manage in terms of code updates and more, version controlling is so much easier as well, on top of that PHP will have to load the entire file into memory (even if it only needs one or two things at that particular time), if you get more developers on this project it will also be difficult for them to get to grips with the system. Which of course could all be fixed if you used a public framework (e.g. CakePHP). :)

I probably got things mixed up in some cases but I'm exhausted from a long day at work so you'll have to excuse me there.
I've noted this all down, thanks! This is far more helpful haha, much appreciated.

It doesn't look like you know what you're doing if you can't take @pea-brains feedback and just use it to improve. He has given some great advice to improve your code. PHP takes at LEAST 100ms to load ITSELF on a page, so saying it takes 0.002 seconds is shenanigans, that is probably the time it took for the server to handle the request to the specified file.

You know PHP works on top of another programming language right? Every line of code you write, gets translated into that programming language and then translated into bytecode and then executed. This is why PHP needs at least 100ms to load itself. This is also why some people prefer a programming language where you have to compile your code, because it can make your page load in 10ms, since the code is already compiled(duh).

Don't release something and think everybody will just give you compliments, that's not what a forum is for. They might be shitting on you, but because of this you now know that MVC exists and some sqlis in your CMS are patched, which is only positive right? It will improve your programming skills so much if you start thinking object oriented and implement a MVC structure. It will keep your PHP separate from HTML, which makes everything nice and clean.
I knew about MVC, I coded this CMS in a few days, using minimal effort. And ya PHP is interpreted by C++ isn't it? I can't remember where i saw it, but there was a PHP compiler somewhere. That'd be pretty cool.

About getting slated on, that didn't worry me. I took in what was said, it was just Chris's annoying "My this, My that". It was very frustrating :b
 
Joined
Sep 10, 2011
Messages
778
Reaction score
138
I've noted this all down, thanks! This is far more helpful haha, much appreciated.


I knew about MVC, I coded this CMS in a few days, using minimal effort. And ya PHP is interpreted by C++ isn't it? I can't remember where i saw it, but there was a PHP compiler somewhere. That'd be pretty cool.

About getting slated on, that didn't worry me. I took in what was said, it was just Chris's annoying "My this, My that". It was very frustrating :b
What's even worse is hearing it on my own thread when you didn't take the time of day to do this up properly.
 
Newbie Spellweaver
Joined
Apr 28, 2014
Messages
33
Reaction score
11
What's even worse is hearing it on my own thread when you didn't take the time of day to do this up properly.
What exactly did I post on your thread? In all honesty I can't remember.
Of course I didn't, as i've said 10 times now, I released it because people wanted it. No other reason.
 
Joined
Sep 10, 2011
Messages
778
Reaction score
138
What exactly did I post on your thread? In all honesty I can't remember.
Of course I didn't, as i've said 10 times now, I released it because people wanted it. No other reason.
You made remarks saying it was slow, the framework meant I wasn't actually coding and this is a waste and how much faster your website is and how I was a noob.

I would screenshot but Brad was a penis and deleted the posts on it
 
Newbie Spellweaver
Joined
Apr 28, 2014
Messages
33
Reaction score
11
You made remarks saying it was slow, the framework meant I wasn't actually coding and this is a waste and how much faster your website is and how I was a noob.

I would screenshot but Brad was a penis and deleted the posts on it
I highly doubt that :') Are you sure that wasn't jaden?
 
Newbie Spellweaver
Joined
Jan 10, 2016
Messages
43
Reaction score
5
Please help with this problem.
 
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
The layout's horrible but the functions are neat!
Haven't looked into the code though. GL with this
 
Newbie Spellweaver
Joined
Jul 12, 2016
Messages
12
Reaction score
2
Will take a look at this, thanks for the release.
 
Joined
Sep 10, 2011
Messages
778
Reaction score
138
If you think this guy is a competent developer then all the credibility you've been working to accumulate over the past 2 years with your releases and further learning goes right out the window.
Within a day of being a "developer" on his hotel, I learned very quickly he wasn't up to speed on anything nor competent enough lol. Explains why his hotel is lacking versus a website I built within a week
 
Back
Top