I have 3 seperate modx evolution website. All 3 websites are completely different and therefore run off a seperate database. However for the news and events pages of each website i would like them to all run from the database of the 1 of the 3 websites. I this possible? is there an extra already created for this purpose?
I have looked into the possibility of using an RSS feed, but would rather have them running directly from the database as this would allow a news article to be added from any of the 3 websites.
Thanks,
Sean.
you can create your extra tables in one modx instance & access them externally ~ however they will need to be on the same file system. I am not aware of a method to do this VIA http/API etc. See here.
http://rtfm.modx.com/display/revolution20/Loading+MODx+Externally
What you will want to do is create your extra table and extend modx using xPDO, it's a fair bit of work to get setup initially but worth it in the long run. This is the best example for getting started, although you will not be extending anything [but modx] it does give you useful examples of creating your schema and registering it with modx.
http://rtfm.modx.com/display/revolution20/Extending+modUser
and
http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components
Finally, there IS an extra that will generate all your schema files for you, however I can't seem to find what it is called... sorry. If you have multiple tables using foreign keys it may not be all that useful to you as it won't create the relationships in the files it generates.
Related
How can I remove one table from wordpress tables without losing wordpress site?
I mean the main tables, not the plugin tables.
For example, the comment table or post table - if I remove it from phpmyadmin and then go back to the wordpress site it shows me an error and starts repairing the database. I want to be able to delete for example the comment table or option table or the main table without losing the wordpress site. I want just the user table in the wordpress site, and want to remove the other tables.
How I can edit wordpress core files that don't check the database table or just check if the user table exists?
Thanks.
Best regards
As noted in the comments, WordPress requires all the tables that it creates, even if it doesn't seem like it is using them. You can absolutely build a system that only uses WordPress for authentication and/or authorization (I've built several), but you must accept that the other tables and all of the core code exists.
If instead you just want a secure login and session, I would encourage you to look at a library such as PHP-Auth or even better, Symfony. With the latter you can very easy get an authentication and authorization in place and then move on to your code.
However, if you are dead-set on using WordPress, and you are willing to accept that the other tables must exist even if you aren't using them, here's some code that we've used successfully on many sites. The documentation is pretty good but generally it relies on overriding WordPress's action for template_include which allows you to run whatever file/code you want. We almost always pair that code with this theme whose sole purpose is to force users to login before doing anything.
Explaining everything in there is out of scope for this site, and I would very much encourage you to not use it unless you have a very specific need that cannot be satisfied by using a third-party library.
I am working reverse engineering my WordPress website into Rails. I'm doing this to get a better working knowledge of Rails and adding features I can't seem to add on WordPress without creating my own custom plugin.
I decided to start with taking a datadump of my website by going to goDaddy and then going to StarField Technologies which is a portal to view my database. I was given a large sql file which was named with the ip address .sql similar to 198.XX.XXX.XX:XXXX.sql. In this file there was queries to create tables, add, and modify entries. I'm assuming everyone I've made until date.
Now what I'm trying to do is to take this data, use a GUI to see the tables I have, and the relationships between them. My ultimate goal is to replicate this information in my own database and use Rails API to add/remove/modify the table data.
Can you please suggest me a good GUI like phpMyAdmin to see the tables and the relationships in a birds eye view?
I am using WordPress and I would like to develop more services for my website. I am thinking of creating new tables inside WordPress database. Will this approach work? I don't want WordPress to delete my tables while updating etc.
These services will be on separate pages, they will not be WordPress plugins. I just want to use the WordPress database to store my tables.
As referenced by a WP Tech Ninja (Samuel Wood, aka Otto) in this post on wordpress.org, you can safely add tables to the Wordpress database and it shouldn't be an issue for upgrades or maintenance.
Adding new tables is fine and several plugins do just that. Twitter Tools, for one.
[...]
Upgrading can modify the database, but if you're using some other table entirely, that table won't be touched by WordPress. It only looks at its own tables.
Don't do this.
I actually got a chance to speak with Matt Mullenweg a few years ago and he advised to avoid any plugin that adds tables like the plague, for the following reasons:
Use the option table(s) (wp_options or wp_N_options for multisite) to store your data—that's what they are there for. They are basically key/value so you can store pretty much anything you want in there. By doing that, you also get the benefit of being able to using the Wordpress api's simple calls to read and write your data, so you don't have to mess with writing data handlers.
Automatic cleanup when your plugin is removed is much easier as well, as you can—again—use the API and those functions are handled for you (yes, there are hooks to tell when this happens for this very reason). Removing tables manually is a pain and is difficult to do when your plugin gets uninstalled.
I'm trying to convert site www.mircscripts.org to Drupal, and researching more and more about migration I've been getting more and more confused.
There are various modules that supposidly will help with the migration process, but these are nothing but confusing and all lack in either a. documentation (listen up Migrate module!) or b. only support Drupal 6.
The Migration Module you seem to have to dive into PHP code and create some "mappings" to your old table data and Drupal. First off, I would ideally like a GUI (Table Wizard only supports Drupal 6 it seems, and the superseded Data module only Drupal 6 too). I also want to import data into Drupal and not use "mappings." I want to be able to disable the Migrate module after all the data has been "converted" to be Drupal node compatible.
If you take a look at the site above, you can pretty much see the scale of data, forum, comments, etc and get an idea of how the database tables look, just your usual stuff; users, comments, and more custom stuff like "files" which stores all the different scripts uploaded by users.
Any suggestions on how I would I go about converting the site?
Cheers
Gary
edit: I forgot to mention the site is almost entirely custom made. The code for it looks like my nan on her way to bingo -- a complete mess. There is an interesting bit of code available at http://drupal.org/node/261066 if you scroll down, although I don't feel like doing node_save() 60,000 times for every record, for just one table. It sounds evil.
The migration module comes with an example migration module and some documentation to facilitate content migrations. Dozens of sites have utilized this to achieve migration. It is not a GUI point and click but very flexible and can be tested repeatedly.
I've written my own modules before to do custom migrations prior to this, and its not as bad as it sounds. You just need to know how the schema relates and map it on paper, then pseudocode and test.
For www.dogfish.com, I migrated 12,000 some nodes. For a band site I am trying to relaunch, I have migrated 75,000+ nodes. Both methods I utilized a db connection and cron to get the next X results. I could have also used BatchAPI but that seemed slower.
Migrate module is the way to go.
Take a look at feeds. It's a GUI importer thing that allows you to map fields in a file to objects like nodes.
http://drupal.org/project/feeds
There's nothing evil about node_save over all the rows in your table. That's essentially what any import module should do anyway. I worked on a huge d5 project where we imported millions of nodes that way. It works fine.
Some people have recommended saving to the database directly. Never do that. It's just not the right way to create nodes. Use the Drupal API!
As i have spent years on drupal. I did not see any full fledged module for migration. Its better you start coding, it will save time and that the smart idea :)
Are there any PHP based CMS which could be integrated with an existing database? My client already has a big inventory solution which was written in VBA. Now we need to setup a web based shop for them and we are thinking of setting up a CMS from the shelf.
Is there any way we can integrate the current database scheme with that of CMS ?
That depends entirely on what the big inventory solution does, where it is running, how it is structured, and how the two solutions are supposed to coexist.
Usually though, you will want to make use of existing export/import functions on both sides (e.g. XML) instead of having two applications meddle with the same data base. That often ends in tears.
The issue is that the CMS would have to understand how the database was laid out. Even having a different number of columns would prevent the CMS from understanding the structure of the tables. A CMS isn't a human. It just interacts with data how it's told, it doesn't ever interpret or understand the data.
Your best bet would be to first install a simple CMS with a table prefix (something like installing WordPress with "wp_" as the table prefix) to prevent it from over-writing any existing tables. After this you would need to write a plugin for the CMS which tells it how to read your database. It may be possible to find a plugin which already does what you want and then modify it to use your table design rather than the intended one.
In either case, though, the information in a database is part of the site's content. As such it's the job of the content management system to both create and maintain it. Creating it outside of the CMS will generally confuse it and require some work to integrate it.
first of all, just for curiosity, why cms and not framework? Using framework will ensure you can fully integrate your existing database with less effort (in terms of long-time consistency and reliability).
Still, if you want to stay with CMS, I would recommend Drupal. They have nice feature which allow you to interact with multiple databases without modifying your current data structure. Furthermore, you can build your own customized modules or even installation profile to suits your need.