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

  • SEARCH
  • Home
  • 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 7783733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:55:29+00:00 2026-06-01T19:55:29+00:00

At the moment I have a module which can upload a file, extract it,

  • 0

At the moment I have a module which can upload a file, extract it, reads some files and stores it in a database. Since I’m just a PHP developer and not a Drupal developer I’m not common with Content Types , Views and other Drupal stuff. I just want to display some things from the database to multiple pages and edit some things (not everything).

Doing it in PHP would be as easy as putting a brief in an envelope, but in Drupal it’s like you are putting a wheelchair in that envelope.

Do I have to define a content type for it?

Is it easy if I don’t use content types and having permissions controlled manually?

Supposing that I have to define a content type. My database has 5 tables. Should I define 5 different content types?

  • 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-06-01T19:55:30+00:00Added an answer on June 1, 2026 at 7:55 pm

    You don’t have to do it the Drupal way, if you need some Drupal things to work on you data too. I also have developed a module. It accesses a database, displays data from it, then an authorized user can update data and my module will save it. But these will not be nodes. Unless you need (for example) some hooks that run on nodes to run on your content, just use your PHP knowledge to create the content for the page.

    You use hook_menu to define the paths that will display your pages. For example in my code (detail_pages module) the queries get two parameters in the path like example.com/strain/3/4, I define it like as follows, and I used php calls to database in my detail_page($arg1, $arg2) function definition.

    function detail_pages_menu() {
      $items = array();
      $items['strain/%/%'] = array(
          'title' => t('Strain Detail Page'),
          //'page callback' => 'strain_form',
          'page callback' => 'detail_page',//'drupal_get_form',
          //'page arguments' => array('strain_detail_form'),
          'page arguments' => array(1,2),
          'access callback' => TRUE,
          'access arguments' => array('access content'),
          'description' => t('Detail Page'),
          'type' => MENU_NORMAL_ITEM,
      );
    ....
    

    To answer your specific questions

    Do I have to define a content type for it?

    No. You can use page render array, or even add direct html to pages in PHP.

    Is it easy if I don’t use content types and having permissions controlled manually?

    Yes. In the above example I wrote, this line is for permissions:
    ‘access callback’ => TRUE
    this allows everybody to view. You can assign a function in place of TRUE, to return a boolean to represent if user it authorized to view that page.

    Supposing that I have to define a content type. My database has 5 tables. Should I define 5 different content types?

    Especially if you need a nice database structure, you may want to avoid using nodes and defining content types. Drupal creates a table for what would be a column logically keyed by node ID. So you have many unnecessary tables…

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

Sidebar

Related Questions

I have a Flex 4.5.1 application which loads another swf file (as a module
I have a small question. A module which I am working at the moment
At the moment I have a jQuery do a POST to a Controller which
At the moment I have the following code which works fine. label = new
At the moment i have a stylesheet switcher which uses javascript to to load
At the moment I have this code which fires a projectile: Vector3 d =
I am working on a module at this moment using which we are planning
I have a Rails application with several models-views-controllers which have some similar characteristics, for
I'm implementing several classes which does not have data by itself, just logics. These
I have a simple scenario and a issue with it which I just cant

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.