Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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?
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Kristophers
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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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:
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Papercup
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.
Re: [PHP] WindPHP: "Whistler" [R26]
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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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);
}
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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 shit... 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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
You need to bind the query to an object so you can access the fetch_array and shit... 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 :@, 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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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 :@, 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 shit 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.
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
Jonteh
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 shit 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
Re: [PHP] WindPHP: "Whistler" [R26]
Quote:
Originally Posted by
FullmetalPride
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
Re: [PHP] WindPHP: "Whistler" [R26]
Go Object-Orientated as it will help you also learn the basics which are used in a lot of programming and scripting languages.