Joomla module/component for table administration - joomla

My client's website runs on Joomla and they would like me to add some custom functionality to the site.
It is a quotation system, so they will just need to be able to update the values that are used to caluclate the quote. So there would only need to be 4 parts to this:
Settings page in the admin section
Database table that stores the settings
Front end form
PHP script to process the form / query the database table
If I was not using a CMS I could easily accomplish this task but my client would like this system to be integrated with Joomla. Can anyone advise how I should approach this?

You should be able to accomplish this easily with Chronoforms and Chrono Connectivity from Chrono Engine. Use the Chronoforms to create the forms that access the data and Connectivity to display and edit the data.
Forms - http://extensions.joomla.org/extensions/contacts-and-feedback/forms/1508
Connectivity - http://extensions.joomla.org/extensions/directory-a-documentation/faq/5661

Try the Joomla Component Creator it will allow you to get started writing your logic.

Related

adding data directly to a magento database

I am adding regions of a country to the database in Magento so when a user selects their country a relevant list of regions will be available in a drop down menu. To do this I believe I need to add information to directory_country_region and directory_country_region_name.
The tutorial I've been looking at states that I should add them directly to the database using sql, however I remember reading that you should not place information directly into the database using raw sql when working with Magento.
My questions are:
1- to keep in line with best practices do I need to use some magento functions to add the required information to my database or can they be dropped in using raw sql?
2- if I need to use some Magento functions how do I work out which I need to use (I have heard off and noticed the lack of documentation) or is there some online reference, even if it is limited?
3- if I am not to use a sql query why is it considered bad practice to do so in Magento?
Hello, if you want to add the information just once, you can use raw sql (faster and no drawbacks), also you are right about the 2 tables (if the country is already in directory_country). If you want to make something that will be available for more Magento instalations you have to crate a new Magento module and add the sql using the installer you can read more here http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-6-magento-setup-resources
Magento wiki is a good place to start, also there are lots of blog posts.
It's considered a bad practice because Magento has its own ORM and most of the time for your new tables (entities) you only need to create models that extend magento core models and you will have access to CRUD without any development and everyone that uses your new module will understaind what's going on.
Example for a region you can use the class Mage_Directory_Model_Region or for a collection of regions Mage_Directory_Model_Resource_Region_Collection

How to load content from another Joomla database

I have two Joomla websites of related organisations: J1 and J2.
How can I load the content and title of an article which is stored in J2 to show in J1?
I can access configuration.php of J2 and get its database connection details or type it myself.
Also this probably would have to be some kind of plug-in where one just type:
{getExternalArticle=id} within the body of any content in J1.
Any suggestions for the best approach?
See this for reference:
http://docs.joomla.org/Connecting_to_an_external_database
Creating a content plugin:
http://docs.joomla.org/J1.5:Creating_a_content_plugin
This is specific to the old Joomla 1.5 and there are a few differences in 2.5 and the above is the use of JFields instead of JParameters in xml declaration and in the name of the events.
You can see more details on this here:
http://www.inmotionhosting.com/support/edu/joomla-25/create-plugin
This might be useful too:
How to get article text by article ID in Joomla?
You might want considered writing a program (perhaps in PHP) that could run as a CRON job and with authorization credentials to access the MySQL TABLE(s) needed from the other site to pull in those Joomla articles and have it populate the website so it could be displayed properly. I am making an assumption that one website has updates and you want them display on the other website, so I would look as a method for one site to feed another.

different mysql users for Joomla backend and frontend for the sake of more security

I currently have just the basic privileges set to joomla’s mysqluser: INSERT, UPDATE, DELETE and SELECT.
But in fact if the this user is being used across the entire site, if any hacker finds a way to get it or to control the queries (sql injection) he will be able to delete the entire content of a website.
My idea would be to have 2 different mysql users in joomla. One to user in the frontend and the other one to be used in the backend (/administrator). In fact the administrator will require the privileges I currently use, but the frontend user will only require SELECT and a few UPDATE and INSERT previligies to some particular tables like banners and session
I know it might sound paranoid, but currently the projects I'm working with require this kind of "paranoid" approach.
I expact any Joomla experts will help me in achieving this.
Firstly, I have seen that you used the Joomla 1.7 tag in your question, but please ensure you are running the latest version of the Joomla 2.5 series, 2.5.9
What you are trying to achieve from what I have read is you want 2 users, 1 that can only log into to the frontend and the other that can log in to the backend. This currently is available in Joomla and would require core code changes which I'm not going to recommend you do. Have a read through another question I answered, giving information and good extensions to help with security.
Joomla! 2.5.4 Hacked: Having trouble with diagnosis
Then, simply create a separate admin account and only use that one to login to the backend.

Joomla add component to database

I'm just starting out on a component for Joomla. I can't figure out how to add an entry in the dB so I can access the component.
I looked at the dB table for components, but some of the columns seem to require some specific info.
This is NOT a finished component, but a new one I want to build.
I am using Joomla 1.7.
take care,
lee
As Jogesh_p suggested, the easy way is to create an xml file like this
http://docs.joomla.org/Components:xml_installfile
If you are just starting out with Joomla development then take a look at the Hello World tutorial.
http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_01
Another option to create a Joomla component quickly is to use EasyCreator, which will create the basic parts of the extension that you can then build on.

joomla integrating external php signup form

I have a joomla website.here is the link
link for siteI want to integrate a external php signup and login form.I create a php signup form.It works perfecly.
signup linkBut the problem is i dont know how to integrate that form to my joomla web pages...I want to secure my web pages..Only registered users can view my page....please help me..
Why have you create your own register form? Joomla already has the one. To see it follow the link index.php?option=com_user&task=register, Login for there index.php?option=com_user&task=login. If you need more fields to be filled out during registation you may you Community Builder. This extention allows to add to user profie as many fields as you want
It is also possible to use Chronoforms to allow for registration that brings in multiple fields as well without having to bring in an external file for registration/login.
Using the tools Joomla has to stay within Joomla is really the best way to go about it. It will allow you to keep your sanity and keep things as uniformed as possible.

Resources