View Single Post
  #2  
Old 01-06-2015, 10:54 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,380
Hall of Famer is on a distinguished road
Default

Very interesting Kyttias, I am glad to see such creative work from you. I hope you will implement more features for the exploration system, and many users may find it useful. ^^

And I see that you aint making use of the GUI system yet. I know it will take time to get used to, but I can provide you an example of how to convert HTML code to PHP GUI, heres an example:

HTML Code:
PHP Code:
$document->add(new Comment("
            <form id='pickup_item' action='explore' name='pickup_item' method='post' role='form'>
            <input id='give_qty' name='give_qty' type='hidden' value='
{$give_qty}'>
            <input id='item_found' name='item_found' type='hidden' value='
{$item}'>
            <input id='continue' name='continue' type='hidden' value='
{$continue}'>
            <button id='acquire' class='btn-violet btn-sm' style='display: inline;' value='item' name='acquire' type='submit'>
            Pick up 
{$give_qty} {$item}(s)?
            </button>
            </form>
        "
FALSE)); 
PHP GUI Code:
PHP Code:
$form = new Form("pickup_item""explore""post");
$form->add(new PasswordField("hidden""give_qty"$give_qty));
$form->add(new PasswordField("hidden""item_found"$item));
$form->add(new PasswordField("hidden""continue"$continue));
$button = new Button("acquire""acquire""item");
$button->setClass("btn-violet btn-sm");
$form->add($button);
$form->add(new Comment("Pick up {$give_qty} {$item}(s)"));
$document->add($form); 
The PHP GUI code will look better when you have to pass many many PHP variables to the HTML form. At this moment though, the area html code has no PHP GUI counterpart, but I will design one for Mys v1.4.0.

Good luck, and happy coding!
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote