I'm building a site using Pyrocms and am using the Formation class for creating my forms. I'm creating a module and would like to put my formation.php file in the modules config folder, but when I do I get the following error message:
addons/modules/projects/config/formation.php
does not contain a valid config array
The form works fine if I put the form definition in system/pyrocms/config/formation.php, but I'd like to keep it in my module folder.
Has anyone done this?
You'll need to put that in the main pyrocms config folder.
Related
I'm trying to load a language folder inside a laravel's package called permissionmanager , I know that including files directly inside vendor folder isn't the recommended way, but trying to extend it on the resources/views/vendor folder was unsuccessful.
the problem occurs when i try to upload the folder to the server using filezilla,it's not allowed. because i suppose laravel's vendor folder is protected.
so how can I load that lang file (es/permissionmanager.php) in the right way?
Use the "resources/lang" folder, not "resources/views". So it will be:
resources/lang/vendor/backpack/es/permissionmanager.php
I am working on a CodeIgniter - HMVC
What I know:
is I should not create assets like css,js,images inside the application folder in codeigniter, but I have a necessity for it.
**What I am trying to achieve is : **
to create a standalone module and trying to use it in another project. In that case, I really need to add the necessary css,js,images files into the modules folder it self.
The Error I get is:
You don't have permission to access /v7-bitbucket/application/modules/some_modle/assets/bootstrap.min.css on this server.
How do I overcome this?
Please advice.
Thanks.
There are 2 ways I can think of for you to access this data.
The first one is using an htaccess and a custom rule, which redirects certain files to inside the other directory. This way, the user will still have access to only certain specific files outside of the public HTML folder.
The second option is to use PHP and render the content of the file in custom tags.
Ex: Instead of entering <link href="<?= $path ?>">, you would do <style><?= file_get_contents($path) ?></style>. This would be harder to cache, and a bit harder to implement for images.
I'm prepare a multistore on magento.
I have a three template, and I was change a few file from code/core and replace in code/local, but only one template take a changing code from code/local
a rest template should take file from code/core/
Now every template take files from code/local/
How can I'm set app to resolve a problem
thx for help
You should NOT overwrite core files in local. Better try to develop your own module which rewrites the core functionality. In this module you can integrate a configuration, so it's only used for one store view, and not for all.
i need to load a library from my module using Modular Extensions
my structure like this
modules/
modules/categories/library
categories_class.php
modules/categories/controllers/
categories.php
I need to load categories library in categories controller .
any one cane help me?
I see two problems..
Problem 1
According to your question, your categories module is not organized properly. The whole purpose of HMVC is compartmentalizing of code e.x; modules. Given your present question how does that structure allow you to copy your modules folder and paste it into another app? Answer: It doesnt..
Follow the example below
It should be the following from the app root:
/application/
config
modules/
categories/
views
controllers/
categories.php
libraries/
categories_class.php
models
libraries
core
controllers
Problem 2
per the user guide: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home
You must prefix the module name in front of anything referenced inside the modules folder.
e.g: $this->load->library('module/library');
or in your case: $this->load->library('categories/categories_class');
I have attempted previously to exclude the modules folder name and have never gotten it to work.
Controllers can be loaded as class variables of other controllers
using $this->load->module(’module/controller’); or simply
$this->load->module(’module’); if the controller name matches the
module name.
Any loaded module controller can then be used like a library, ie:
$this->controller->method(), but it has access to its own models and
libraries independently from the caller.
I have another perspective for this error behavior, that make me spend about 3 hours, actually I am always using combination of Uppercase and Lowercase on my custom libraries on Codeigniter.
For wiredesigz of Codeigniter HMVC, remember the libraries loader behavior as same as CI itself, always use lowercase of your library classes name instead of actual class name (Maybe combination of uppercase and lowercase)
I am trying to override a component. The file structure is like this:
templates/mytemplate/html/com_contact/contact/<files>
From inside the default_form.php, I want to access another php file. So where do I keep that other file and what changes do I have to make to the component view? I am using Joomla 1.5.15.
What type of change? Is it a change you can make in the template override?
Well you can include it as a simple iframe like here or if you want to include a php file you can use include or require_once like here.