Re: [jgen] Is it possible to extend Joomla's configuration.php file with my own attributes ?

141 views
Skip to first unread message

Rouven Weßling

unread,
Aug 29, 2012, 5:35:02 PM8/29/12
to joomla-de...@googlegroups.com
While possible I'd strongly discourage extending the configuration.php instead roll your own. However for all types of extension we have ways to store the configuration in the database. Is there a reason why this doesn't work for you?

Best regards
Rouven

On 29.08.2012, at 22:50, dfebles <diego....@modelitsoftware.com> wrote:

> Hi,
>
> I have a set of custom settings values that I can't just hardcode in the code. I need to find a way to extend or create a configuration file.
>
> I was wondering if it is possible to extend Joomla's configuration.php and whether or not it is correct to do that.
>
> I know it can be done with php, or by creating my own configuration.php, but I would like to know what is the right approach that Joomla devs follow.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/CDIYCU_AJGgJ.
> To post to this group, send an email to joomla-de...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>

piotr_cz

unread,
Aug 30, 2012, 5:14:12 AM8/30/12
to Joomla! General Development
It's possible, I woudn't do it.
When you save the configuration (using backend) all non-standard
variables and values will be lost (configuration.php is overwritten,
not altered).

Prashant B

unread,
Aug 30, 2012, 7:41:29 AM8/30/12
to joomla-de...@googlegroups.com
No its not possible.

joomla extensions configuration are stores in tables "Parameter" field.

so it is not necessary to extend joomla configuration file.

dfebles

unread,
Aug 30, 2012, 9:04:24 AM8/30/12
to joomla-de...@googlegroups.com
My problem is not about how to store the configuration of extensions. 
s
For example, I have Joomla integrated with another system. To log in to that system I have to provide username/password, account name, etc. I'm looking for the right way to store this information in Joomla, so an administrator can edit this file from the admin panel, similar to the configuration.php, so if any of these values change, I don't have to modify my code. Configuration settings not related to extensions, 

Thanks!
> To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

Rouven Weßling

unread,
Aug 30, 2012, 11:20:10 AM8/30/12
to joomla-de...@googlegroups.com
How is that bridge integrated with Joomla? Isn't it using an extension for that?

Rouven

To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/GFFkey7QJ9IJ.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

dfebles

unread,
Aug 30, 2012, 2:22:17 PM8/30/12
to joomla-de...@googlegroups.com
It is an extension, a plugin.

Right now I am hardcoding some creds in the php. I know that I can set up a set of parameters to be updated from the administration panel, but that is not what I'm looking for. I'm looking for something more general, not extension specific. I want those parameters to be used by any extension, like a global config file.

Thanks!
Reply all
Reply to author
Forward
0 new messages