Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-02-13 17:45:04

adam
New member
Registered: 2006-02-09
Posts: 4

twiki integration how to

for use with the default pattern skin in twiki 4.0

look at the newbie guide,
do this:
1. download and unpack xinha in the root dir of your webser in the default folder (xinha)
2. make the my_config.js as the newbie guide suggests and put it in the xinha folder
3. backup your edit.pattern.tmpl (in twiki/templates)
4. use this for your new edit.pattern.tmpl

=======from below this line
%TMPL:INCLUDE{"twiki"}%



%TMPL:DEF{"templatescript"}%
<script type="text/javascript" src="%PUBURLPATH%/%TWIKIWEB%/TWikiJavascripts/twiki_edit.js"></script>
%TMPL:END%

  <script type="text/javascript">
      _editor_url  = "/xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
          _editor_lang = "en";      // And the language we need to use in the editor.
            </script>
              <script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/my_config.js"></script>

%TMPL:DEF{"templatecustomstyle"}%%TMPL:END%



%TMPL:DEF{"toolbar"}%<div class="patternTop">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="patternToolBar">
<span id="edithelpshow" class="twistyMakeVisible"><a href="#" class="twistyTrigger">%ICON{toggleopen-small}%<span class="twikiLinkLabel">%MAKETEXT{"Show formatting help"}%</span></a></span><span id="edithelphide" class="twistyHidden twistyMakeVisible"><a href="#" class="twistyTrigger">%ICON{toggleclose-small}%<span class="twikiLinkLabel">%MAKETEXT{"Hide formatting help"}%</span></a></span> 
</td>
</tr>
</table>
</div>
<div class="patternToolBarBottom"></div>
%TMPL:END%


%TMPL:DEF{"bodyclassname"}%patternNoViewPage patternEditPage%TMPL:END%



%TMPL:DEF{"titleaction"}%%MAKETEXT{"(edit)"}% %TMPL:END%



%TMPL:DEF{"titlehelp"}% %TMPL:END%



%TMPL:DEF{"webaction"}%%MAKETEXT{"Change topic"}%%TMPL:END%



%TMPL:DEF{"simpleheader"}%
---+ <nop>%TOPIC% %MAKETEXT{"(edit)"}%%TMPL:END%



%TMPL:DEF{"syntaxhelp"}%%INCLUDE{"%TWIKIWEB%.WikiSyntaxSummary"}%%TMPL:END%


%TMPL:DEF{"topicaction"}%%IF{ "context RevCommentPluginEnabled" then="<p><label for='comment'>Summary of changes</label> <input class='twikiEditComment' type='text' style='width:50%' name='comment' id='comment' /> <a target='RevComment' onclick='return launchWindow(\"%TWIKIWEB%\",\"RevComment\")' href='#%MAKETEXT{"Opens page in new window"}%' title='' >%MAKETEXT{"help"}%</a><br /></p>" else=""}%
<div class="patternTopicAction"><div class="patternSaveOptions"><span class="patternSaveOptionsContents">
<input type="checkbox" class="twikiCheckbox" title="Creates a new topic revision when saving" id="forcenewrevision" name="forcenewrevision" %FORCENEWREVISIONCHECKBOX% /><label for="forcenewrevision">%MAKETEXT{"Force new revision"}%</label> <a target="ForceNewRevision" onclick="return launchWindow('%TWIKIWEB%','ForceNewRevision')" href="#%MAKETEXT{"Opens page in new window"}%" title='%MAKETEXT{"Read new revision help text in new window"}%' rel='nofollow'>%MAKETEXT{"help"}%</a></span></div>
<div class="patternActionButtons">
<input type="submit" class="twikiSubmit" name="action_save" id="save" %MAKETEXT{"value='Save' accesskey='s'"}% />%TMPL:P{"sep"}%<input type="submit" class="twikiButton" name="action_quietsave" id="quietsave" %MAKETEXT{"value='Quiet save' accesskey='q'"}% />%TMPL:P{"sep"}%<input type="submit" class="twikiButton" name="action_checkpoint" id="checkpoint" %MAKETEXT{"value='Checkpoint' accesskey='k'"}% /> %MAKETEXT{"or"}% <input type="submit" class="twikiButton" name="action_preview" id="preview" %MAKETEXT{"value='Preview' accesskey='p'"}% /> %MAKETEXT{"or"}% <input type="submit" class="twikiButton" name="action_cancel" id="cancel" title='%MAKETEXT{"Cancel editing and discard changes"}%' %MAKETEXT{"value='Cancel' accesskey='c'"}% /></div><div class="patternAccessKeyInfo"><a href="#%MAKETEXT{"Opens page in new window"}%" onclick="launchWindow('%TWIKIWEB%', 'AccessKeys'); return false;">%MAKETEXT{"Access keys"}%</a>: %MAKETEXT{"S = Save, Q = Quiet save, K = Checkpoint, P = Preview, C = Cancel"}%</div></div>%TMPL:END%



%TMPL:DEF{"content"}%
%TMPL:P{"simpleheader"}%
%TMPL:P{"toolbar"}%<div id="edithelptoggle" class="twikiHelp twistyHidden twistyRememberSetting">%TMPL:P{"syntaxhelp"}%</div>
<div class="patternFormHolder">
<form name="main" action="%SCRIPTURLPATH{"save"}%/%WEB%/%TOPIC%" method="post">
<textarea id="topic" name="text" rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%" style='%EDITBOXSTYLE%' onkeydown='handleKeyDown(event)'>%TEXT%</textarea>
<input type="hidden" name="originalrev" value="%ORIGINALREV%" />
<input type="hidden" name="skin" value="%URLPARAM{"skin"}%" />
<input type="hidden" name="cover" value="%URLPARAM{"cover"}%" />
<input type="hidden" name="formtemplate" value="%FORMTEMPLATE%" />
<input type="hidden" name="templatetopic" value="%TEMPLATETOPIC%" />
<input type="hidden" name="topicparent" value="%TOPICPARENT%" />
<input type="hidden" name="newtopic" value="%NEWTOPIC%" />
<input type="hidden" name="cmd" value="%CMD%" />
<div class="patternSig">
<label for="sig" class="twikiGrayText">%MAKETEXT{"Your signature to copy/paste:"}%  </label><input size="41" name="sig" type="text" readonly="readonly" title='%MAKETEXT{"Select, copy and paste your signature text to the bottom of your entry"}%' id="sig" value="-- <nop>%WIKIUSERNAME% - %DATE%" /></div>
%FORMFIELDS%
%TMPL:P{"topicaction"}%
</form>
</div>
<div class="twikiHelp twistyMakeHidden">%TMPL:P{"syntaxhelp"}%</div>
%TMPL:END%



%TMPL:P{"page"}%


==========dont include this line or below

then press edit, it will hopefully work smile

Offline

Board footer

Powered by FluxBB