a½ Ų X ¶=ų¶=ų Ģ B Arial µn¶=ü ÜeWLAND’’’’’’ win on disableScript(adrSite)
atSuite.disable(adrSite)
return(true)
Ģ Ź @ Arial µp¶=ü% Ś3«LAND’’’’’’ win on enableScript(adrSite)
atSuite.enable(adrSite)
return(true)
Ź V µK¶AŁ0 7
E Q
^ j ¢descriptionUrl $http://q.queso.com/altTemplatePlugIn
disableScript enableScript \flAddToEditorsOnlyMenu flEditors flEnabledrelativePath at/ 3 / µP¶=ü version 1.0a1 3 " Arial ¶@©¶¶@©½ ļ3·®LAND’’’’’’ win return(atSuite.addTemplatePage())
Arial µW¶=ü Ś3LAND’’’’’’ win return(atSuite.defaultPage())
£ % Arial ¶=žė¶@~ ļ3·ØLAND’’’’’’ win return(atSuite.deleteTemplatePage())
£ ” # Arial ¶=žė¶=žō ļ3·®LAND’’’’’’ win return(atSuite.editTemplatePage())
” § ) Arial ¶AŚę¶AŚļ ļ3·±LAND’’’’’’ win return(atSuite.manageAssociationsPage())
§ Arial ¶BȶBÖ (!šLAND’’’’’’ win return(atSuite.view())
V µV¶BK
' 3
; G
V b
o {
#pluginName altTemplateaddTemplate default 0deleteTemplate ŲeditTemplate manageAssociations 4view ē ~ z . ¶=ų¶=ūś
,
<
initialConfig 2prefs EwebsiteFragment ~ ¶=ų¶AŚŪ a e Arial ¶@©¶@Ė / hNŪLAND’’’’’’ win on addTemplatePage()
local
htmlText = ""
pta = html.getPageTableAddress()
adrAtPrefs = manilaSuite.plugins.getStorageAddress("altTemplate")
on add(s)
htmlText = htmlText + s + cr
pta^.title = "altTemplate: Add Template"
if manilaSuite.editors.managingEditorTest(pta) == false
add("I'm sorry... you have to be a managing editor of this site in order to use altTemplate.")
return(htmlText)
if not defined (pta^.postArgs.templateName)
add("I'm sorry, there was no template name passed to me to create, so there's not much I can do.")
return(htmlText)
bundle // do the deed...
add("Creating template " + pta^.postArgs.templateName + "...
")
if defined (adrAtPrefs^.templates.[pta^.postArgs.templateName])
add("I'm sorry, but the template \"" + pta^.postArgs.templateName + "\" already exists, so obviously, it's tough for me to create it!")
return(htmlText)
wp.newTextObject("", @adrAtPrefs^.templates.[pta^.postArgs.templateName])
add("Template created. Redirecting to edit page...
")
mainresponder.redirect("/at/editTemplate?" + string.urlEncode(pta^.postArgs.templateName))
a ö ž Arial µ"+±¶AŚŌ @ $PLAND’’’’’’ win on defaultPage()
local
htmlText = ""
pta = html.getPageTableAddress()
adrAtPrefs = manilaSuite.plugins.getStorageAddress("altTemplate")
on add(s)
htmlText = htmlText + s + cr
pta^.title = "altTemplate"
if manilaSuite.editors.managingEditorTest(pta) == false
add("I'm sorry... you have to be a managing editor of this site in order to use altTemplate.")
return(htmlText)
bundle // build page top
add("
This is the master page for altTemplate, where you can add, edit, and delete templates, as well as attach alternate templates to messages.
") add("The template \"" + templateName + "\" does not exist, so I can't really delete it!
") return(htmlText) bundle // check to see if this is the first click, or the confirmation click... if defined(pta^.postArgs.confirmDelete) if pta^.postArgs.confirmDelete == "true" confirmDelete = true if confirmDelete == true delete(@adrAtPrefs^.templates.[templateName]) mainResponder.redirect("/at") else add("") return(htmlText) ć H $ ¬ Arial µv¶> M FLAND’’’’’’ win on disable(adrSite) local adrSiteFrag = manilaSuite.plugins.getSiteFragmentAddress("altTemplate", adrSite) if defined(adrSiteFrag^) delete(adrSiteFrag) return(true) H ® h Ī Arial ¶=’¶@¬é V &