954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Info File with PHP like Drupal?

Hi all,

I am working on a project that requires themes much like the popular Content Management System, Drupal. I notice in their "info" files they use with their system to display information about the theme like its title, description, a snapshot of it, etc, my question is, would it be better to store all the themes in a database from the get go? or would it be better to have a file parser that looks in a dir called themes or whatever with a info file per theme?

It would seem to me, that it would be better to have the information located in a database that contains the same info as the info files... but I wanted to get other peoples opinion to see which way is the most efficient/practical.

Thanks.

-DJ

danielsikes
Newbie Poster
19 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

I would use a combination of the two.

You only need to see information about all of the themes when you want to choose the theme to use. If you therefore store the information about each theme within a file, the overhead to parse the files for this information will be limited and contained.

If you then store the information about the current theme in the database, it will be quick to access and display as required. The database would then only need to be updated when the user changes the current theme.

I believe this is how WordPress works. I'm not sure about Drupal however.

R.

blocblue
Posting Pro in Training
475 posts since Jan 2008
Reputation Points: 142
Solved Threads: 79
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: