View Full Version : HKV3 Previews
Dentafrice
11-07-2009, 01:54 PM
Well, it's not as fancy as Dan's KP.. but I'm just doing it to learn a little bit more, and play around.
Yes it will be released free :P
Some features I have been working on that wasn't in V2, or V1.. or have been improved is now you can select your Timezone, and it is updated throughout the panel.
There is also a better permission system that works off of "features" and "pages". So if you are going to expand the panel.. the code would be:
if(!$user->has_feature("edit_system_settings")) {
$template->four_oh_three(); // 403 error.
}
Just a little something.
http://img.skitch.com/20090711-rmuphxpwaesutph91iccijnx1s.png
http://img.skitch.com/20090711-1sygprr25yqjhtipssqb7msrf4.png
http://img.skitch.com/20090711-cfgf541x9mfqkwffsx4fj2cp9j.png
http://img.skitch.com/20090711-e7ary84drxpj5axxda2qt49tpt.png
Looks amazing as ever Caleb. Cant wait for this release :):)
Jack!
11-07-2009, 01:57 PM
Wow, looks good, i will try to use this when it comes out
Any other screenies?
Dentafrice
11-07-2009, 02:07 PM
Just got started working on it recently, so all the pages aren't really finished.. or have all their features on them but..
http://img.skitch.com/20090711-ey1j2mjjanckka86hmhbewywk.png
http://img.skitch.com/20090711-8eagkhc97ynma4gp1wpqs557jx.png
BoyBetterKnow
11-07-2009, 02:13 PM
Should be fun to look at when you release. Will help me improve my coding ;)
Calvin
11-07-2009, 02:17 PM
Looks good :)
The home part looks quite similar to HK1 :P
Dentafrice
11-07-2009, 02:25 PM
The navigation or the main home content? :P
Jack!
11-07-2009, 02:48 PM
both seem a bit like the old one
Dentafrice
11-07-2009, 02:52 PM
Well the design is going to be the same, because I can't design.. at all :P That's why everything I make looks so crap.
Calvin
11-07-2009, 02:55 PM
The nav
The HK1 design i found quite okay. Just cant find the download for it though :P
Will there be the ability to like customise and add things to it? Cause its a framework like this that could help many of us, including myself improve their skills :) All the best.. looking forward to it!! =D
Dentafrice
11-07-2009, 03:25 PM
Yes, it should be relatively simple for someone to add a feature to it.
Here would be the process:
1. Create a page inside of /pages/ (ex: my_custom_feature.php).
2. Under "Permission Administration", click "Add Feature" and create a feature. (ex: my_custom_feature);
3. At the top of the "my_custom_feature.php" page, add the security code:
<?php if(!defined("SECURITY")) { trigger_error("Security Violation", E_USER_ERROR); } ?>
4. Add the feature checking code on the same page..
<?php if(!$user->has_feature("my_custom_feature")) { $core->redirect("main.php?page=403"); } ?>
Then add all your code under that.
Once you're done, just go to the permission set of your choice, and check the checkbox next to your newly created feature and they will be able to access it (after you add it to the nav of course :) )
Sounds really good! :) Cant wait to try it out!
Dentafrice
11-07-2009, 03:49 PM
http://img.skitch.com/20090711-tc5w7fxtkfyfstkcpmp4s3a21i.png
Dentafrice
11-07-2009, 04:12 PM
Finished DJ says. It's in the "radio class", so to access.. all that is required is:
$radio = $core->factory("radio");
$says = $radio->get_says();
echo "{$says->username} says {$says->message} - {$core->relative_time($says->time)}";
http://img.skitch.com/20090711-gg89pmjqceucdwtenj5776urx9.png
Looks amazing, can't wait for the release.
Dentafrice
11-07-2009, 04:54 PM
Thank you :)
Protege
11-07-2009, 04:56 PM
Well the design is going to be the same, because I can't design.. at all :P That's why everything I make looks so crap.
Caleb, is that BLUE? Let me just wipe my eyes. HOLY **************************************************
Lookin' good.
BoyBetterKnow
11-07-2009, 05:07 PM
How did you do the permissions? Did you have a usergroup table and add a field for each perm ? OR what?
Dentafrice
11-07-2009, 05:11 PM
Caleb, is that BLUE? Let me just wipe my eyes. HOLY **************************************************
Lookin' good.
TIS BLUE.
How did you do the permissions? Did you have a usergroup table and add a field for each perm ? OR what?
I have a perm_set table. In that table, is: id, features, pages, title.
So it would be setup:
id - 1
features: login_while_offline;manage_users;some_other_featur es;
pages:
title: Administrator
Pages is the field for CMS pages.. so if you had a DJ you could have..
id - 2
features: cat_radio;dj_says;requests;
pages: radio_rules;dj_guide;other_stuff;
title: DJ
id - 3
features: edit_server_info;manage_other_stuff;login_while_of fline;
pages: radio_rules;dj_guide;head_dj_guide;
title: Senior DJ
GoldenMerc
11-07-2009, 05:36 PM
Can you have more than one title?
IE being a news reporter and being a DJ?
Dentafrice
11-07-2009, 05:39 PM
No, but there can be custom usergroups setup for combinations like that, with specific permissions for each usergroup.
BoyBetterKnow
11-07-2009, 05:43 PM
TIS BLUE.
I have a perm_set table. In that table, is: id, features, pages, title.
So it would be setup:
id - 1
features: login_while_offline;manage_users;some_other_featur es;
pages:
title: Administrator
Pages is the field for CMS pages.. so if you had a DJ you could have..
id - 2
features: cat_radio;dj_says;requests;
pages: radio_rules;dj_guide;other_stuff;
title: DJ
id - 3
features: edit_server_info;manage_other_stuff;login_while_of fline;
pages: radio_rules;dj_guide;head_dj_guide;
title: Senior DJ
Nice, then seperate using ; as the delimeter. Nice way :P
Dentafrice
11-07-2009, 06:00 PM
Nice, then seperate using ; as the delimeter. Nice way :P
Even if there is/isn't a last ; (login_while_offline;blah vs login_while_offline;blah;) it still cleans up the array through the $core->clean_array() method which removes empty array elements.
All it does is get your current features list, and there is a has_feature() function, which just uses an in_array() to determine if the current feature being requested is in the features array that was separated earlier.
Easier and better then other versions of HK which needed the user to logout then login to see updates to his/her level as it was stored in a session ($_SESSION["session_level"]) instead of directly pulled from the database.
BoyBetterKnow
11-07-2009, 06:30 PM
Even if there is/isn't a last ; (login_while_offline;blah vs login_while_offline;blah;) it still cleans up the array through the $core->clean_array() method which removes empty array elements.
All it does is get your current features list, and there is a has_feature() function, which just uses an in_array() to determine if the current feature being requested is in the features array that was separated earlier.
Easier and better then other versions of HK which needed the user to logout then login to see updates to his/her level as it was stored in a session ($_SESSION["session_level"]) instead of directly pulled from the database.
Haha we all made the mistake of storing session level and session users at some points :P It seemed practical haha.
It sounds like a good little project. I'll be honest and say "I think your next one should be to bring back / start a new upload site". It was fantastic.
Good work though.
Dentafrice
11-07-2009, 06:50 PM
Haha we all made the mistake of storing session level and session users at some points :P It seemed practical haha.
It sounds like a good little project. I'll be honest and say "I think your next one should be to bring back / start a new upload site". It was fantastic.
Good work though.
Haha, I think I'm done with the upload business ;P.
I really hardly have enough time for HKV3.
Are you optimizing your code?
Like using $variable . ' hello'; instead of "$variable hello" etc? (To make it faster)
GoldenMerc
11-07-2009, 08:46 PM
Caleb is never on msn anymore :(
Dentafrice
11-07-2009, 09:02 PM
Are you optimizing your code?
Like using $variable . ' hello'; instead of "$variable hello" etc? (To make it faster)
Lawl, you speak to me like I just picked up a PHP for dummies book. "To make it faster".
No.. I'm not concatenating my variables to my strings. I am using the curly-brace-variable-inside-double-quoted-string method.
$string = "{$says->username} - {$says->message} :: at the time of death.";
Caleb is never on msn anymore :(
Getting on in a sec.
Lawl, you speak to me like I just picked up a PHP for dummies book. "To make it faster".
No.. I'm not concatenating my variables to my strings. I am using the curly-brace-variable-inside-double-quoted-string method.
$string = "{$says->username} - {$says->message} :: at the time of death.";
Getting on in a sec.
Well how else would you phrase it?
Not making it slower
Making it faster
?
Dentafrice
11-07-2009, 09:22 PM
Umm... no, not necessarily.. in the cases I'm using it; it doesn't improve the speed by enough marginal amount to do it ;)
Infact I just did a quick benchmark, and the concatenation method you posted, compared to my inline curly brace one; was slower.
Excellent2
11-07-2009, 10:06 PM
Looks brilliant. I'm loving how we can add features. Perhaps you could make a little plugin system?
Can't wait to delve into it.
Well done Caleb :)
Dentafrice
11-07-2009, 10:12 PM
Looks brilliant. I'm loving how we can add features. Perhaps you could make a little plugin system?
Can't wait to delve into it.
Well done Caleb :)
I'm thinking of a plugin system. In the framework there will be an update class that you can call into, that will run off of commands like here is an example install file:
make_directory "pages"
get_file "http://www.updatesite.com/update/test.phps" put "pages/test.php"
get_file "http://www.updatesite.com/update/test2.phps" put "pages/test2.php"
create_feature "admin_view_new"
perm_set_edit "1" "admin_view_new"
Or something like that :)
Invent
11-07-2009, 10:35 PM
Are you using global variables in the framework or is it a registry-based FW?
Dentafrice
11-07-2009, 10:41 PM
Explain what you mean by registry-based?
Dentafrice
11-07-2009, 11:36 PM
If anyone wants a demo account.. tell me ^_^. It's not fully featured atm.. but has the basic backend.
Source
12-07-2009, 12:02 AM
Just had a little go on the basic version that caleb put out. Its really quite an innovative system, looks easy to 'develop' for.
Calvin
12-07-2009, 12:39 AM
Just had a go on it.
Its great!
Oh and I love the permission things :P
Cant wait for its release.
VistaBoy
12-07-2009, 05:36 AM
Umm... no, not necessarily.. in the cases I'm using it; it doesn't improve the speed by enough marginal amount to do it ;)
Infact I just did a quick benchmark, and the concatenation method you posted, compared to my inline curly brace one; was slower.
How do you benchmark php software?
If anyone wants a demo account.. tell me ^_^. It's not fully featured atm.. but has the basic backend.
May i have a demo account please?
Thanks
Ill talk to you bout the account when your back on msn, as I have something else to say aswell.
Excellent2
12-07-2009, 11:36 AM
If anyone wants a demo account.. tell me ^_^. It's not fully featured atm.. but has the basic backend.Demo me :Dą
Blinger1
12-07-2009, 11:58 AM
How do you benchmark php software?
http://pear.php.net/package/Benchmark
Agnostic Bear
12-07-2009, 12:28 PM
I find it better to use ab from Apache. Works wonders.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.