-
[PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
It's been a while since I coded something usefull for the Habbo section. Some people might've already downloaded my beta releases in the releases section, but you couldn't really do much with it.
What is QuickTPL?
It's a CMS/Framework with a multi-tpl system etc in it made for Habbo Retros. It's sorta like Frost 3.0, but I'm coding it from scratch and I think it may have a new name.
Why QuickTPL?
It's fast (5ms per page with mysql pconnect), has cron jobs, easy to code pages for with the use of my handler scripts:
articles.php
PHP Code:
<body id="news">
<?php $this->inc('head'); ?>
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix default ">
<h2 class="title">Articles</h2>
<div id="article-archive">
<h2>Latest articles</h2>
<ul>
{newsList}
</ul>
</div>
</div>
</div>
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper">
<h2>{newsTitle}</h2>
<div class="article-meta">Posted by {newsAuthor}</div>
<p class="summary">{newsShortstory}</p>
<div class="article-body">
{newsLongstory}<br/><br/>
</div>
</div>
</div>
</div>
</div>
</div><div id="footer"><?php $this->inc('footer'); ?></div></div></div>
It has auto CSS & JS scripts just like RevCMS so you don't need to put your CSS links on top of every page.
Screenshots?
I'll make them today, look at my site:
Hablow.nl
Login with name: 'Admin', pass: 'admin' to see the housekeeping.
I've almost completed QuickTPL, I just need to finish the housekeeping functions and CSS.
QuickTPL/Configuration.php
PHP Code:
<?php
if(!defined('Start')) exit('403');
class Config {
## Your QuickTPL basic settings
static $name = 'Hablow';
static $style = 'habbo';
## Your default 'Page Not Found' file
static $errorfile = 'error';
## These are your MySQL Connect Settings
static $DB = Array(
'hostname' => 'p:127.0.0.1',
'loginname' => 'root',
'password' => 'admin',
'database' => 'quicktpl',
);
static $hk_rank = Array(
'basics' => 3,
'news' => 4,
'bans' => 5,
'users' => 6,
'ranks' => 6,
'site' => 7
);
## The time your login-cookies will stay valid
static $cookie_time = 216000;
## Your password hash
static $hash_function = 'md5(sha1($input))';
## This is for hard-blocking any ip (For DoSers)
static $blocked_ips = Array(
'someip',
'anotherip',
'thirdip',
'moreips',
'etc'
);
## Your twitter account
static $twitter = '_AmirZ_';
}
?>
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Nice. Good luck.
Edit: Your Demo/Test site is offline atm :S
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Very nice development, AmirZ. I loved the other versions of QuickTPL, but this one will be even better!
Good luck!
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Finished some new pages in the housekeeping, I'm open for suggestions (small widgets etc)
Edit: Started on safety. I need someone to make some good texts for me, otherwise I'm going to rip them from Habbo.
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
So, this is a framework? Meaning, we can build our projects on this? Anyhow, holy santa shit. This loads fast.
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Your test website is down again. Looking forward to this release and can't wait to check out those speeds :)
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
It's up again.
- Made a simple /home/name script
- Made a simple change password
- Made a 'password forgot' script for staff in HK
{
It will make the password of that user empty. The user can login without password, then change it in profile. He can't enter the client without changing his password.
}
- Made a /feedback & /help (FAQ) page
- Made a /safety page
Speed of /safety:
<!--QuickTPL Loaded in 0.0059947967529297 seconds-->
Speed measure works like this:
First thing on QuickTPL.php is define('Start', microtime(true));
Last thing is $TPL->Output('<!--QuickTPL Loaded in '.(microtime(true) - Start).' seconds-->');
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Fuck your password forgot system.
What if I enter his/her details and say i forgot it?!
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
No it's not that. I mean only staff with the rank you choose can go in the housekeeping and reset the password to empty (I mean nothing). You have to contact the staff by sending a mail or using the feedback function on another account in the CMS.
Then the user can login without a password. But he/she has to change it before entering the client.
- Added look in /manage/users
- Added staff list in /manage/users
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
azaidi
No it's not that. I mean only staff with the rank you choose can go in the housekeeping and reset the password to empty (I mean nothing). You have to contact the staff by sending a mail or using the feedback function on another account in the CMS.
Then the user can login without a password. But he/she has to change it before entering the client.
- Added look in /manage/users
- Added staff list in /manage/users
I know you mean it good. but that means every idiot can email the staff to reset "their" password.
Wouldn't be better to send a mail with a url to reset their password instead?
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
joopie
I know you mean it good. but that means every idiot can email the staff to reset "their" password.
Wouldn't be better to send a mail with a url to reset their password instead?
Most people don't know how to set up a mail server..
- Added Register IP + Last IP in /manage/users
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
azaidi
Most people don't know how to set up a mail server..
- Added Register IP + Last IP in /manage/users
They don't have to. You can use the Windows Live servers, and I would recommend checking out BrickPHP (by joopie) to see how it's done :)
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
Hejula
They don't have to. You can use the Windows Live servers, and I would recommend checking out BrickPHP (by joopie) to see how it's done :)
I might code it as a plugin later.
By the way I've put back the account 'Admin' (pass 'admin') so people can see the Housekeeping again :)
- Made some minor changes in the user class
- Made some minor changes to the cache class
New demo link from someone testing my CMS: www.minesam.de
(He doesn't want you to register so I made a hotel password script)
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
azaidi
Most people don't know how to set up a mail server
Most people dont know, you dont need your own mail server..
I think that is what you mean :)
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Made a lot of changes to System.php and class_site.php
- Made some minor changes to class_template.php and class_includes.php
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Small speed decrease due to improvements in stability (Don't worry, just 4ms added)
- Added extra things in Configuration.php
- Edited layout of System.php
- Made some small changes to the housekeeping & client
Housekeeping is now ca 6ms :lol:
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Checked out the Demo site.
Great work. Keep it up.
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Made a lot of changes to class_user.php (Session, cookie and get data)
- Added a min staff rank to not get banned with a ban
- Added $DB->Select(SELECT $fields FROM $table WHERE $key = '$value')
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Edited /home/X a lot (Made it more habboish)
- Fixed the motto bug where it could be more than 32 chars
- Fixed the capital/non capital username bug
- Fixed the register bug on new databases
It is release-able now.
Btw extra demo: Subba.hablow.nl (From my friend)
Newest updates on: Hablow.nl
System.php snippet:
http://www5.picturepush.com/photo/a/...us/Knipsel.png
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Fixed a bug with the client
- Quickly made a /credits and /credits/pixels (Didn't add them to the header because I don't like them)
- Fixed a bug in /manage/client about the motd with \r\n
Shall I release it tomorrow or 1 januari?
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
- Only shortstory in the big news widget
- /manage/users now shows the latest 10 registered accounts
I can't get the wordfilter to work, but everything in the database is correct..
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
azaidi
- Only shortstory in the big news widget
- /manage/users now shows the latest 10 registered accounts
I can't get the wordfilter to work, but everything in the database is correct..
How do you use wordfilter?
If you use string replace (str_ireplace) make sure you define the new text.
Like this:
PHP Code:
$lol = 'boobs';
$body = 'hello I like boobs';
$body = str_ireplace($lol, '******', $body);
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Nice job AmirZ, Can't wait until it's released ;) Good luck on your project and getting the word filter to work.
-
Re: [PHP, MySQLi, OOP] QuickTPL 1.0 - New Year Release
Quote:
Originally Posted by
Tha
How do you use wordfilter?
If you use string replace (str_ireplace) make sure you define the new text.
Like this:
PHP Code:
$lol = 'boobs';
$body = 'hello I like boobs';
$body = str_ireplace($lol, '******', $body);
Nah I just mean it the noob way, I'm using Phoenix with it by the way (Might release a butterfly compatible user class)
When I insert the values into the database phoenix doesn't filter them (Probably because of my crack)