Welcome Guest, Not a member yet? Register   Sign In
Create Installer. Load Only for first time. i.e WordPress installer
#1
Question 
(This post was last modified: 04-30-2017, 08:40 AM by ardavan.)

Hi,

I'm working on my new project and need to have an Installer controller to install few things first.
If you wanna get some idea what I'm looking for, you can imagine the WordPress installer (for the very first time will install certain thing for you just with few clicks) Cool .

My Question is:
What approach is the best practice to do like that?
  1. My thought was to have a Welcome controller and check if it's the first time go to $this->installer else go to $this->homePage
  2. Change $route['default_controller']
  3. What else can be the best practice?  Huh

Thanks for your help
Ardawan
Reply
#2

This may help you with what your trying to do:

ApPHP EasyInstaller FREE
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

It depends what you need to install. If you're just talking about a database and database config, then you first need to check the database config exists. If it doesn't exist, allow for editing it. Once you have config, then of course you will check to see if the database exists, the tables exist, the data itself exists...
Reply
#4

(04-30-2017, 08:35 AM)ardavan Wrote: Hi,

I'm working on my new project and need to have an Installer controller to install few things first.
If you wanna get some idea what I'm looking for, you can imagine the WordPress installer (for the very first time will install certain thing for you just with few clicks) Cool .

My Question is:
What approach is the best practice to do like that?
  1. My thought was to have a Welcome controller and check if it's the first time go to $this->installer else go to $this->homePage
  2. Change $route['default_controller']
  3. What else can be the best practice?  Huh

Thanks for your help
Ardawan

Extend the CI_Controller ( https://www.codeigniter.com/userguide3/g...asses.html ) and write a method to look for a signal in the __construct() method of your controller, if it exists redirect() to your installer controller, this signal could be looking for a database or tables, looking for a file or folder permissions, whatever your application requires.

Dont forget to take into account your installer controller so your signal check doesnt trigger for that controller otherwise you'll end up in a redirect loop.
Reply
#5

Have you tried Install Creator 2?

http://www.clickteam.com/install-creator-2
Reply
#6

Hi Guys,

I fork and improve the UI of https://github.com/mikecrittenden/codeigniter-installer
you can download mine here https://github.com/arisroyo/codeigniter-installer
There are those who tell lies with meaning behind them and those meaning less lies!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB