User

User:Skyhigh

From Joomla! Documentation

Revision as of 15:00, 16 April 2016 by Skyhigh (talk | contribs) (Frontend record update function)

Joomla 3.4 Joomla 3.5

I recently started using Joomla for my club website. If you want to get in touch with me, post on my talk page.



Frontend record update function

1 Introduction

Joomla is primarily a Content Management System for a website with articles, blogs, forums etc. This serves well for providing or sharing public information.

When the site is targeting at a rather distinct group of users like clients or members, it is often useful to enable users to login to the system to store and retrieve personal data from the database. A typical example might be an address book.

The backend of Joomla features quite some functionality to search and edit database records for administrative purposes. There are also many extensions with such functionality, so Joomla is clearly capable of doing a decent job in this respect.

This tutorial aims to provide a guideline for creating a frontend component yourself for users to access and enter private data on the server of your website, in case the available extensions do not satisfy your needs. The tutorial starts more or less where the HelloWorld introductory tutorial of the Joomla Documentation site ends.

1.1 Starting point

This guide continues from the tutorial 'Developing an MVC Component' (aka the 'Hello World' tutorial) from this Joomla site: J3.x:Developing an MVC Component .

The starting point for the source files is: github.com/scionescire/Joomla-3.2-HelloWorld-Component-step-15 .

1.2 Prerequisites

For this tutorial it is assumed that you have a recent Joomla 3.x version properly setup at a server, including a suitable version of PHP and a database. Further it is assumed that you have access to the server, both to the files and the database.

For my exercises I use Joomla 3.5 on a local Fedora 23 system with PHP 5.6.19, MariaDB v 10.0.0.23 and phpAdmin v4.5.5. So this tutorial will refer to 'localhost' as URL for the website, and /var/www/html as root folder for the Joomla website.

This tutorial assumes that you have a good understanding of the HelloWorld tutorial. As the starting point for that source is step 15, the present tutorial also starts with sequence number 15 to align with the preceding one.

1.3 Disclaimer

I am quite new to Joomla and found it hard to find the proper development information. In this guideline I wrote down my findings as help for others looking for the same information. I am not an expert in Joomla, so can certainly not state that the guideline is free from errors.


15 Preparation

  1. This package from scionescire has been adapted slightly. This adapted version can be downloaded from the link here . The modifications were mainly corrections for some minor layout issues with the sidebar, ordering and pagination with the HelloWorld component admin page.
  2. Install the component in Joomla:
    • Login to Joomla as administrator.
    • Select Extensions → Manage, and then the Upload Package File tab.
    • Click the 'Browse' button and select the downloaded zip file from step 1.
    • Click Upload & Install.
    • Check that the component installed properly.

Step 15 of the original Hello World tutorial is now up and running as first step in this tutorial.

15.1 Source files for this step

15.2 Testing the features of this step

  • Enhance the database data by adding categories and publishing the database items:
    • Open the HelloWorld administration page by selecting menu Components → Hello World!
    • Select the Category sub menu, and enter a few categories.
    • Select the 'Options' button and go to the 'Hello World!' global configuration menu. Click the radio button for 'Show' categories.
    • Click the 'Save & Close' and return to the HelloWorld manager page
    • You can add additional items if you like, assign categories and publish all items.
  • Check that the items can now be displayed by using URL 'localhost/index.php?option=com_helloworld&id=1' , '...&id=2', etc.