1. Trang chủ
  2. » Công Nghệ Thông Tin

Multimedia cho Joomla part 27 ppsx

10 227 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 2,42 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

It is possible to adjust the MAMP preferences to not use this by going to the Preferences area from the MAMP control panel: If we leave the settings as default, in order to reach our new

Trang 1

How to use MAMP

In your Mac's Applications folder, you will now find a directory installed for the

MAMP application

Inside the MAMP directory, you will see a number of folders and files We need to

look for a folder called htdocs It is within this folder that you will place your new

directories that contain your website files:

It makes things easier by creating a shortcut to your htdocs folder on

your desktop (or in this case, the MAC Finder window) to enable easy

access to our web repositories

Here is an example of how you would configure a Joomla! website using MAMP:

1 Download Joomla! to your Mac from the Joomla.org website

2 Unzip this download, and rename the folder to the project name of your

choice In this tutorial, we will call the unzipped folder JMultimedia.

3 Drag the new JMultimedia folder into your MAMP htdocs directory:

Trang 2

[ 268 ]

5 Open up a web browser and type in http://www.localhost:8888 MAMP

defaults to using port 8888 on a Mac, so it is important to include this in your

URL It is possible to adjust the MAMP preferences to not use this by going

to the Preferences area from the MAMP control panel:

If we leave the settings as default, in order to reach our new Joomla! installation,

the address that we need to type as our URL will be: http://localhost:8888/

JMultimedia (assuming you called your project JMultimedia also)

With any luck, a Joomla! installation page will now show

Before we begin the Joomla! installation, we first need to go and create a database,

which thankfully is easy to do by using the phpMyAdmin tool that comes

with MAMP

Creating a local database

Open the MAMP control panel, and click on the Open start page option, or enter

http://localhost/MAMP/ into your URL bar From here, we can use phpMyAdmin

to create a new database and then run the Joomla! installer

This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010

953 Quincy Drive, , Brick, , 08724

Trang 3

On the MAMP start page, a link to the phpMyAdmin tool can be found:

Clicking on this will take your browser to the phpMyAdmin tool home page

To create a new MySQL database for your Joomla! installation, simply enter a new

database name into the Create new database field and click on the Create button:

You can leave all other settings as default Once the database has been created, you

should now see this listed on the left-hand column showing the database listings

It is now possible to proceed with the Joomla! installation via the Web Browser

Installer, entering the details of your database during the installation process

Your database server will be localhost and the default username and password

will be root:

Trang 4

[ 270 ]

Running more than one website locally

Creating more than one website locally is easy Simply download or re-extract

another copy of Joomla! from your download and then give the extracted directory a

different project name, for example, JMultimedia2 Move this folder into the htdocs

area of your local web server (in our case MAMP), and your project will then be

accessible under the new URL http://localhost:8888/JMultimedia2, and they

should show in a list when you navigate to the main localhost directory, for example,

http://localhost:8888

Create a new database for your new project, just as you did before, and then you are

ready to install Joomla! You can create as may local sites as you have space for, as

long as they are given different names

For those who want to install other server packages, such as WAMP for Windows

or XAMPP, the process will be very similar to that of MAMP Further installation

assistance can be found by visiting the supporting documentation for each product

Most of the free web server environments have been configured to run

easily and openly on a local computer, providing ease of development

They have not been configured to be used as live web hosting servers,

and because of open configurations, they should not be used to host a

live website

Remote server development

A remote host is one that you access via the Internet It may be your own server

or rented via a web hosting company There are many different types of web

hosting servers, including dedicated, virtual, and shared hosting, and many forms

of operating systems running these servers Whichever option you choose, it is

important to check whether Joomla! is able to run in that environment and a checklist

of requirements can be found at Joomla.org under the Documentation area.

Working on your site on a remote web server is a surprisingly common approach

that is used by many people, including those new to Joomla! and the web

development industry Remote web development usually requires FTP access or

some sort of web hosting control panel File Manager tool It can be dangerous to

work on the final site, because of the simple fact that once a file has been overwritten,

there is no way of retrieving it easily without a backup copy Internet connections

can make the process very slow and sometimes FTP connections can corrupt files

This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010

953 Quincy Drive, , Brick, , 08724

Trang 5

With that said, working on a remote server may offer the ability to closely match

a development environment to the live environment and can also offer the ability

to easily show clients the progress of a project If you do not want to work locally

for development, I suggest setting up a remote hosting space to mimic your live

environment, and password protect this via htaccess Server-side programs such

as cPanel and Plesk all offer the ability to easily password-protect directories or

domains, which will keep it private to you and stop search engines from referencing

your development work

If you are using either a remote hosting environment or localhost environment to

perform the following additions to your site, please get into the habit of taking a

backup of your database and files before proceeding with any of the following

The site structure

The following assumes you have a working installation of Joomla! on your web

server If you have any issues during an installation, please search the Joomla

org website, http://help.joomla.org, and the forums to search for answers and

assistance Often, it may be a hosting environment issue rather than any Joomla!

issue during the installation

For the purpose of this tutorial we will be building on a new installation of Joomla!,

without the default content installed When working on a Joomla! website, I find

it best to keep two tabs open in my browser window: One for the frontend of the

Joomla! website, and one for the administration For this tutorial, I will be working

with Joomla! 1.5, the MAMP web server for local development, and the Firefox

web browser:

Trang 6

[ 272 ]

Things to consider when configuring from

the start

During the Joomla! installation process you get the opportunity to enter in some

basic site information, such as a website name, e-mail address, and site login

username and password, but there are usually a number of other things that

are worth configuring when first logging into your new Joomla! installation

Global Configuration settings

The Global Configuration area of your Joomla! site contains some powerful

site-wide settings It is worth looking at these at the start of a project to see if

these require adjustments

Site Settings

There is one change we need to make within the Site Settings box, and it is a

major one:

Change the Default WYSIWYG Editor to Editor - No Editor This will give us more

control and limit issues around entering custom code into your site

Metadata Settings

If you know what your site is going to be about (and hopefully you do), then it is

possible to pre-populate the global Metadata Settings at this stage:

This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010

953 Quincy Drive, , Brick, , 08724

Trang 7

Global metadata is presented on pages that do not contain their own metadata

information and is valuable information for search engine optimization

Populate the Description and Keywords boxes with content that directly relates

to your web project

SEO Settings

The Search Engine Optimization (SEO) area of the Global Configuration is probably

one of those areas that most administrators will look into Here we can enable

search-engine-friendly URLs for our Joomla! website, which can really help with a

more user friendly and search-engine-friendly website:

Because our Joomla! web content is created dynamically by the database, there are

no physical files created for each article This means that we need to utilize the SEO

URL feature to change our URLs from long complicated strings that are not easily

recognizable into more recognizable URLs that relate to the content displayed:

SEF URLs turned off:

http://localhost/JMultimedia/index.php?option=com_content&view=

article&id=1&Itemid=2

Trang 8

[ 274 ]

You will need to select Yes for all three fields, as shown in the previous screenshot

and then click on Apply at the top-right of the Global Configuration page We

need to make one more adjustment to a file within Joomla! for the SEO feature

to become active

In order for SEO to work correctly, it needs to use a feature called mod_rewrite,

which is installed on a web server Most apache servers should have this feature

installed, but if yours is not, then you will need to active it, or ask your web server

support people to look at this You can easily check if mod_rewrite is active or not

by going to the Help|System Info menu link within your Joomla! administration

menu On this page, there will be a link labeled "PHP Information" and on this page

use the browser window search bar to search for mod_rewrite It should show in

an area labeled "Loaded Modules"

If mod_rewrite is active, then we are clear to proceed, and need to rename a file

named htaccess.txt (which is included at the root of your Joomla! install) to

.htaccess That is all that is required for search-engine-friendly URLs to work

for Joomla!

Depending on your computer platform, there may be restrictions

in renaming files beginning with a dot symbol You may need

to use an FTP program, such as the free and powerful FileZilla client, http://filezilla-project.org/, to rename your htaccess.txt file

Right, back to the Global Configuration screen There are three menu links at the

top of the Global Configuration page Click on the second one called "System" On

the System page, there are a range of options relating to the hosting server, and how

Joomla! interacts with this

This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010

953 Quincy Drive, , Brick, , 08724

Trang 9

User Settings

This box contains User Registration settings For the purpose of this project, I am

going to turn off User Registration, as we have no requirement for users on the site

at this stage User Registration can be activated for the site at any stage:

Media Settings

We looked at these in earlier chapters and they are important in allowing the Media

Manager to work effectively At this stage, we can leave these as default, but we may

need to re-visit them, depending on what media formats we end up using on the site

Debug Settings

Debug is used by developers to view additional information about the page that has

loaded It can help show diagnostic information and SQL errors You can turn this

feature on and off as you wish If you know how to decipher the information, it is

very useful for troubleshooting the build of a website

Cache Settings

The website cache helps to optimize and improve performance of your site by

creating a temporary copy of pages and delivering that information to the user,

rather than going back to the database to retrieve it each time:

Caching can really come in handy on large production websites, but for development

it can sometimes cause headaches with you making changes and not being able to

Trang 10

[ 276 ]

Session Settings

The Session Settings control how long a user can be logged in and inactive on the

site before being logged out automatically The default is 15 minutes and you can

adjust it:

Be cautious of setting this too high, but let's change it to 30 minutes, else you will

probably find yourself getting logged out of the administration area if you go off to

get a cuppa

Click on the third menu link called Server at the top of the Global Configuration page:

Mail Settings

The Mail Settings area of the Global Configuration may require your attention,

depending if you require specific site Mail Settings:

This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010

953 Quincy Drive, , Brick, , 08724

Ngày đăng: 04/07/2014, 15:20