Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 588887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:21:57+00:00 2026-05-13T15:21:57+00:00

I have some site metadata I’d like to be changeable… for example, in my

  • 0

I have some site metadata I’d like to be changeable… for example, in my application, if the sysadmin didn’t want to use the “Inventory” portion of the site, he/she could turn it off, and it would disappear from the main site.

So I was thinking, maybe I could make a table in my database called “meta”, and insert values (or tuples) there! Then, if a module got turned off, the script would update the row, and set “module x” to 0, and I’d be done with it, right?

Except it seems like an awful lot of overhead (creating an entire table, and maintaining it, etc) just for a set of values… Basically, my solution sounds like shoving a square peg into a circular slot.

A cursory glance over the drupal database yielded nothing, and I’m guessing they use a configuration file on the server itself? If that’s the case, I don’t know exactly how saved values in a .cfg file (for example) could be read by the web app, nor do I know how such an app could save information to the file. I’d appreciate your insight, if you’ve tackled this problem before.

I use primarily PHP, by the way.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:21:58+00:00Added an answer on May 13, 2026 at 3:21 pm

    I’ve often seen this accomplished using a config array:

    $config["admin_email"] = "admin@mydomain.com";
    $config["site_name"] = "Bob's Trinket Store";
    $config["excluded_modules"] = array("inventory", "user_chat");
    

    Then later you can check:

    if (!in_array("inventory", $config["excluded_modules"])) {
      // include inventory logic
    }
    

    Granted, this is a bit backwards. In reality, it would be smarter to explicitly declare included modules, rather than the negative. You would then reference this config.php in your project to load-up and act in response to different configurations.

    You could implement this as a database table too, making at least two fields:

    1. Option
    2. Value

    Where option may be “excluded_modules” and its corresponding value would be “inventory,user_cat”. In all honesty though, this method is a bit sloppy, and may cause you some frustration in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some extra features on a site that employees can use but customers
I have some sub-applications in my site, for example: http://server/app/subapp1 http://server/app/subapp2 How can I
I have read some web site that captcha is not needed in mobile application.
I have a site, now what I want is when user switch to some
I have some site where I am embedding a couple of youtube videos in
I have some problems on a site with the concurrent access to a list.
I have some pages on my site that are plain HTML pages, but I
I have some code on my PHP powered site that creates a random hash
I have some code that creates a new site in SharePoint. Upon browsing to
I have some mega menu style menus on a site I maintain. These are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.