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

Starting developer can't find dev-tools | Forum

Boris
Boris Oct 30 '15
Hi, guys,


I'm a PHP beginner working my way into Oxwall. I've got it running and am going through this tutorial: https://docs.oxwall.org/dev:crash-course


I get to the localization part where it tells me to go to <domain>/admin/dev-tools/languages, and get a "page not found" error.


I try to skip over the localization and go to the next section, page routing, but <domain>/contactus/contact/index also gives me a "page not found" error.


Anyone know what I might be doing wrong?

tammy harris
tammy harris Oct 30 '15
how silly is it that theres no link to this in admin languages 
tammy harris
tammy harris Oct 31 '15
hahahahahahahahahahahahhaha
Boris
Boris Oct 31 '15
Thank you guys. 


I'm unable to select the plugin in the "add new text" menu. This part: Choose the section whose name matches the name of the 'Contact Us' plugin (this section was added during the plugin installation with the code we inserted to the install.php file). My install.php text is BOL_LanguageService::getInstance()->addPrefix('contactus', 'Contact Us');


I see an error message about the route across the top of the screen.








Is this something else having to do with the new version of the software?


I apologize for asking questions that might sound dumb to someone with more experience.


PS. The plugin is showing up as "available" and installing. The relevant text (title, 'about',) are getting pulled from the xml file.

The Forum post is edited by Boris Oct 31 '15
tammy harris
tammy harris Oct 31 '15
make the text key for the contact us in dev tools
then go the plugin folder   look in view/controller/ contact_index
and add the text key to it where u want it to show
clear cashe to see it on contact page
tammy harris
tammy harris Oct 31 '15
but remmeber you will need put the text key back in when you update contact plugin 
Boris
Boris Nov 1 '15
How do I make the text key in dev tools? Do you mean this? https://docs.oxwall.org/dev:plugin-key In that case, I've already set the key here as "contactus". Should I just select "custom" for "section", "contactus" for "key" and then something like "{index_page_title} Index page" for the text in English?


I'm getting the following error message across the top of the screen: OW_Route('contactus.index', 'contact', "CONTACTUS_CTRL_Contact", 'index'));
Does this have something to do with why the new plugin is not showing up as a section in the "add new text" popup?
If I skip over localization, the page I'm trying to load still gives me a "page not found" error, where it should just be a blank with contact us for a page heading and title  (since the contact_index.html is a blank file and should be getting filled in by the controller below:class CONTACTUS_CTRL_Contact extends OW_ActionController {      public function index()     {         $this->setPageTitle("Contact Us");     $this->setPageHeading("Contact Us"); 'index_page_heading'));     } }


What am I messing up here?

tammy harris
tammy harris Nov 1 '15

Quote from Chris_W Since the release of Oxwall 1.8 it is @ /admin/settings/dev-tools/languages

Boris
Boris Nov 4 '15
OK, thanks, I've now figured out how to work with keys! 


I'm stuck though in that the index page is not displaying the form fields. 


The tutorial tells me to put in the private function below into the controller, but doesn't say where exactly.


private function text( $prefix, $key, array $vars = null ){  return OW::getLanguage()->text($prefix, $key, $vars);}


If I put it into the controller's index function, I get an error about an unexpected T PRIVATE. If I put it into the controller outside the index function, the form doesn't load on the page.


Thoughts?

tammy harris
tammy harris Nov 4 '15
What page are you try put the text key
Boris
Boris Nov 4 '15
I've got text keys in the title and heading (which display fine), and also one in each form field label (which forms are not displaying).


Like this:

OW::getDocument()->setTitle($language->text('factory', 'index_page_title'));OW::getDocument()->setHeading($language->text('factory', 'index_page_heading'));
...
$fieldTo->setRequired();$fieldTo->setHasInvitation(false);$fieldTo->setLabel($this->text('factory', 'form_label_to'));$form->addElement($fieldTo);