[PHP] WindPHP: "Whistler" [R26]
Hello, everyone. I've had a little project in development for quite some time now, and only now have I decided to post a project listing, because I feel it's starting to mature.
What is WindPHP?
Cliche, much, but I'll bite. WindPHP is an advanced content management system (etc.) written from scratch with small features that would have turned out the same, anyways, ripped from PHPRetro. It's in its baby stages of development but a lot of progress has been made thus far, and I feel good things to come from this project.
Why a v26 CMS? Don't we have enough CMSs? Shockwave is dead, anyways.
I chose V26 because I realized that only the PHPRetro edits by ePixel work straight out-of-the-box. Even then, the CMS's are ridden with undefined variable notices, PHP warnings, and deprecated functions. If we can build something 10x as secure and much smarter than any of the others, maybe Shockwave has a fighting chance.
What makes it spectacular?
I fused retro (pun intended) looks with sleek, speedy code from what PHPRetro would call the future, as well as functionality with HoloEmu. WindPHP is intended to be completely cross-compatible with PHPRetro AND the HoloEmu database.
What makes you think this will help Shockwave?
Hopefully it will make people realize how much more fun it is :closedeyes:
Specs:
- MySQLi Engine
- Template System
- User System
- Ban System
- Login
- Register
- Housekeeping
- Groups and Homes
Build 4024 Whistler/"Dilla-J"
GitHub: https://github.com/hqkirkland/WindPHP
Test site: [Removed for DDoS protection. Sad that the community turned out this way but I can't take risks like that.]
Debuting alongside the project, hopefully, will be an edit of the emulator that Force was built from, written by one of their programmers. Not sure if this will fall through but I'm really rooting for it.
Credits:
Meth0d for designing HoloCMS
Yifan Lu for designing PHPRetro FROM HoloCMS which, in turn, helped me by teaching me how the site works and for designing various systems which I would base mine from.
UberCMS for tab functions and various ideas.
Azaidi/Amir Zaidi for giving me the JS to make bodies dynamic in each page without obstructing the tabs or the page :)
If I can be honest, this is only a small contribution to the project. Not to understate their work, of course, but most of the labor is done by me. Nonetheless, I bow before their statues :closedeyes:
Re: [PHP] WindPHP: "Whistler" [R26]
Aah nice try and good luck with it.
The first file I opened.
https://github.com/hqkirkland/WindPH...class.page.php
Please, dont use globals it looks sloppy and you set a not defined variable ($this->mysqli).
Also, I see you use namespaces. Make a good use of them and use a autoloader it's worth it.
If you like, I could show you some of my latest work, which has some nice features.
I'm open to awnser some questions.
Goodluck with it!
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Joopie
Aah nice try and good luck with it.
The first file I opened.
https://github.com/hqkirkland/WindPH...class.page.php
Please, dont use globals it looks sloppy and you set a not defined variable ($this->mysqli).
Also, I see you use namespaces. Make a good use of them and use a autoloader it's worth it.
If you like, I could show you some of my latest work, which has some nice features.
I'm open to awnser some questions.
Goodluck with it!
Sigh, I know I'm not supposed to use globals :(
I tried everything to work with the scope before I finally just decided that it was ok to cheat this one time, and worth it. As for that autoload, I'm going to implement it soon. :)
Notice: Only a week in, I've run into a problem. Since PHPRetro doesn't work well, and there are no longer R26 retros around, I no longer have access to the old HTML necessary without having to make major edits to the individual pages of PHPRetro. That's inefficient half the time, as I've learned.
Re: [PHP] WindPHP: "Whistler" [R26]
I'm pretty sure this will not get used when completed but I hope you complete it, by the way; don't use percentages for how far completed everything is in the bullet point list. Colour code it instead, much easier and not retarded ;)
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
ησвяαιη
I'm pretty sure this will not get used when completed but I hope you complete it, by the way; don't use percentages for how far completed everything is in the bullet point list. Colour code it instead, much easier and not retarded ;)
I work better with numbers. As I was writing them I thought "God I'm going to look like a fucking noob :L"
But I made the switch. Only for you <3
Can someone review my registration code? ($user->insertUser(); and register.php) It's basically stating that $_POST["bean.(x)"] variables aren't being sent when I do an if-else to check if they're set.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
I work better with numbers. As I was writing them I thought "God I'm going to look like a fucking noob :L"
But I made the switch. Only for you <3
Can someone review my registration code? ($user->insertUser(); and register.php) It's basically stating that $_POST["bean.(x)"] variables aren't being sent when I do an if-else to check if they're set.
Try var_dump(); for debugging instead of echo ing them?
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
The General
Try var_dump(); for debugging instead of echo ing them?
Thanks. Going to try this.
===
Stupid me. I was using ["bean.(x)"], instead of ["bean_(x)"]
Register working. Sending new commit 8)
Re: [PHP] WindPHP: "Whistler" [R26]
I've decided not to code Habbo club. Instead, it will simply be a default feature.
I never understood why we bothered not doing this in the first place? It's one of those things that, basically instigated the creation of retros. We built them partly to circumvent paying for Habbo club.
So whats the point of asking a user to waste credits on buying it? If someone gives me a good reason I'll be happy to program it in but for now I'm questioning the whole community's practice of it.
Re: [PHP] WindPHP: "Whistler" [R26]
I've always had a thing for v26 CMS's :')
Good luck with your project. Can't wait to see groups and homes!
Re: [PHP] WindPHP: "Whistler" [R26]
The current hold-up on development is the 'me' page. It's rather dynamic and I'm essentially having to work through PHPRetro's old code manually.
Re: [PHP] WindPHP: "Whistler" [R26]
Finally finished the club function (I think..)
I'd love it if someone could proofread my code :)
Re: [PHP] WindPHP: "Whistler" [R26]
Just a tip.. if you're gonna be writing OO MySQLi, then use OO fully not a mix of procedural and OO.
eg you have
PHP Code:
$system = mysqli_fetch_array($mysqli->query("SELECT * FROM system"));
when it should be
PHP Code:
if($getsystem = $mysqli->query("SELECT * FROM system")) { while($data = $getsystem->fetch_array()) { $name = $data[0]; } }
Row 0 being the name of the site. You could also do a fetch_assoc() and can use $data["name"] instead of row count.
- - - Updated - - -
Oh &...
PHP Code:
if(!file_exists("C:/inetpub/wwwroot/system/pages/" . $tplId . ".pop")) {
return "Stop messing around and get back to the hotel :@";
}
What if i dont have it installed to C:\? You can use ./pages/tplname.pop as class.page is in system.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
Just a tip.. if you're gonna be writing OO MySQLi, then use OO fully not a mix of procedural and OO.
eg you have
PHP Code:
$system = mysqli_fetch_array($mysqli->query("SELECT * FROM system"));
when it should be
PHP Code:
if($getsystem = $mysqli->query("SELECT * FROM system")) { while($data = $getsystem->fetch_array()) { $name = $data[0]; } }
Row 0 being the name of the site. You could also do a fetch_assoc() and can use $data["name"] instead of row count.
- - - Updated - - -
Oh &...
PHP Code:
if(!file_exists("C:/inetpub/wwwroot/system/pages/" . $tplId . ".pop")) {
return "Stop messing around and get back to the hotel :@";
}
What if i dont have it installed to C:\? You can use ./pages/tplname.pop as class.page is in system.
It's easier to debug when I write out the full path, that way it will show the full path where the error is being caused.
As for the OO MySQLi tip, $mysqli->fetch_array() started to be an invalid function, for some reason. I couldn't figure out why, so I figured in the interest of time, it's just more efficient if I mix PDO in with it.
Sometimes $mysqli->fetch_array works, other times it says it's an undefined function. I don't know why.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
It's easier to debug when I write out the full path, that way it will show the full path where the error is being caused.
As for the OO MySQLi tip, $mysqli->fetch_array() started to be an invalid function, for some reason. I couldn't figure out why, so I figured in the interest of time, it's just more efficient if I mix PDO in with it.
Sometimes $mysqli->fetch_array works, other times it says it's an undefined function. I don't know why.
PHP Code:
if(!file_exists("./pages/" . $tplId . ".pop")) { die("no such template: " . $tplId); }
seems much easier to me, tells you the tpl having the problemo.
If fetch_array or assoc comes up as invalid, then your query has failed. As for mixing PDO with MySQLi, you're going to create 2 different connections? As far as I know, unless you're gonna do that, then you can only use one or the other.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
PHP Code:
if(!file_exists("./pages/" . $tplId . ".pop")) { die("no such template: " . $tplId); }
seems much easier to me, tells you the tpl having the problemo.
If fetch_array or assoc comes up as invalid, then your query has failed. As for mixing PDO with MySQLi, you're going to create 2 different connections? As far as I know, unless you're gonna do that, then you can only use one or the other.
No it seems to work as long as you don't use mysqli_query. When you fetch an array, associative or not, it's an "offline" function. Same with mysqli_real_escape_string. They just change the datatypes of the already-defined results or inputs.