Newbie Spellweaver
- Joined
- Jun 29, 2011
- Messages
- 70
- Reaction score
- 94
Hello RageZone!!
Since its discussion/development thread i don't have to say a boring intro :mellow:, As you notice -if you're keeping up with my threads- the J3lackSwOrD class used in the rank script, which include functions for SelectRankQuery, ExpBarsGenerator, JobDetector was just the beginning,
I'm planning to create something much better, which require time and a discussions with you!, J3lack_Lib, it sound sucks that's true but couldn't find better name oO
J3lack_Lib is PHP liberary which contain all the scripts that u may need in anything related to Kalonline website,Big Scripts (ranks, registration, userpanel,..etc) or even small scripts (Castle owner, Server status, Online players,..etc), And i was thinking about the best way to give the Designer|Developer the power of creating ANY THING!
And creating a function for each part wont be strong enough for designers that don't know much about development, so i came up with the idea of Shortcode, just like Wordpress or Joomla, I'm not gonna user Wordpress or Joomla Itself, just the shortcode system,
And for those who don't know about the shortcodes, its system that allow you to type (for example) [castleowner] inside any website template, and it will be automatic replaced with a dynamic PHP function which echo the Castle Owner guild's name.
Imagine what we can do with that, Everything, even inside the userpanel, for example:
will return array with the full info of that player, its name/ all the stats/ skills (index -> level)/ and items and every thing u might need to know about that player!
Or even rank script (for example)
will return the full rank with your own options! with only simple line of code!
J3lack_Lib will go though many Phases, (and if anybody got better ideas tell me about it):
========= (Green => done, Teal=> under-construction, Red => Coming soon) ===========
Phase I: Custom Shortcode System.
Phase II: Small pieces of scripts like (InitItem, InitSkill reader, Account/Character full info checker,...etc).
Phase III: PHP Functions that do anything u might need (from selecting the required query to printing out the results).
Phase IV: Creating templates for the full website (main layout, registration, rank, userpanel,...etc).
Phase V: Full tutorial that explain how to use the J3lack_Lib
=====================================================================
Since this Lib will be Open_source/Free, it will be for Pure discussion and enchanting the idea and realizing it, so feel free to give your best feedback, which will be very helpfull.
Phase II Coming Soon.
Best Regards,
J3lackSwOrD:blush:
Since its discussion/development thread i don't have to say a boring intro :mellow:, As you notice -if you're keeping up with my threads- the J3lackSwOrD class used in the rank script, which include functions for SelectRankQuery, ExpBarsGenerator, JobDetector was just the beginning,
I'm planning to create something much better, which require time and a discussions with you!, J3lack_Lib, it sound sucks that's true but couldn't find better name oO
J3lack_Lib is PHP liberary which contain all the scripts that u may need in anything related to Kalonline website,Big Scripts (ranks, registration, userpanel,..etc) or even small scripts (Castle owner, Server status, Online players,..etc), And i was thinking about the best way to give the Designer|Developer the power of creating ANY THING!
And creating a function for each part wont be strong enough for designers that don't know much about development, so i came up with the idea of Shortcode, just like Wordpress or Joomla, I'm not gonna user Wordpress or Joomla Itself, just the shortcode system,
And for those who don't know about the shortcodes, its system that allow you to type (for example) [castleowner] inside any website template, and it will be automatic replaced with a dynamic PHP function which echo the Castle Owner guild's name.
Imagine what we can do with that, Everything, even inside the userpanel, for example:
PHP:
[get_pid name='J3lackSwOrD']
//Return $pid = %PID%; where %PID% is the player pid
[get_info pid=34]
//Return $player_info = array(
'UID' => %UID% // where %UID% is the player's uid,
'PID' => %PID% // where %PID% is the player's pid,
'Name' => %Name% // where %Name% is the player's nickname,
'Class' => %Class% // where %Class% is the player's class,
//and so on.
'Skills' => array(
%Index% => %Level%,
%Index% => %Level%,
%Index% => %Level%,
%Index% => %Level% // where %Index%s is the skills index, and %Level%s is the skills level)
'Items' => array(
%IID% => array(Index => %INDEX%, Prefix => %PREFIX%,...etc),
%IID% => array(Index => %INDEX%, Prefix => %PREFIX%,...etc),
%IID% => array(Index => %INDEX%, Prefix => %PREFIX%,...etc),
%IID% => array(Index => %INDEX%, Prefix => %PREFIX%,...etc) //etc)
)
//And:
[get_info uid=23]
//which will return array for the account main info like username/password/ips/SN..etc, and will get the characters in that account then get there infos using the [get_info pid=34] one!
Or even rank script (for example)
PHP:
[rank show='100' columns='rank,name,level,guild,exp,status']
J3lack_Lib will go though many Phases, (and if anybody got better ideas tell me about it):
========= (Green => done, Teal=> under-construction, Red => Coming soon) ===========
Phase I: Custom Shortcode System.
Phase II: Small pieces of scripts like (InitItem, InitSkill reader, Account/Character full info checker,...etc).
Phase III: PHP Functions that do anything u might need (from selecting the required query to printing out the results).
Phase IV: Creating templates for the full website (main layout, registration, rank, userpanel,...etc).
Phase V: Full tutorial that explain how to use the J3lack_Lib
=====================================================================
Since this Lib will be Open_source/Free, it will be for Pure discussion and enchanting the idea and realizing it, so feel free to give your best feedback, which will be very helpfull.
=====================================================================
=========================== Discussion Section ===========================
=====================================================================
=========================== Discussion Section ===========================
=====================================================================
=======================
======== Phase I ========
=======================
======== Phase I ========
=======================
Shortcode system was one of the hardest parts, which extract any short-codes from the template which may contain PHP tags that have the same construct (like fetching from database $r['Name']), But its completed fully clean and successfully by extracting the wordpress shortcode system from its installation.
How it works:
- include the shortcodes.php (which contain the main script of the shortcodes)
- Adding the functions, for example
- registering the shortcode
example:
Shortcode system automatic parse any parameters attached in the shortcode,
For example:
When we use it like this:
will run the function:
Where $settings is array:
Amazing, isn't it? :O
Now Phase I completed, and working on Phase II, if you have any ideas for organizing or arranging the functions, please let me know
How it works:
- include the shortcodes.php (which contain the main script of the shortcodes)
- Adding the functions, for example
PHP:
get_pid($name){
//get the required query using custom function query(); then fetch the pid and return it
}
- registering the shortcode
PHP:
add_shortcode('short_code', 'function');
example:
PHP:
add_shortcode('getpid', 'get_pid');
Shortcode system automatic parse any parameters attached in the shortcode,
For example:
PHP:
function rank($settings){//rank script}
add_shortcode('rank', 'rank');
PHP:
[rank show='100' columns='rank,name,class,guild,guildrole' job_names='Samurai, Wizard, Sniper, Ninja']
PHP:
rank($settings);
PHP:
$settings =array(
'show' => '100',
'columns' => 'rank,name,class,guild,guildrole',
'job_names' => 'Samurai, Wizard, Sniper, Ninja'
);
Amazing, isn't it? :O
Now Phase I completed, and working on Phase II, if you have any ideas for organizing or arranging the functions, please let me know
Best Regards,
J3lackSwOrD:blush:
Last edited: