Submit Your Project / Idea
We are actively looking for cool ideas of packages / projects to develop. Have an idea, or need a specific package developed that you're having trouble finding elsewhere? Drop a message on the Reddit forum and let us know!
Your idea may get developed free of charge and open sourced, or maybe will be developed and released commercially for a small license fee, or maybe will spawn a great discussion and even better ideas! If your idea is picked up, it will be listed on the Projects page.
Jump in and share your ideas! Don't be left behind, get modern and professional with Apex!
Apex Training - Admin Settings View
Within our /etc/training/package.php file, we defined a Settings->Lottery menu within the administration panel, to allow the administrator to define the daily lottery award. Let's go ahead and develop that menu, so within terminal type:
This will create two new files at:
Open the new file at /views/tpl/admin/settings/lottery.tpl and enter the following contents:
This defines a simple page, with one container / panel that contains one form with a single textbox allowing the administrator to define the daily lottery award. As you still notice, the UTI within your web browser when visitng the menu is /admin/settings/lottery, which is the same as the file location on the server. For more information on the .tpl files and speical HTML tags, please visit:
Every view also has an associated .php file that is executed upon viewing the page. Open the file at /views/php/admin/settings/lottery.php, and enter the following contents:
This is a simple PHP file that simply checks the app::get_action() method to see whether or not the submit button was pressed, and if so, updates the one configuration variable via the app::update_config_var() method.
Before we quickly develop the other two views for the menus we defined, let's first Create the Data Table that will be displayed on those pages.