Was this page helpful?

How to add the FCEditor Plug-in: Citations

    Table of contents
    1. 1. Installation Procedure

     

    Applies toMindTouch 9.08 to 9.12.3LicenseAll versions
    Operating SystemDocumentation TypesEditor
    Community
     

    The subpages of this one hold a homegrown fckeditor plugin, developed by Matt Bailey at www.climatelab.org, that provides a more robust implementation of footnotes/references for Dekiwiki.  Insert_Citation allows the user to insert a footnote and its related reference material via a single dialog.  Footnotes and references on the page are linked via a UID, and automatically sorted and validated after each insertion, to ensure that orphaned or incorrectly numbered foontotes/references don't happen.

    This is a bit of a hack, but it gets the job done.  Our users love it, and the quality of our in-text citations is through the roof.  I've also written an alternate version that provides self-healing of 'old' style footnotes and references (we formerly used the solution proposed here: http://developer.mindtouch.com/DekiScript/FAQ/How_do_I..._Create_footnotes_for_Deki_pages%3F ); feel free to drop me a line if you'd like me to forward that code.

    Also: this is a recent deployment, so if you use it, let me know about any bugs you find, or recommendations for improvements.

    Enjoy!

    Installation Procedure

    1. Download the attached files: fckplugin.js, Citation_Dialog.php
    2. Place Citation_Dialog.php in "/var/www/dekiwiki/skins/common/popups/"
    3. Find a toolbar button image file, and rename it to insertreference.png
    4. Create a new folder in "/var/www/dekiwiki/editor/fckeditor/core/editor/plugins" called "insertcitation"
    5. Add fckplugin.js and insertreference.png to the "insertcitation" folder
      1. Note: If you are using the default VMWare install, you will need to replace "FCKConfig.CommonPath" on line 30 of the .js file with "FCKConfig.DekiCommonPath", or else you will have problems when you click on the Insert Citation toolbar button.
    6. Log into DekiWiki web interface as administrator, click on "Control Panel", and then "Editor." Paste "FCKConfig.Plugins.Add( 'insertcitation' ) ;" into the "Set FCKEditor Configuration" box.
    7. In the DekiWiki web interface, click on "Tools", then "Templates." On the screen that loads, click the "New" button to create a new template. Create both templates as listed on the Templates subpage.
    8. Open "/var/www/dekiwiki/editor/fckeditor/editor/fckconfig.js"
      1. Find the line that says "FCKConfig.ToolbarSets["Default"] = [ . . . "
      2. This section defines what shows up in your toolbars.
      3. Add " ,'Insert_Citation' " wherever you feel it is appropriate.
    9. Restart
    Was this page helpful?
    Tag page
    Viewing 4 of 4 comments: view all
    i am stuck. how do i get the icon/script to display in the editor of mindtouch. The install plugin page of the fckeditor is the way i followed but i guess i am missing to add it to some configuration file besides fckconfig.js in ...editor/fckeditor/core ... wish i can make that work on our Wiki for the physicists
    Posted 07:54, 13 Jul 2009
    I am in the same situation as baum. I cannot get this to show up on the fckeditor toolbar. Anyone?
    Posted 16:17, 2 Aug 2009
    Well, I got the toolbar button to display. You have to do two things:
    1) Add the plugin to FCKEditor, which you can do under Control Panel->Editor in DekiWiki. Paste in the following text:
    FCKConfig.Plugins.Add( 'insertcitation' ) ;
    2) Modify the toolbar settings for FCKEditor to add the "Insert_Citation" button (you'll see what I mean when you open the file). This file is located, by default, at: /var/www/dekiwiki/editor/fckeditor/editor/fckconfig.js

    By the way, the plugin goes here, for some odd reason:
    /var/www/dekiwiki/editor/fckeditor/core/editor/plugins
    You MUST create a directory called "insertcitation" in that plugins directory, which MUST include the .js and .png files.

    That said, after getting the button to appear, I still have not managed to get the .php file to load correctly after it is pressed.

    Update: Well, it turns out, to get the popup button to appear, you have to replace "FCKConfig.CommonPath" on line 30 of the .js file with "FCKConfig.DekiCommonPath". That will allow the page to load correctly, assuming that you placed it in the correct location. You can test whether you have placed it in the correct location by navigating to:
    http://WIKIADDRESS/skins/common/popups/citation_dialog.php
    and seeing whether it loads.

    Unfortunately, I'm still having problems with the template portion. It does not insert notes correctly.

    Update2: Well, I finally got it working. The code on the Templates page here was messed up - I will update it. Now that it's working, this is a very nice addon - good work!!

    Update3: I updated the instructions above. edited 23:48, 17 Nov 2009
    Posted 22:09, 17 Nov 2009
    On Windows Server 2003/2008, the path to put the PHP file should be C:\Program Files (x86)\MindTouch\MindTouch\web\skins\common\popups

    And the path to put the js/png file is: C:\Program Files (x86)\MindTouch\MindTouch\web\editor\fckeditor\core\editor\plugins edited 13:53, 3 Dec 2009
    Posted 13:49, 3 Dec 2009
    Viewing 4 of 4 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by