There are 5 basic steps to making a page.
assuming you are not going to use any db functions.
create a file in controllers folder with the proper class code ie myfile.php
create a file in the views/controller folder ie myfile_index.html
create you route call in the init.php file ie
OW::getRouter()->addRoute(new OW_Route('pluginname.index', 'myfile', 'PLUGINNAME_CTRL_Myfile', 'index'));
Add your code
Add your language keys
Asssuming everything is correct your page will load. To test go into your html page and type the word hello at the very top then save and refresh your cache. Then when your page loads you will see hello on the page and you will know its your page.
class REGISTERFORM_CTRL_Reg extends OW_ActionController {
"REGISTERFORM_CTRL_Reg", 'index'));?>
let me know if that works i didnt test it
first thing, you never have to use a close php ?> as long as php is the only thing in the file, as a matter of fact it will give you an error or warning or do nothing at all if you do. So remove all your close php tags from all your files.
2.always run debug mode when your doing a plugin, if you had it would have told you the problem.
3. Always init your vars before you use them, always, it will never pass inspection if you dont, moderation will not accept notices when he moderates a plugin.
if(!isset($id)) { $id = ''; }
if(!isset($value)) { $value = ''; }
4. you changed your reg to Reg so that was this one.
5. and then that is not the way you do a selectBox i got warnings on your select box and so i commented it out and the form works.
$ratingopts = array(
OW::getLanguage()->text('name','admin_rating_option_verybad_text'),
OW::getLanguage()->text('name', 'admin_rating_option_bad_text'),
OW::getLanguage()->text('name', 'admin_rating_option_poor_text'),
OW::getLanguage()->text('name', 'admin_rating_option_fair_text'),
OW::getLanguage()->text('name', 'admin_rating_option_good_text'),
OW::getLanguage()->text('name', 'admin_rating_option_great_text'),
OW::getLanguage()->text('name', 'admin_rating_option_excellent_text'),
);
and then in your element do this AFTER THE ELEMENT
foreach($ratingopts as $opt => $value)
{
$ratingButton->addOption($opt, $value);
}//close foreach
hope that helps
now your form will work
it is alot like the crash course in alot of ways but it is a plugin style way of learning. It is designed to help you learn.
OW Debug - Warning Message: Error while sending QUERY packet. PID=269648 File: /home/freephps/public_html/oxwall/ow_core/database.php Line: 707
OW Debug - Exception
Message: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away File: /home/freephps/public_html/oxwall/ow_core/database.php Line: 707 Trace: #0 /home/freephps/public_html/oxwall/ow_core/database.php(707): PDOStatement->execute() #1 /home/freephps/public_html/oxwall/ow_core/database.php(460): OW_Database->execute('INSERT INTO `ow...', Array) #2 /home/freephps/public_html/oxwall/ow_core/database.php(496): OW_Database->insert('INSERT INTO `ow...', Array) #3 /home/freephps/public_html/oxwall/ow_core/base_dao.php(216): OW_Database->insertObject('ow_base_theme_c...', Object(BOL_ThemeControl)) #4 /home/freephps/public_html/oxwall/ow_system_plugins/base/bol/theme_service.php(388): OW_BaseDao->save(Object(BOL_ThemeControl)) #5 /home/freephps/public_html/oxwall/ow_system_plugins/base/bol/theme_service.php(309): BOL_ThemeService->processTheme(955) #6 /home/freephps/public_html/oxwall/ow_core/application.php(777): BOL_ThemeService->processAllThemes() #7 /home/freephps/public_html/oxwall/ow_core/application.php(744): OW_Application->updateCachedEntities(true) #8 /home/freephps/public_html/oxwall/ow_core/application.php(158): OW_Application->devActions() #9 /home/freephps/public_html/oxwall/index.php(51): OW_Application->init() #10 {main} Type: PDOException