• 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.

[PHP] WindPHP: "Whistler" [R26]

Status
Not open for further replies.
Junior Spellweaver
Joined
Dec 31, 2013
Messages
198
Reaction score
25
BG working. Next I'm going to work on the tabs and stuff. Making the header dynamic right now.
Plan to make hot groups and tags? I know a bit of people who use them and hot groups was always a good perm on phpretro. Also plan to make tabs editable via db then later HK? Also uber had badge desc and name editor plan to ever use that?
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Plan to make hot groups and tags? I know a bit of people who use them and hot groups was always a good perm on phpretro. Also plan to make tabs editable via db then later HK? Also uber had badge desc and name editor plan to ever use that?

Love the badge desc idea, hope for groups in second release if not first, not making tabs editable via hk for now, but probably db yes.
 
Web Developer
Loyal Member
Joined
Nov 5, 2009
Messages
1,229
Reaction score
309
BG working. Next I'm going to work on the tabs and stuff. Making the header dynamic right now.

Sorry, What kind of development is this? You're struggling to add an background :ehh:
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Sorry, What kind of development is this? You're struggling to add an background :ehh:

I really don't appreciate that "m8".


I didn't struggle at all. The issue was that some idiot decided to change the background on the style page, so I went ahead and removed the background-color.

The reason I mentioned it was because it wasn't a priority while I was programming the me page.
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Made tabs editable by database, I stole Uber's system, mostly only because I'd consider it to be one of the better-written and easily-understood of them. Plus, I'm used to that one, and the HTML included is backwards-compatible..as is most of it..

I also wrote news articles page in like 20 minutes. Going to add news comments eventually, but I know how much of a hassle they are, what with exploits and XSS injections, so it may be delayed.

Anyways, once I get the client working tomorrow, this CMS is officially declared ready-for-use. It's not very fun yet, but if you want a lightweight, super-simple CMS, this is your dream come true.


I realized too that I have to mix OOP and Procedural syntax when it comes to MySQLi for simplicity.

$mysqli->fetch_array doesn't work for me, as you have to do $result->fetch_array. So, basically, I'd have to define a variable as the output for query, and THEN fetch an array on it. I can't just do $mysqli->fetch_array($mysqli->query("SELECT * FROM people WHERE likes_mysqli_syntax = '0'")));

If anyone has a solution I'd be more than happy to implement it if you prefer OOP syntax for MySQLi.
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
Made tabs editable by database, I stole Uber's system, mostly only because I'd consider it to be one of the better-written and easily-understood of them. Plus, I'm used to that one, and the HTML included is backwards-compatible..as is most of it..

I also wrote news articles page in like 20 minutes. Going to add news comments eventually, but I know how much of a hassle they are, what with exploits and XSS injections, so it may be delayed.

Anyways, once I get the client working tomorrow, this CMS is officially declared ready-for-use. It's not very fun yet, but if you want a lightweight, super-simple CMS, this is your dream come true.


I realized too that I have to mix OOP and Procedural syntax when it comes to MySQLi for simplicity.

$mysqli->fetch_array doesn't work for me, as you have to do $result->fetch_array. So, basically, I'd have to define a variable as the output for query, and THEN fetch an array on it. I can't just do $mysqli->fetch_array($mysqli->query("SELECT * FROM people WHERE likes_mysqli_syntax = '0'")));

If anyone has a solution I'd be more than happy to implement it if you prefer OOP syntax for MySQLi.

If $mysqli->fetch_array doesn't work, then you're doing something wrong.
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
If $mysqli->fetch_array doesn't work, then you're doing something wrong.

You've said that, but I'm not sure anything is wrong.

Also, $mysqli->num_rows doesn't work, neither does $mysqli->result etc.


I don't think I'm doing anything wrong, unless it will throw errors if the query returns a blank resultset, which I doubt it would, yet the problem persists.
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
You've said that, but I'm not sure anything is wrong.

Also, $mysqli->num_rows doesn't work, neither does $mysqli->result etc.


I don't think I'm doing anything wrong, unless it will throw errors if the query returns a blank resultset, which I doubt it would, yet the problem persists.

Things don't just not work in PHP for no good reason.

Code:
if ($query = $db->query("do query")) {
while($data = $query->fetch_assoc()) {
 $var = $data['var'];
  }
}
else {
die($db->error);
}
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Things don't just not work in PHP for no good reason.

Code:
if ($query = $db->query("do query")) {
while($data = $query->fetch_assoc()) {
 $var = $data['var'];
  }
}
else {
die($db->error);
}

You're right but you see, you're using $query->fetch_array. I don't want to have to do that. I want to fetch an array without having to define a query's result in a variable separately. I don't like having to do that.

Also, I can understand how it may be advantageous in certain uses or paradigms, but why use, in effect, a result object as a class with individual functions. It doesn't make much sense to me to do it that way.
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
You're right but you see, you're using $query->fetch_array. I don't want to have to do that. I want to fetch an array without having to define a query in a variable separately. I don't like having to do that.

Also, I can understand how it may be advantageous in certain uses or paradigms, but why use, in effect, a result object as a class with individual functions. It doesn't make much sense to me to do it that way.

You need to bind the query to an object so you can access the fetch_array and poop... you can't do it OOP any other way. There is no such thing as $mysqli->fetch_array($object).. you HAVE to set $db->query to a $var.
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
You need to bind the query to an object so you can access the fetch_array and poop... you can't do it OOP any other way. There is no such thing as $mysqli->fetch_array($object).. you HAVE to set $db->query to a $var.

Ah, I understand.

I don't like that system though. Maybe if it really becomes a problem I'll use it, like if PHP had the insanity to go strictly-OOP, which I doubt they will because I hate their syntax for OOP :mad:, I'll make the switch.

For now, mixed methods aren't too much of a problem for me, personally.


Still learning about this autoload function though, and going to get it to work. Making git commit->push then off to bed.
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
Ah, I understand.

I don't like that system though. Maybe if it really becomes a problem I'll use it, like if PHP had the insanity to go strictly-OOP, which I doubt they will because I hate their syntax for OOP :mad:, I'll make the switch.

For now, mixed methods aren't too much of a problem for me, personally.


Still learning about this autoload function though, and going to get it to work. Making git commit->push then off to bed.

Mixed methods may not be a problem for you, but as you've stated several times you're trying to learn PHP. Why teach yourself poop ways of doing things when you could do it properly and actually advance your skillset.. I'm telling you how to do something the proper way, you could take the advice and use it to fix up your procedural code and actually make something of this project lol..

Choose either OOP or procedural, a mix of both is bad practice, damn.
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Mixed methods may not be a problem for you, but as you've stated several times you're trying to learn PHP. Why teach yourself poop ways of doing things when you could do it properly and actually advance your skillset.. I'm telling you how to do something the proper way, you could take the advice and use it to fix up your procedural code and actually make something of this project lol..

Choose either OOP or procedural, a mix of both is bad practice, damn.

I know, and you're right, but best practices don't concern me at the moment, because as many people have stated in threads about 'retro problems', people tend to focus on the efficiency, so I just thought I'd try and make a change in that dept.

Maybe I'll wake up with more energy tomorrow, and make the change. Thanks m8
 
Joined
Apr 30, 2007
Messages
2,339
Reaction score
1,547
I know, and you're right, but best practices don't concern me at the moment, because as many people have stated in threads about 'retro problems', people tend to focus on the efficiency, so I just thought I'd try and make a change in that dept.

Maybe I'll wake up with more energy tomorrow, and make the change. Thanks m8

Better coding practice += better performance += more efficient
 
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Go Object-Orientated as it will help you also learn the basics which are used in a lot of programming and scripting languages.

What basics?

I know OOP; I write AS3 here and there and I love it. Php OOP's format, I feel, leaves a lot to be desired. Like nicer syntax.


=== Pushing cause I didn't last night :/ ===
 
Last edited:
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
Don't get excited; I said on Github that client works but only because the page loads without erroring, and everything is processed correctly.

However, you can't enter the client. It will give you a Login error upon entering, and the emulator will flag your connection as free.


I got SSO tickets to work tonight. New system gives you a ticket upon login.

I also enhanced the LoginCheck function today, and I've added a variable to the loadPage function. Instead of using a constant, I use a boolean variable to define if you require login. It's not really something I like, but it works better than a constant. Which didn't.
 
Last edited:
Ask me about Daoism
Loyal Member
Joined
Nov 6, 2010
Messages
1,560
Reaction score
393
You can now successfully log into the hotel.

However, you cannot enter rooms. It will disconnect you without an exception.

If you use Cecer's error formatting tool, it'll tell you it's a script_error. Not sure how to fix that ;/

I believe that these errors are due to the fact that the emulators and their corresponding databases have "gathered a lot of dust", relative to Habbo time.

Hopefully the project can continue. Even if I realize that Shockwave is dead for good, I'll still complete it, because there's always at least one person searching for a solution to some problem.
 
Status
Not open for further replies.
Back
Top