Showing posts with label PHP Joomla. Show all posts
Showing posts with label PHP Joomla. Show all posts

Wednesday, May 7, 2014

Organizing Joomla Articles and Main Menu (For PHP developer)

-----
Organizing Joomla Articles and Main Menu (For PHP developer)

STEPS

1) Create Article Category.

1.1) In Admin Page, go to menu Content/Category Manager/Add New Category.
1.2) Create “CatGetMethod” category.
1.3) Repeat Step 1.1 and 1.2 to create “CatPostMethod” category.

2) Create Article.

2.1) Go to menu Content/Article Manager/Add New Article.
2.2) Type PHP codes…
ArtGetSumVariables
<?php
//assume user input 1,2
$var1=$_GET["input1"];
$var2=$_GET["input2"];
echo $var1+$var2;
?>
2.3) Repeat for ArtPostSumVariables
ArtPostSumVariables
<form method="POST" action="" >
        input1: <input type="text" name="input1"><br/>
        input2: <input type="text" name="input2"><br/>
        <input type="submit" name="submit">
</form>
<?php
//get value from POST input
$var1=$_POST["input1"];
$var2=$_POST["input2"];
echo $var1+$var2;
?>

3) Create Menu Item.

3.1) Go to menu Menus/Main Menu/Add New Menu Item.
3.2) Add Menu Item Type as “Category List”.
Choose “CatGetMethod”.
3.3) Repeat Step 3.2 to create “CatPostMethod”.

4) Browse http://localhost/joomla31

4.1) Click the CatGetMethod menu link.
4.2) Click the Article “ArtGetSumVariable”.
You may get notice message.
Append “?input1=1&input2=2” to the URL texts.
4.3) Try open the ArtPostMethod.
You may get Notice message.
4.4) Type the values 1 and 2 and click Submit.
-----

How To Write PHP Code In Joomla Article

-----
How To Write PHP Code In Joomla Article

INTRODUCTION

This tutorial uses the following packages:
1) uWamp as the Window-Apache-MySQL-PHP package. (For further info, follow this link, http://setup-steps.blogspot.com/2014/03/uwamp-221.html)
3) Joomla DirectPHP Plug-in (Download from here, https://drive.google.com/file/d/0B86b-ALn-1MGZXpzZXpGSlY3UWs/edit?usp=sharing )

STEPS

0) Setup the uWamp.

1) Extract the Joomla Package content.

Extract to ..\uwamp\www\joomla31\...

2) Create database “joomla31”.

Run phpmyadmin.
Create a database “joomla31”.

3) Browse http://localhost/joomla31 

3.1) You will be redirected to http://localhost/joomla31/
There are 3 steps that you need to follow to setup Joomla 31 successfully.
Step1: Configuration
Enter details and click Next.
Step 2: Database.
Enter the database configuration details and click Next.
Step 3: Finalisation
Click Install.
Installation Done.
Click “Remove installation folder” button.

4) Browse http://localhost/joomla31 again.

You should get Joomla Front Page.

5) Browse http://localhost/joomla31/administrator.

You should get Joomla Back-end Login page.
Enter your admin login credential (refer step 3.1).
You should see Joomla Control Panel page.

6) Install DirectPHP Plug-in

6.1) You need DirectPHP plug-in (download from here, https://drive.google.com/file/d/0B86b-ALn-1MGZXpzZXpGSlY3UWs/edit?usp=sharing )
6.2) Go to menu Extensions/Extension Manager.
6.3) Choose the DirectPHP plug-in and click Upload & Install.
6.4) You should get a success message.
6.5) Go to menu Extensions/Plug-in Manager.
6.6)  Type “DirectPHP” in the search box. Click the button in the Status column to enable it.
6.7) You should get a success message.
6.8) Next, disable Tiny MCE Editor plug-in.
7) Create PHP Content.
7.1) Go to menu Content/Article Manager/Add New Article.
7.2) Create a new article.
Title= PHP Test
Content=
<?php
echo “Hello Joomla!”;
?>
Click Save & Close button.
7.3) When Joomla shows you the article lists, click the star button for the above article.
It should be like this now:
The article that you have just created should appear on the Front Page and it displays “Hello Joomla!”
-----

Labels

apt-get (2) bash (4) Chrome (1) CMS (1) code-igniter (1) codenvy (1) composer (6) eclipse che (1) error (4) file-permission (1) firebase (2) Free PHP Hosting (11) FuelPHP (3) git (4) jwt (1) laravel (10) mysql (1) OpenShift (1) php (11) PHP Eclipse (9) PHP Joomla (2) PHP Laravel (4) PHP Yii (9) PHP-JBOSS (2) php-jwt (2) PHP-Wordpress (8) plain php (1) Postman (1) REST (2) sqlite (1) sudo (1) visual-studio (4) xampp (4)