We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Ox Dev docs Question | Forum

Topic location: Forum home » Support » General Questions
Austeyr
Austeyr Feb 9 '15
is the crash course (https://docs.oxwall.org/dev:crash-course) up to date cause im getting errors at the using forms section. when trying to create the basic contact plugin.


I'm trying to make sense of the wording on this page, but im almost 95% sure im following it right and putting the code in the right location within 


ow_plugins/oxauscontact/controllers/contact.php 


but every time i go to add the code in this section of the tut it causes an error and i dont get the form to display i just get a big unexpected error.



looking over the actual contact us plugin im seeing there are many differences within the code not sure if this is because the crash course is for an older version of oxwall or not. 


*/-------------------------


this is what i have so far but no forms show.

http://oxaus.com/contact



-------------------------------*/

The Forum post is edited by Austeyr Feb 9 '15
Guna
Guna Feb 9 '15
It takes me 1 week to understand how the plugin works. Don't worry my friend. Check the error_log. 


May be you forgot to paste code in view files.



Austeyr
Austeyr Feb 9 '15
i added the form info into /ow_plugins/oxauscontact/views/controllers/contact_index.html 


still nothing 

Austeyr
Austeyr Feb 9 '15
so it has to be me then and something i'm doing if you have it working. wish i new what the heck it was lol
Austeyr
Austeyr Feb 9 '15
umm rookie mistake forgot to turn OW_DEV_MODE to true what an idiot 
ross Team
ross Feb 9 '15
So, have you managed to do the contact plugin?
Austeyr
Austeyr Feb 9 '15
nah im still having issues. i just installed the normal contact plugin for now. i can get everything working now, up until i change  



$contactEmails = array( 'admin@site.com' => 'Site administration', 'support@site.com' => 'Technical support', 'billing@site.com' => 'Billing department' );

to


$contactEmails = array(); $contacts = CONTACTUS_BOL_Service::getInstance()->getDepartmentList(); foreach ( $contacts as $contact ) { /* @var $contact CONTACTUS_BOL_Department */ $contactEmails[$contact->email] = CONTACTUS_BOL_Service::getInstance()->getDepartmentLabel($contact->id); }


or at least i think thats where the problem is happening. then it just errors out again i need to start from begining again and not change the plugin name and key and just use contactus like it is listed with the code think im confusing myself

ross Team
ross Feb 10 '15
Contact us plugin crash course is compatible with the current version of Oxwall. 

The problem might be that you made a mistake in the name of a class or a service. 

If you provide us the exact error you get, we'll try to assist you. 

Austeyr
Austeyr Feb 10 '15
can i change a class or service name 


For example....



CONTACTUS_BOL_Service 


to 


OXAUSCONTACT_BOL_Service


ross Team
ross Feb 10 '15
Of course you can, but you need to remember the changes and rename it everywhere where you indicate the class or service.