[mlimg][xlang:en]
- Templates Admin Module -

SUMMARY:

A module should be replaced "template manager" in system module.

I've made this module for recovering the features should be gifted in original DB template system.

I recommend tplsadmin module to all xoopsers with confidence.



DESCRIPTION:

- No hacks needed
- Easy to see differences of templates wholely
- Show "diff" from default or file
- Easy to copy&delete from any DB-set/file to any DB-set
- Easy to find the name of the target template (HTML comment or div border)
- Easy to edit the template just click links named the template in front side
- Generate specifications for template's variables dynamically as Dreamweaver Extension
- You can preview the site just by edit the template files (mainfile patch needed)



USAGE:

Just install it.
You can operate templates with no documents.

- To know the name of the template
-- go to "Cache Hookings" in tplsadmin
-- push "Implant comments" or "Implant div tags"
-- go to and display public pages of your site
-- you can find the template name as a HTML comment or a link in bordered div

- To get specifications for template's variables of your site
-- go to "Cache Hookings" in tplsadmin
-- push "Implant logics to collect template variables"
-- go to front sides of your site
-- go to and display public pages of your site
-- you can find the number of specifications as "Template vars info files:"
-- if enough, "Get info of template variables as DreamWeaver Extensions"
-- don't forget pushing "Normalize compiled template caches" after outputting
-- extract zip or tar.gz
-- run Macromedia Extension Manager
-- execute the files named (module_name).mxi
-- install them
-- you can see assigned names of template-variables as Dreamweaver's Snippets
-- you can also see assigned data in the variables in right side of snippets

- To download template set
-- go to "Cache Hookings" in tplsadmin
-- select DB-template set you want
-- push zip or tar.gz

- To upload templates into DB-template set
-- create a zip/tar.gz archive including template files
-- all files in any paths can be recognized
-- go to "Cache Hookings" in tplsadmin
-- select DB-template set you want
-- specify the archive

- To use the feature of "Edit and Preview"
-- edit mainfile.php (insert a line just after common.php)
[code]
	if (!isset($xoopsOption['nocommon'])) {
		include XOOPS_ROOT_PATH."/include/common.php";
		include XOOPS_ROOT_PATH."/modules/tplsadmin/include/autoupdate.inc.php" ;
	}
[/code]
-- go to admin -> system -> preferences -> general setting
-- turn "Update module template .html files ..." on
-- put template files in the path of /themes/(your_theme)/templates/
-- edit the template files in the path
-- you can preview your local site with new templates.



COPYRIGHT:

I do not insist on the right of these codes, and don't guarantee.

I use PEAR::Text/Diff.
The rights of this code is under license of PEAR, perhaps.
Special thanks to the author - Geoffrey T. Dairiki -.

I use PEAR::Archive/Zip.
The rights of this code is under license of PEAR, perhaps.
Special thanks to the author - Vincent Blavet -.






[/xlang:en]
[xlang:ja]

׻

ƥ⥸塼Υƥץ졼ȴ˼ä⥸塼롣

äȤ䤹뤿˺줿ϤDBƥץ졼Ȥǥǥݤ˽äƤΤǡäƤ٤ǽ᤹˺ޤ

Υ⥸塼֤ᤷͤϡXOOPSΥƥץ졼ȥƥϻȤʪˤʤʤ᡹˸¤äƤޤäǥʡǤ⥸塼ԤǤ̥桼Ǥ⡢XOOPSѤƤФơäƤǤޤ



Ĺ

- Hack
- Ƚ䤹⥸塼Υƥץ졼Ⱦɽ
- ǥեȥƥץ졼Ȥ١եȤκʬɽ
- ⥸塼̤Υƥץ졼ȥåȥԡ
- åܥåǸ̤˻Ǥƥץ졼ȥԡ
- ŪȤƥץ졼̾Τ뤿ˣĤˡ
- ¦β̤ľܥƥץ졼Խ̤뤿Υ󥯤
- ƥץ졼ȤǤɤΥƥץ졼ѿѲǽΤ뤿μʤ
- Υƥץ졼ѿˤɤΤ褦ͤ󤵤뤫Τ뤿μʤ
- ơΥեԽǡưŪ˥ƥץ졼Ȥ뵡ǽ



Ȥ

̤Υ⥸塼Ȥơ󥹥ȡ뤷Ƥ
Ǥ

˥塼˥⥸塼̾¤ӤޤΤǡƥץ졼Ȥ⥸塼򤷤Ƥ顢ԡԽԤäƤƥץ졼ȤΥԡԤϡоݤȤʤƥץ졼ȤåƤɬפޤŪˡƥץ졼ȥåñ̤ǤȤʤޤΤǡƱǤΥå֤ǧƤ

ƥץ졼ȥåȤαˡǡ䤬᤹Τϡdefault򥫥ޥˡǤ󡢰Υǥեȥƥץ졼ȥåȤ⡢defaultפȤޤơɬפ˱ơ̤Υƥץ졼ȥåȤ˥ХååסʣˤԤäƤ

뤳Ȥǡ⥸塼륢åץǡȤȤäɤʤޤ

⥸塼뤬ƥץ졼Ȥλͤѹˤ⤪ʤޤ󤷡ˤäƥǥեȤäƤޤäΤǤСХååפƥץ졼ȥå¦饳ԡ᤻Ф褤ΤǤ


tplsadminˤϡ¾ˤƥץ졼Ȥ˴ؤ뵡ǽ¿ޤ

ŪΥƥץ졼̾Τ
XOOPSɽ̤򸫤Ƥ⡢ɤʬɤΥƥץ졼ȤˤϤȽޤ󤬡֥åեåפξΣĤΥܥ󤤤줫򲡤Ȥǡɽ¦̤˥ƥץ졼̾ɽ뤳ȤǤ褦ˤʤޤ
HTMLȡסdivȡפΤ򤪻

ƥץ졼ѿΤ
ƥץ졼ȤˡɤѿɤΤ褦˥󤵤줿Τ뤿ˤϡޤ֥åեåפ֥ƥץ졼ѿåߡפԤޤˤäơ塢Ȥθ¦ɽ줿ʡ᤽Υƥץ졼Ȥ줿ˤˡޤ줿å󤵤줿ѿΰtemplates_c/ ΥեѤƤޤ
ѤǡνˡϿͤޤǼƤΤϡDreamweaverѤSnippetsϿExtensionȤƤνϤǤŪȤƥץ졼Ȥ¦̤Ǥ顢֥åեåפ֥ƥץ졼ѿDreamWeaverѤ˼פȤơ֤ɤޤ֤षơ󥹥ȡ뤹Сƥƥץ졼ȥեˤɤѿɤΤ褦˥󤵤Ƥ뤫DreamweaverΤ뤳ȤǤ褦ˤʤޤ
󡢥˥ڥåȤǤ顢֥륯å뤳Ȥǡ<{$xoops_url}> ȼưŪϤޤ

ƥץ졼ȤΥåץɤȥ
ƥ⥸塼Υƥץ졼ȴȰ㤤tplsadminǤϡƥץ졼ȥåȤΥɤȥåץɤ˥ݡȤƤޤ衢DBƥץ졼ȤϡեåȤʹ¤ĤΤʤΤǡɤǤ륢֤ˤեåȤ˳ǼƤޤषƽ褿ǥ쥯ȥ򤽤ΤޤޡΥơޥեľˡtemplates/ Ȥ֤С˼ưǽоݤˤʤޤ
ȵȤʤ륢åץɤ⡢ziptar.gzˤळȤǲǽǤŪˤϥեåȤʹ¤򥤥᡼Ƥޤ⥸塼֥åʤɤǳع¤äƤƤ⡢ŪˤåץɤϤǤ
󡢴¸Υƥץ졼ȥåȤ򥢥åץȤ뤳ȤǤޤΥåȤäƤʤƥץ졼ȤǤп˺졢äƤƥץ졼ȤǤо񤭤ޤ

ƥץ졼ȤμưǽȤ
FILEƥץ졼ȤͥǤ롢֥եԽǥȤȿǤפȤǽDBƥץ졼ȥƥǤѤ뤳ȤǤޤ
mainfile.phpˡʲΤ褦˰ԤɲäƤ
[code]
	if (!isset($xoopsOption['nocommon'])) {
		include XOOPS_ROOT_PATH."/include/common.php";
		include XOOPS_ROOT_PATH."/modules/tplsadmin/include/autoupdate.inc.php" ;
	}
[/code]
common.php ɹľǤ뤳ȤפǤifʸγ¦ˤ֤ʤǤ
Ȥϡ֥ƥסְפˤơthemes/ ǥ쥯ȥ꤫μưåץǡȤͭˤפONȤ뤳Ȥǡơޥե벼֤줿ƥץ졼ȥեι֤Ĵ٤ơưŪDBΥƥץ졼Ȥ֤ޤ
ĤޤꡢơޥեԽǡƥץ졼Ȥޤ᤿ŪʥǥǽȤʤ櫓Ǥ
ʤƥץ졼ȥե֤ϡơtemplatesǥ쥯ȥľǤdefaultơޤǤС
XOOPS_ROOT_PATH/themes/default/templates/
Ȥʤޤ
ɡåץɵǽϢȤơͭ˳ѤƤ



ʤ

ΥʬˤĤƤϡä˲ĥޤ󡣤ͳˤȤ

PEAR::Text/Diff  PEAR::Archive_Zip ѤƤΤǡʬˤĤƤϡPEARΥ饤󥹤ͭˤʤǤ礦ʤ⤷ȥ⥸塼Τ⤷ޤ

Ȥ⤢졢Text_DiffѥåƤ줿 Geoffrey T. Dairiki 󤪤ӡArchive_ZipѥåƤ줿 Vincent Blavet ˴դޤ


ĿŪʥ

XOOPSDBƥץ졼Ȥˤ͡߷ץߥޤŪ礭Τ֥å֤Ʊ̾ƥץ졼ȤΰǤۤʤ֥åƱΥƥץ졼̾򻲾ȤƤƤ⡢tplfileơ֥Ͽޤ⡢refidȤIDͤblockidȤϿ졢κݤˤ⡢refidȤʤޤ
ºݤɽǤϡޤǥƥץ졼̾Ѥ뤿ᡢΥƥץ졼ȤԽƤ⡢ȿǤʤȤФФޤȤꤢβ뤿ˡܥ⥸塼ǤϡƱե̾Υƥץ졼ȤˤĤơ(2)ʤɤɽƤޤ

ĤǤ˥ƥץ졼ȴϢΥơ֥߷׾Υߥ򤳤󤷤Ƥޤ
tpl_fileUNIQUE KEYǤʤʻȻ̾ΤߤˤʤΤUNIQUEɬܡ̤INDEXƤʤ
tplfileơ֥tplsourceơ̵֥̣ʬΥXOOPSΤǤ
tplsourceơ֥tpl_idPRIMARY KEYǤʤɬJOINΤˡġ
tpl_refidեɤ¸ߡʷ֤ˤʤ뤬ե̾򥭡Ȥ٤
tpl_moduleINDEXƤʤʤ餫λȤϤۤȤɤʤ
tplset_nameUNIQUE KEYǤʤ


TODO
- Dream Weaver Extension ʳΥƥץ졼ѿϵǽ
- ƥץ졼Τγѵǽʥ⥸塼ȤƧ߱ۤơ
- ƥץ졼ȹ¤ν
- ƥץ졼ȴϢơ֥ALTER TABLE
- ϢڤƤޤäblockƥץ졼ȤȤϢ뵡ǽ


[/xlang:ja]

CHANGELOG:


2006-03-24 1.01 modified comment/div implantation skips theme.html
2006-03-18 1.00 full model public release
                added "auto update" templates from themes/(your_theme)/templates/
                added downloading templates
                added uploading/overwriting templates
                added HTML-implantation for recognizing template names
                added logic-implantation collecting template variables
                added outputting templates variable infos as Dreamweaver Snippets
2005-02-03 0.20 updated module icon (thx argon)
                fixed menu listing
                modified the behavior on deleting DB templates
2005-12-30 0.13 added french language files (thx marco)
2005-12-22 0.12 modified some wrong documents :-)
2005-12-22 0.11 fixed some typos
2005-12-21 0.10 the 1st implementation


