Jump to content



Photo

Cms


  • Please log in to reply
4 replies to this topic

#1 margaux

margaux

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts

Posted 22 April 2012 - 6:29 PM

Not sure which forum to post this in so apologies if I've picked the wrong one.

I've created a microsite which consists of several forms, inserting the form data to a d/b and emailing a file attachment. It also includes a mini cms to allow the site owner to view various reports and to create users to access the forms.

The site owner wants the cms functionality expanded to be able to change some wording, change some images, maybe embed some viedos and define pretty urls. He wants to easily replicate/customise the microsite. In other words, I think the original site is now going to be a template or a theme. A couple of questions:

1. to allow the owner to define the url, do I use the .htaccess file or are there other ways?
2. presumably I will need to dynamically create a new d/b with new tables?
3. it will be the same person administering all the different microsites so it seems a shame to create numerous copies of the mini CMS scripts viewUser, addUser, viewReports scripts. Is it possible to use the same ones and pass a variable which determines the specific microsite being accessed? Is that approach what is referred to as multisite and is it a good way to proceed or is it better to keep each microsite self contained?

As always, I am open to suggestions for the best way to achieve this functionality.
  • 0

#2 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,710 posts
  • LocationState College, PA (USA)

Posted 23 April 2012 - 7:54 AM

1. to allow the owner to define the url, do I use the .htaccess file or are there other ways?


I would think you could just have this be a value in a configuration file that's part of the site, but I could be misreading what you're asking.

2. presumably I will need to dynamically create a new d/b with new tables?


Yes. You'd need to create an install feature, I would imagine, that would establish settings and create the database tables.

3. it will be the same person administering all the different microsites so it seems a shame to create numerous copies of the mini CMS scripts viewUser, addUser, viewReports scripts. Is it possible to use the same ones and pass a variable which determines the specific microsite being accessed? Is that approach what is referred to as multisite and is it a good way to proceed or is it better to keep each microsite self contained?


It really matters whether you're designing this to work on one physical server or multiple. If one, you can have one central repository for the framework files and then the admin directory in each specific site could read and use those. That's the way I would do it if you're one one server using this for multiple sites.
  • 0

#3 margaux

margaux

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts

Posted 24 April 2012 - 6:15 AM

thanks Larry for your very helpful comments, as always.

I would think you could just have this be a value in a configuration file that's part of the site, but I could be misreading what you're asking.

I'm not sure what you mean by this. Can I put a variable in the config file e.g.
define ('BASE_URL', '$baseURL');
I thought defines were used for constants. or would it be better to use a redirect function?

You'd need to create an install feature,

I think I'm okay to create the d/b and tables but not sure how to upload/install all the files dynamically. I'll have a search around. Do you know of any good resources?
  • 0

#4 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,710 posts
  • LocationState College, PA (USA)

Posted 25 April 2012 - 7:49 AM

You can certainly put a variable in a configuration file but you can't put a variable in single quotes and it wouldn't make sense to assign a variable to a constant, generally.

Normally it's up to the end user to put the files on the server and create the database itself. Then the install process asks the user for that information and creates the database.
  • 0

#5 margaux

margaux

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts

Posted 1 May 2012 - 8:36 AM

I can now devote more attention to this project which is taking me out of my comfort zone. If i post my thoughts, perhaps I could get some comments/suggestions that would help me clarify my approach and learn some more efficient methods.

Site Summary
The original microsite presents a survey(form) to the end user who is asked to rate himself on a number of skills. After validating the form, a total score is calculated and the information is written to 4 tables in the d/b. The user is then presented with a proficiency level based on his score and a form with numerous training options (checkbox list) he can request. On submission of that form, a csv file is emailed to the site owner and a thank you message displayed to the end user who is logged out. End user must log in so there are functions for the site owner to create/view/amend users and to view the contents of the forms.

The basis of the project is to present a form to the site owner to insert data about the company that the microsite is being cloned for. On submission of the form, the new site will be created. This means dynamically creating files and a database. Presumably the files from the original site can be re-used and I just need to substitute variables for the data that the owner enters?

Database: for the owner who is going to clone the microsite at least 5 times will include these tables - users, site_vars, skill_items, train_options.

Database: for each site created which will have these tables - users, branches, surveys, skill_items, skill_scores, prof_levels. the last two tables are look-up tables. The survey table has indices to branches, users and skill_items which make up the full record of each survey completed.

Thanks for your feedback.
  • 0