Tải bản đầy đủ - 0 (trang)
Chapter 7. Expanding Your Content: Articles and Editors

Chapter 7. Expanding Your Content: Articles and Editors

Tải bản đầy đủ - 0trang

WYSIWYGisdifferentthanamarkuplanguage,suchas

(X)HTML.Whenyouuseaprogramminglanguage,youmust

assignstylesinsteadofjustusingabutton.Joomlaandwebbasedemail,suchasYahooandGmail,usesimpleeditors.

Figure7.1showsanexampleeditortakenfromaYahooemail

account.

Figure7.1.AYahoowebmailWYSIWYGeditor

[Viewfullsizeimage]



ThedefaultJoomlaeditorfollowssimilarprinciples,alongwith

variousformattingbuttonsthatwillbefamiliartoyoufrom

MicrosoftWord.Figure7.2showsthedefaultJoomlaeditor,

TinyMCE.

Figure7.2.DefaultJoomlaeditor—TinyMCE

[Viewfullsizeimage]



Joomlashipswithtwooptionsforaneditor,TinyMCEand

XStandard,butmanyotherJoomlaeditorsareavailable.

TinyMCEisaplatform-independentweb-basedJavascript

HTMLWYSIWYGeditor(http://tinymce.moxiecode.com/).

XStandardistheleadingstandards-compliantplug-in

WYSIWYGeditorforWindowsdesktopapplicationsand

browser-basedContentManagementSystems—

IE/Mozilla/Firefox/Netscape(http://www.xstandard.com/).



ManagingWYSIWYGEditors

It'spossibletohaveanynumberofeditorsinstalledasplugins

toJoomla.Therearethreemainaspectstomanagingthe

editorsthatyouhaveinstalled.



First,youneedtosetyoursite-wideglobaleditor.Thisisdone

inthebackendintheGlobalConfigurationdialogbox.

GotoSite>Configuration.Youwillseeadrop-downboxfor

yourdefaultWYSIWYGeditor(seeFigure7.3).

Figure7.3.DefaultWYSIWYGeditorsetting

[Viewfullsizeimage]



Afterdecidingwhatyoursite-widedefaulteditorwillbe,you

alsohavetheoptiontosetadifferenteditor(leaveanother

tool)forindividualusers.ThisisdoneintheUserManager.

GotoSite>UserManager.Clicktheusertoopenupthe

UserManager—Editscreen.CircledinFigure7.4,youseethe

settingtoselectadifferenteditor.IftheUserEditordrop-down

boxissimplyleftasSelectEditor,theglobaleditorwillbe

assignedtothatuser.

Figure7.4.IndividualuserWYSIWYGeditorsetting

[Viewfullsizeimage]



ThelastaspectofmanagingWYSIWYGeditorsiswithinthe

editorsthemselves.InthePluginManager,someeditorshave

specialparametersthatyoucansettoachievevarying

functionality.InFigure7.5,youcanseetheparameters

availablefortheTinyMCEeditor.

Figure7.5.WYSIWYGeditorparameters

[Viewfullsizeimage]



Mostoftheseparametersdonotneedtobeadjusted.Two

importantparametersthatyoumustadjust,however,arecode

cleanupandURLs:

CodecleanupmakesTinyMCEcleanthecode/HTML

elements.Usuallyyouwillwantthisparameterturnedon,

butoccasionallyifyouaretryingtopastecode,youmight

needtoturnitofftodothat.Otherwise,theeditorstrips

outelementsyouactuallywanttobethere.

YoucanselecteitherrelativeorabsoluteURLs.Youwill

almostalwayswantthistoberelative.Then,whenyou

createalinktoapageitwillnotincludetheroot.Itwillbe

/apage.htmlinsteadofwww.yoursite.com/apage.html.This

meansthatifyoueverchangeyourdomainname,your

linkswillnotworkbecausetheywillpointtotheold

domain.

Note

AnotherwaytowriteorpasteHTMLandbe

surethatitisbeingenteredproperlyisto

turntheWYSIWYGeditoroff,eitherata

site-wideleveloronauserbasis.

SometimesIwillcreateaspecialadmin

usercalled"noWYSIWYG,"whichhasits

editorturnedoff(settoNoWYSIWYG

Editor).Thisallowsmetologinandwork

inpureHTMLifIneedto.



Note



Youcanfindoutmoreabouttheparameters

andsettingsofTinyMCEat

http://help.Joomla.org/content/view/189/276/.



OtherThird-PartyEditors

TinyMCEandXStandardaretheeditorsthatcurrentlycome

withthecoreJoomlainstallation,butmanymoreeditorsare

available.Theextensionsitesofferseveral:

JCE

JoomlaFCK

WYSIWYGPro

TMEdit

JCEseemstobethemostpopularmainlybecauseitisfree.

WYSIWYGProhastheedgeinfeatures/stability,butitisa

commercialeditor,currentlycosting$47(www.wysiwygpro.com).

Note

Thislistofeditorsshowsthosethat

currentlyhaveproductsdevelopedforthe

1.0versionofJoomla.Todate,thereare

veryfeweditorsinreleasedversionsthat

willworkwithJoomla1.5,thetopicofthis

book.Hopefullyatthetimeofpublication,

newversionswillhavebeenreleased,and

youwillbeabletofindthemontheJoomla

extensionssite,extensions.Joomla.org.

Ifyouareworkingonawebsiteinwhich



youwillbeeditingalargeamountof

content,youshouldconsiderthe

commercialeditoroptions.Youwillsave

thepriceinthetimesaved.



Alloftheeditorsworkmoreorlessinthesameway.Thereare

severalsmalliconsforvariousfunctionsalongthetop.Rather

thangooverthisintoomuchdetail,let'sexaminesomecritical

pointsandsomecommonproblems:

YoumustclickSave,Apply,orCanceltoleavethe

editor.Thisisespeciallyimportantwhileeditingfromthe

frontend.

Don'tapplyfontstyle,suchasmakingafontsmaller,

tobigsectionsintheeditor.Thisshouldbedoneinthe

CSSfileofthetemplate.Thatwasthewholepointof

separatingcontentfrompresentation(seeChapter1,

"ContentManagementSystemsandanIntroductionto

Joomla")!

Alwaysmakesureyouhavethecorrectsectionand

category.IhavelostcountofthetimesIleftthisasthe

firstoneonthelistandthencouldn'tfindmycontent.

Ifsomethinghappenstoyourconnectionwhileyou

areediting,you'llloseeverything.Irecommendthat

youwritelongerpiecesofflineandcopy/paste.

BecarefulcopyingandpastingfromMSWord.When

youpastefromWord,ituseslotsofdaftCSSpeculiarto

Microsoft.Unfortunatelyitgetspastedintoo.Aneasyway

tostripitalloutistopasteintoNotepad(orotherpuretext

editor),copyagain,andthenpasteintoJoomla.Note,ifyou

dothis,paragraphreturns

willbeturnedintoline



carriagereturns
.

Ifyouhavealotofwritingtodo,anefficientwayto

doitistoactuallywriteinanHTMLeditor.Sure,you

usuallyusethemforcreatingwebpages,butinthis

situationtheymakeprettygoodwordprocessors.Agreat

opensourcechoiceisavailableatwww.nvu.com.

Whenyoufirstinstallyoursite,makesureyouhave

placed"www"atthebeginning.Thisisthemost

commoneditorerror—thattheURLofyoursitewasn't

definedproperly.

Ifthesiteadministratorinstallsaneweditor,he

shouldsetittodefaultintheglobalconfiguration.

Youhavetosetupthesectionsandcategoriesbefore

addingcontent.

TheTitleAliasisanoptionalfield.ItisusedbythirdpartySEFcomponentstoproducemeaningfulURLs.

Ifyougetacoloredbackgroundthatmakestheeditor

unreadable,that'sbecauseit'susingthesamebackgroundthat

isonthemainsite.Asimplefixistoaddthistothetemplate's

CSSinthemaintemplateCSSfile(template.css):



body.contentpane{background-color:#fff;background-image:none



We'lllookinmoredetailattheactualeditoritselfandthe

variousextraJoomlaoptionsituseslaterinthischapter.For

nowlet'smoveontolookingathowtoaddcontentarticles.

TheLeastYouNeedtoKnow

WYSIWYGstandsforWhatYouSeeIsWhat

YouGet.Itallowseditingofcontent

withoutknowledgeof(X)HTML.Several



editorsareavailableforJoomlaandcanbe

installedasplugins.



Chapter7.ExpandingYourContent:

ArticlesandEditors

Therearetwomainwaystoaddandmanagecontenttoa

Joomlasite:throughthefrontendorthroughthebackend.Part

ofthebiggestattractionofJoomlaistobeabletoeasilyadd

andeditcontentthroughaWhatYouSeeIsWhatYouGet

(WYSIWYG)editor.

InThisChapter

ThischapterbeginswithlookingatWYSIWYGandhowit

functionsinthebackendwithManagers,Administrators,and

SuperAdministrators.Itthenexamineshowauthors,editors,

andpublishersmanagecontentthroughthefrontend.

WhatisWYSIWYGediting?

Howdoyoumanagearticlesinthebackend?

Howshouldyouusemetadata?

Howdoyouaddimagesandothermediatoarticles?

Howdoyoumanagecontentfromthefrontend?

Whatisthedifferencebetweenauthors,editors,and

publishers?

Whatisarticlecheckin?



WYSIWYGEditors

You'veprobablyusedaWhatYouSeeIsWhatYouGet

(WYSIWYG)editor,butyoumightnotevenbeawarethatyou

have.Ifyou'veeverusedsomesortofeditorwhereyoucan

highlightwords,changetheirformatting,andhavethose

changesbeinstantlyvisibletoyou,thenyou'veuseda

WYSIWYGeditor.EvenMicrosoftWordisaWYSIWYGeditor

(albeitacomplicatedone)!



WYSIWYGisdifferentthanamarkuplanguage,suchas

(X)HTML.Whenyouuseaprogramminglanguage,youmust

assignstylesinsteadofjustusingabutton.Joomlaandwebbasedemail,suchasYahooandGmail,usesimpleeditors.

Figure7.1showsanexampleeditortakenfromaYahooemail

account.

Figure7.1.AYahoowebmailWYSIWYGeditor

[Viewfullsizeimage]



ThedefaultJoomlaeditorfollowssimilarprinciples,alongwith

variousformattingbuttonsthatwillbefamiliartoyoufrom

MicrosoftWord.Figure7.2showsthedefaultJoomlaeditor,

TinyMCE.

Figure7.2.DefaultJoomlaeditor—TinyMCE

[Viewfullsizeimage]



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 7. Expanding Your Content: Articles and Editors

Tải bản đầy đủ ngay(0 tr)

×