Multiple database update on article submit.

Posted on 2010-04-01
Medium Priority
Last Modified: 2012-05-09
Hello everybody, am a programmer since 14 years in windows technology and I've used PHP a bit but am far from being an expert in PHP. Anyhow this to say that here's what I want to do:
Joomla 1.5.15.

I have 16 sites on subdomains that are running ( at this moment ) an exact copy of each others. So same site on 16 different subdomains all running on they're own separate database. On one of this subdomain, from the FRONT END we could log in and edit the articles ( cannot add just edit them ). Now what I want to do is add under the METADATA section another section that would list the 15 other websites with a check box beside. Once the article edited the user will checkmark the sites that he/she wants to have this article publish to also.  So basically if I checkmark the 15 website well when I will hit the save button I want to insert this articles in the 15 other database as well.

Pretty simple in theory but I have no clue on how to do it in Joomla cause am all confused with the extensions.. modules.. plugins.. and so on..

Can you help me out on pointing me on how I need to do it ( not code it for me )  but really the structure of what I have to do..  Currently I have manage to add the form under the METADATA section that list the websites with the checkbox.. I have edited the file in : \templates\templateName\html\com_content\article\form.php   -- Maybe this is not even the good way to go?
Anyhow, this is why I am asking for some help.
Question by:DaDMan
  • 4
  • 3
LVL 13

Expert Comment

ID: 29352011
Start here:
Specifically here:

The Joomla multi site component has evolved so much since the last time I looked at it that I can't say absolutely where it stands in relation to your issue. It seems really close.

Component: becomes the content for a page, populates the page body where would otherwise expect to see article content, such as a calendar or a photo gallery
Module: occupies a specific template position to execute its behavior, such as a login form or a menu
Plugin: operates silently upon the content before rendering, such as a button that gets added to a wysiwyg editor or a filter that searches for email addresses and encrypts them from spam bots.
LVL 13

Expert Comment

ID: 29352083
Forgot this link: all items in category multi site:

Author Comment

ID: 29360107
hum.. this is interresting. Did'nt know about that. -- but this would involve that I install Joomla multisite , which I dont know the work involved.. ( dont wanna get in more trouble than I am now! :D )

Would'nt it be easier for me to simply trap the checkbox that was checkmarked on the edition article page ( of the front end site, because the user wont use the backend.. too complex for them... ) and then save all the related data into the checkmarked database? That was my first thought..  The only problem is that I dont know what file to edit...
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

LVL 13

Expert Comment

ID: 29362618
OK without research I don't know either (sorry I'm jammed today) but my thought is that you have to follow the MVC Joomla coding procedures or you will end up wishing you had bought some code to solve the problem. It's a learning curve either way.

Author Comment

ID: 29373036
Ok well here's what joomla_php ( and thanks alot for your help ).

The solutions found will be this ( alot easier ). I will do a custom page that I will integrate in the front page. This page will have a select list that will contains all the articles name ( need to know how to populate this or is there a plugins, component that allows me to do that ? ) and wlil list the 16 websites with checkboxe's beside. User will select an article and checkmark the website that he wants to publish the article to. hit save and thats all.

So, is there any plugins that allows me to create my page and populate the list box with the db fields? As far as for the bulk insert in the multiple database I could manage to do it with some sql queries upon the save.

Thanks for your help and for pointing me out in the good direction.

LVL 13

Accepted Solution

joomla_php earned 2000 total points
ID: 29413288
You could model your solution from this one which allows any type of html POST

or these contact forms

This should allow you to write any code you like in a textarea and publish it to any page

This might be a cool way to solve it, use a database app

Hope this isn't too general.

I don't know how to populate a select list (select and options, right) but I will bet you will find that in the first link I posted.


Author Comment

ID: 29504759
Hi there. Yep I've got something started now and your help was appreciated.
Thanks heaps.

Have a nice evening


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Here is a tutorial for making your own Joomla templates. Note before reading, you should have some existing knowledge of web development using HTML and CSS. Design Layout: Design your template in a graphics program like Adobe PhotoShop or Corel…
This is our step by step to setting up and configuring a Joomla Install on a Windows 2003 Server. This is the perfect solution for an Intranet Website using Joomla. What you need (only use the following versions) : A fresh copy of Joomla http…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question