I have implemented several custom modules which essentially bridge Drupal with some third party applications we build in house.
Now as my knowledge of Drupal grows I am curious to know whether or not it is possible to integrate my modules with Drupal VIEWS for reporting purposes.
My modules connect directly to several MySQL databases on an external server and perform queries and render those results within the context of Drupal.
What I would like to do, is use VIEWS somehow to SELECT and manipulate the query as a Drupal VIEW to avoid having to re-purpose the module queries each time a change is requested.
Basically, is it possible to expose the SQL tables in an external app to one which Drupal VIEWS can pick up? I have googled and found a few suggestions but no one seems to know for sure???
It seems drupal expects all content to be of it's own internal "content type" and thus connected to it's core "node" - is this an assumption VIEWS makes?
I don't want to export my third party data into Drupal "nodes, content types, etc" simply so VIEWS can effectively read and render the results.
Seems to me, this should be possible with a Drupal module bridging the gap somehow???
Cheers,
Alex
You could use data module http://drupal.org/project/data
It gives you option to use views on your custom tables. I hope this helps you.
Related
I have a working Drupal site that i need to replicate on another server, so that the replicated version doesn't contain custom site information like users data or specific article published on the main site.
So i did a selective dump of the main db, and re-imported in the replicated site. In the specific case of the "node" table, I imported only nodes of the type "page". Now, all went well. The main functions of the site are working, but i have a problem with pages throwing an error "The requested page "/node/page_number" could not be found." with ALL the basic node pages. I can see only views and the front page.
Probably i'm not dumping some information needed by Drupal to display the node. So the question is: where i can find info about basic nodes? I thought porting the table "node" and "node_access" was pretty enough, but really it isn't.
The problem is that node table stores only basic information.
I think you did not imported node_revision table as well.
Even if you do, dumping tables and re-importing only specific data into another database breaks their connections, by resetting id columns and missing extra data provided by fields and other custom modules.
Consider using Import/Export modules, comparison of which you can find Comparison of Content and User Import and Export Modules
Consider the data_export_import module.
What I like about data_export_import is that it is an all-in-one module (for export AND import of data. Whereas as with some other solutions, the import and export stages are done by separate modules, which could mean that extra work is needed ensuring compatibility of the export with the import.)
I want to develop drupal multi-site with this structure:
One shared codebase drupal 7 multi-site, each web site has own database.
One master web site that has some tables shared.
Each multi site instances read some tables from master's database, not own database. For example conntent types, fields, views, rules and related configirations read only master's database. So I can develop all sites on one place.
As a result each site must use same content types, views, rules but different contents. I am user 1 of all sites. Sub site editors has create content and user permisions only. I dont want to share users accross sites. So I cant use domain acceess. Is it possible that?
Thanks for your helps.
This module should allow you to accomplish what you are looking for:
https://drupal.org/project/domain
As it states in the module description you can share tables with the domain prefix module. You can select which tables will be shared and which ones will not.
Is it possible in drupal 7 (and any other drupal versions) to have a SHARED DATABASE for 2 sites and the views would change depending on the subdomain / the URL.
Please see the illustration below.
All I want is to have a shared database for multiple site but with multiple view depending on the sub / domain it is accessed and modules / themes scope such as Captcha module should only be visible in the site2.
I'm stuck with this part. My second option is to have 2 database but only 1 database for accessing my site-specific data but for the segregation of content management data I think it would be best if I would have separate database as well for controlling access for modules. Let me know your thoughts.
Thanks in advance.
Yes. Drupal DB abstraction and configuration setup is flexible enough to do the scenario you are going for. You will have to deal with users, then again here too it is a question of choice as Drupal allows you to share users or have different userland for each site. There is a book out there on this subject, and many sites to assist in the various multi-site scenario options.
By the way, you can always post your D questions in drupal.stackexchange.
This is easily solved with Panels as you can just choose the right Views view from there.
There is no reason not to use panels on any drupal site imo.
I have a requirement where I need to access the database in dotnetnuke. Do we need to develop a new module for that?, or dotnetnuke provides us with built-in module.
Please help!, I'm completely new to dotnetnuke.
Thank you.
There's a Reports module which allows you to run SQL queries and transform that data into a display, which should work if you're just displaying information from the database.
If you need to accept input, you might look at the Form & List module which will let you create a form, and then list the information input to the form.
Any more complicated than that, however, and it looks like you'll probably need to create a custom module (or find a third party module from the DotNetNuke Store which meets your needs).
I am working on a Drupal site with a few friends. Obviously we can Version control the code... but what do we do to keep each others databases in check?
I have managed to get all the theming into files (contemplate etc), but ideally my views settings, menu settings would be in line also... (Not worried about Content either way as we're just building the framework)
Any suggestions?
Using Features along with Context is very powerful. Context lets you create a "section" for your site. It's best illustrated through an example:
Lets say we define the "Forum" context as anything with the url of forums/*. Context lets us say: "I want to show these three views in the right side bar, only when I am in the "Forums" context.
Now, using Features, we can create "module" define by the context. So, we will end up with a module called "youSite_forums", which will include all the views, blocks, etc. that was define in your Forums context. It also will determine the correct dependencies, as well as Content Types used in the context. All will be bundled up nicely in a module.
As for versioning content such as node, you can user either Node Export, or just do a DB dump using Backup and Migrate. We use these occasionally, but we never have every node versioned in SVN.
Links:
Features
Context
Backup and Migrate
Problem Solutions in Database Migration from Development to Live Sites
You can find some more opinions on this here: Drupal DATABASE deployment strategies?