|
|
|
|
|
|
|
|
|
|
|
|
|
|
jPoint > The jPoint Project Blog > Posts > Installing jPart.TextCounter
|
11/11/2009To use jPart.TextCounter for your SharePoint blog comment body field do the following:
For remote hosted javascript
Open to the page where you see the Add Comment section
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>
Click the jPart Edit button and customize as follows:
- Replace SiteURL with the location of your blog
- Change other options if you like
- Click Update
- Done
For hosting the script files locally
Download from CodePlex the complete jPoint-0.7.zip
- http://jpoint.codeplex.com
- Click Downloads tab
- Unzip
Place the src directory content into a SharePoint library.
- example /site/lib/src where lib is the SharePoint library and src is a subdirectory
Download the text counter jPart
- http://www.sharejpoint.com/src/jPoint/webparts/jPart.TextCounter.js
- Place file in /site/lib/src/webparts/
Update /site/lib/src/ jPointLoader-0.7-expanded.js
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
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
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>
Continue to configure as above.
|
|
|
|
|
|
|
|
|
|
 |
 |
 |
 |
|