Skip to main content
jP_web_icon

The jPoint Project Blog

Go Search
Home
jPoint Docs
Examples
Blog
  

jPoint > The jPoint Project Blog > Posts > Installing jPart.TextCounter
Installing jPart.TextCounter

To use jPart.TextCounter for your SharePoint blog comment body field do the following:

For remote hosted javascript

  1. Open to the page where you see the Add Comment section

  2. Add a Content Editor webpart to the bottom and paste the following code into the source

    <script type="text/javascript" src="//sharejpoint.googlecode.com/files/jPointLoader-0.7-expanded.js" ></script>

    <script type="text/javascript" src="//www.sharejpoint.com/src/jPoint/webparts/jPart.TextCounter.js"></script>

  3. Click the jPart Edit button and customize as follows:
    1. Replace SiteURL with the location of your blog
    2. Change other options if you like

 

 

  1. Click Update
  2. Done

For hosting the script files locally

  1. Download from CodePlex the complete jPoint-0.7.zip
    1. http://jpoint.codeplex.com
    2. Click Downloads tab
    3. Unzip
    4. Place the src directory content into a SharePoint library.
      1. example /site/lib/src where lib is the SharePoint library and src is a subdirectory
  2. Download the text counter jPart
    1. http://www.sharejpoint.com/src/jPoint/webparts/jPart.TextCounter.js
    2. Place file in /site/lib/src/webparts/
  3. Update /site/lib/src/ jPointLoader-0.7-expanded.js
    1. Change

      if (typeof jWebpart.prototype.IncludePath === "undefined") jWebpart.prototype.IncludePath = "" //empty string here will cause default path to Google CDN to be used. local file location example: "/src/jpoint/";

      if (typeof jWebpart.prototype.JQueryFile === "undefined") jWebpart.prototype.JQueryFile = ""; //empty string here will cause default path to Google CDN to be used

    2. To

      if (typeof jWebpart.prototype.IncludePath === "undefined") jWebpart.prototype.IncludePath = "/site/lib/src/" //empty string here will cause default path to Google CDN to be used. local file location example: "/src/jpoint/";

      if (typeof jWebpart.prototype.JQueryFile === "undefined") jWebpart.prototype.JQueryFile = "/site/lib/src/jquery.js"; //empty string here will cause default path to Google CDN to be used

  4. Add the jPart to the comment page as above, but this time paste these lines of code into the webpart

    <script type="text/javascript" src="/site/lib/src/jPointLoader-0.7-expanded.js" ></script>

    <script type="text/javascript" src="/site/lib/src /webparts/jPart.TextCounter.js"></script>

  5. Continue to configure as above.

     

Comments

There are no comments yet for this post.