HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Is there a way to manually add a config option?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#96273 (In Topic #19124)
Avatar

Community saint

I have added some config options to the support credit system I am working on into the install function but it has already been installed and I just want to manually add (preferabbly not thru phpmyadmin if possible) some of these new config options into the system so other parts where I am working on using those config options I can retrieve them.

Is it possible without phpmyadmin or short of writing an upgrade routine to the installer?
Back to the top
 
Posted
Rating:
#96275
Avatar

It's easier to run temporary PHP code, than fiddle with the database. If you put a ":" before PHP code, you can run it in OcCLE:

Code

:echo 'hello';
Or you can paste it into the spot in data_custom/execute_temp.php and call that up.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#96276
Avatar

Oh and OcCLE is specifically designed to have a memory, so you can define variables, run require_code commands, etc, and it should still have it for the next command you type.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#96282
Avatar

Community saint

Oh that is awesome worked great! I did try just adding the command in Occle but it didn't work cause i had left out the  : I am not sure yet how to use what you mean with the Vars but I am sure there is a tutorial on it somewhere I can find which will explain it to me.

Thanks though that was awesome!
Back to the top
 
Posted
Rating:
#96283
Avatar

I simply mean if you do:

Code

:$a='hello';
then:

Code

:echo $a;
it will work.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#96296
Avatar

Community saint

Ahh I see. Well not that it was a huge deal to copy and past 5 commands in to add config options but i see I could have prob saved a little time (not much in this cause but certain usefully for something bigger maybe) by setting an array var then loop the comand replacing with the vars. Coolio!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: