Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

9/24/2008 9:24:01 AM
FLWCOM-jwdavidson
8/5/2008 3:41:13 AM
193.53.87.89
8/5/2008 2:10:50 AM
193.53.87.89
8/5/2008 12:41:47 AM
193.53.87.89
8/4/2008 11:09:01 PM
193.53.87.89
List all versions List all versions

RSS feed for the FlexWiki namespace

Related Topics

John Davidson Blog
.

FleXhtmlImplementation

Monday, September 22, 2008 - 7:46 AM

Summary
Requires
FlexWiki build 2.0.0.163 and plugin for GoogleAd:PluginLib.PluginLibraryContents
SeeAlso

Usage

The PluginLib.PluginLibraryContents allows the insertion of a section of XHTML code consisting of javascript and html client-side code into a topic. The code can be set to run automatically by providing an initialization routine and it can be personalized by providing users with details to set up their own versions of variables. This plugin will support anything you may wish, with the exception of updating topic contents, much like a widget in MAC OS X or Yahoo, or an iGoogle gadget. The sample provided is for an implementation of a Traffic Camera insert.

 @@OdsWiki3.FleXhtml(namespace.GetTopicInfo("TrafficCamImplementation"), 
      namespace.GetTopicInfo(GetPersonalization.ToString), "TrafficCamDefault",
      "TrafficCamScript", "TrafficCamHTML", "TrafficCamPersonalization", 
      "specialFirstLoad()")@@
 :With: PersonalizationSupportLibrary

FleXhtml Insert Definition

The WikiTalk call to FleXhtml has 7 parts to it:

  1. The TopicInfo for the topic containing the variables list in 3, 4, 5 below and the implementation of the initialization routine given in 7 below.
  2. The TopicInfo for the topic containing personalization data for the variable listed in 6 below. The definition of the current user is determined by the PersonalizationSupportLibrary if there is an identifiable user.
  3. The name of the property containing the default list of variables and their values in the TopicInfo specified in 1 above
  4. The name of the property containing the javascript in the TopicInfo specified in 1 above
  5. The name of the property containing the html in the TopicInfo specified in 1 above
  6. The name of the property containing the personalization values for the required variables defined in 3 above, to be located in the TopicInfo specified in 2 above
  7. The name of the property containing the name of the initialization javascript method defined in 4 above

The topic TrafficCamImplementation shows how items 3, 4, 5 and 7 are implemented. PluginLib.TestUser shows the implementation of item 6. It is important when creating the properties that the '[' (opening square bracket) is immediately after the ':' (full colon) of the property name with no spaces, e.g. ":[" the data should start on a new line and the closing square bracket for the property should be on a line by itself. It is possible to use indents in the properties, but it will display as sample code where indented (I do not recommend using spaces or tabs at the start of a line in these properties).

An actual working sample is found at PluginLib.TestTrafficCam

FlexWiki Integration

The binary plugin is integrated into FlexWiki by putting an entry into the flexwiki.config file as shown below. The administration section of the wiki has a verification section that provides a message if the plugin loads correctly.

 <Plugins>
     <Plugin>FleXhtml</Plugin>
 </Plugins>

Additional Considerations

The reference to OdsWiki3 is just the namespace used in the source code for the plugin.

Permalink, Talkback

FileLockingImplementation

Monday, September 22, 2008 - 7:33 AM

Summary
Requires
FlexWiki build 2.0.0.159

Individual File Locks now available

This build includes a new administration page, TopicLocks.aspx, that will show the status of all file locks in a Namespace. If the user has the permission HasManageNamespacePermission then the page will also display a button for each topic that will allow the topic to be locked or unlocked as appropriate. See the screenshot below for a sample

The implementation ensures, by additional software validations, that locks cannot be set unless the user has successfully authenticated as a user with the appropriate authorizations. this allows a regular user to view the TopicLocks.aspx without the ability to make any changes (but the user would have to manually enter the link in the browser address bar).

Right Border Links to Administrative Pages

The default _NormalBorders now includes links to the default administration page and to the new Topic Locks page. These links are only available if the user is authorized with HasManageNamespacePermission. T

The code for the new default right border is included below. This is so that users can upgrade their existing border definitions to take advantage of the new features. The new portion of code starts with namespace.HasManageNamespacePermission.IfTrueIfFalse and continues until ending with the line }, { "" }), just before the section for Recent Topics.

RightBorder:{
aTopic|
  [
  request.IsAuthenticated.IfTrue
  {[
    "||{C2+}",
    "Welcome '''", 
    request.AuthenticatedUserName,
    "'''",
    "||",
    Newline,
    request.CanLogInAndOut.IfTrue
    {[        
      "||",
      with (Presentations)
      {
        Link(federation.LinkMaker.LinkToLogoff(aTopic.Fullname), "Log off", "Log off.")
      },
      "||",
      Newline
    ]}
    IfFalse{""},
  ]}
  IfFalse
  {
    [
      "||{C2+}Not logged in.||", 
      Presentations.Link(federation.LinkMaker.LinkToLogin(aTopic.Fullname), "Log in", "Log in."),
      "||"
    ]
  },
  namespace.Description.IfNull
  { 
    ""
  } 
  Else
  {
    [ Newline, namespace.Description ]
  },
  Newline, "----", Newline, 
  federation.About,
  Newline, "----", Newline,
  federation.Application("AlternateStyles").IfNull
  {
    ""
  }
  Else
  {
    [ 
      "||{T-}'''Change Style'''||",
      Newline,
      "||",
      Presentations.FormStart("", "get","onsubmit='SetActiveStylesheet(this.styles.options[this.styles.selectedIndex].value);return false;'"),
      Presentations.ComboSelectField("styles", ["Choose here."].Append(federation.Application("AlternateStyles")),null,[""].Append(federation.Application("AlternateStyles"))),
      Presentations.ImageButton("goButton", federation.LinkMaker.LinkToImage("images/go-dark.gif"), "Select alternate stylesheet"), 
      Presentations.FormEnd(),
     "||"
    ]
  },
  Newline, "----", Newline,
  namespace.HasManageNamespacePermission.IfTrueIfFalse
  ({
     [
       "*\"\"FlexWiki\"\" Administration*", Newline,
       MenuItem("Show Main FlexWiki Administration Page", "Administration Page", federation.LinkMaker.SimpleLinkTo("admin/default.aspx")),
       MenuItem("Show Topic Lock Management Page", "Topic Locks", federation.LinkMaker.SimpleLinkTo("admin/TopicLocks.aspx")),
       Newline, "----", Newline,
     ]
  }, { "" }),
  "*Recent Topics*",
  Newline,
  request.UniqueVisitorEvents.Snip(15).Collect
  { each |
    [
    Tab, 
    "*",
    Presentations.Link(federation.LinkMaker.LinkToTopic(each.Fullname), each.Name),
    Newline
    ]
  }
  ]
}

Considerations for Use with Builtin Topics or SQL Server

Builtin topics such as NormalBorders or ContentBaseDefinition are lockable, if they have been modified from there default values and exist in the file system store.

Topics stored in Sql Server are not lockable at this time. The Sql Server store would require considerable to modification to allow locking, and will not be tackled at this time. Sql Server topic locks are functional as of build 2.0.0.200

Possibility for Additional Feature

It would be possible to add functionality to the topic locks page so that a Delete Topic button could be implemented as well as potentially a Delete Namespace button.

Permalink, Create Talkback Topic

Archived Blog Entry Links

  1. FleXhtmlImplementation :Monday, September 22, 2008 - 7:46 AM
  2. FileLockingImplementation :Monday, September 22, 2008 - 7:33 AM
  3. NewTestCSS :Wednesday, July 23, 2008 - 10:03 AM
  4. ToDoListManagementFeature :Tuesday, November 13, 2007 - 9:09 AM
  5. OdsWikiPluginRelease1 :Friday, October 26, 2007 - 6:21 PM
  6. TableOfContentsImplementation :Friday, October 26, 2007 - 6:36 AM
  7. ThreadedMessageImplementation :Friday, October 19, 2007 - 7:58 AM
  8. ThreadedMessageForumDevelopementUpdate :Friday, October 19, 2007 - 7:48 AM
  9. FlexWikiAsThreadedMessageBoard :Tuesday, October 09, 2007 - 4:59 PM
  10. FlexWikiPictureGallery :Sunday, October 07, 2007 - 6:40 AM
  11. FlexWikiBlogging :Friday, October 05, 2007 - 5:53 PM

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics