Pages

Showing posts with label plugin. Show all posts
Showing posts with label plugin. Show all posts

Friday, December 12, 2014

Last Modified Report

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Generate report based user name, content class, and last modified date
  2. Generated report can be saved to a CSV format

Accessibility
  • In SmartTree, Start -> Administer Content Classes, action menu, Last Modified Report
  • In SmartTree, Start -> Administer Content Classes -> [Content Class Folder] -> [Content Class], action menu, Last Modified Report

Wednesday, September 10, 2014

RedDot CMS Date Conversion in MS 11

Since COM and DCOM is going away in Management Server 11, the following RedDot date conversion code using "RDCMSAsp.RDPageData" may not work.

ASP (From RQL Manual)
...
' From an RQL assign a value to a variable
OldDate = EinObjekt("changedate")

' Convert value by calling the DecodeDate function
' and output in both variants.
response.write "Date from attribute=" & OldDate & " --> Convert date=" & DecodeDate(OldDate)
...

Function DecodeDate(OldDate)
    Dim objIO As Object                              ' Define object
    Set objIO = CreateObject("RDCMSAsp.RDPageData")  ' Create object
    DecodeDate = objIO.decodedate(OldDate)           ' Convert number into date
End Function

Here are the new code that should work in all versions.

ASP
Function ConvertToRedDotDate(DateObject)
    ConvertToRedDotDate = DateDiff("d","12/30/1899", DateObject)
End Function

Function ConvertFromRedDotDate(RedDotDate)
    Dim DateObj, Int_Days
    DateObj = "12/30/1899"
    Int_Days = Int(RedDotDate)
    DateObj = DateAdd("d",RedDotDate,DateObj)
    DateObj = DateAdd("s",(RedDotDate-Int_Days)*86400,DateObj)
    ConvertFromRedDotDate = DateObj
End Function

C#
DateTime DecodeFromOADate(double OADate)  
{  
    return DateTime.FromOADate(OADate);  
}  
  
double EncodeToOADate(DateTime RegDate)  
{  
    return RegDate.ToOADate();  
}  

JavaScript
function ConvertToRedDotDate(DateObj)
{
    // day in milliseconds
    var DAY_IN_MILLISECONDS = 1000 * 60 * 60 * 24;
    var BEGINING_DATE_MIllISECONDS = new Date(1899,11,30).getTime();

    var DateObj_Milliseconds = DateObj.getTime();

    return Math.round(Math.abs(DateObj_Milliseconds - BEGINING_DATE_MIllISECONDS)/DAY_IN_MILLISECONDS);
}

function ConvertFromRedDotDate(ReddotDate)
{  
    var days = Math.floor(ReddotDate);
    var milliseconds = Math.round((ReddotDate-days)*86400000);
    var adjusted_days_in_millseconds = (days-25569) * 86400000;
    var RetDate = new Date();
    RetDate.setTime(adjusted_days_in_millseconds + milliseconds);
    var ajusted_minutes = RetDate.getTimezoneOffset();
    RetDate.setMinutes(RetDate.getMinutes() + ajusted_minutes);
 
    return RetDate;  
}

Thursday, May 9, 2013

Evolution of RQL and Management Server Plugins

In the Beginning

There was COM using VB, but susceptible to server timeout in large operations and cannot cancel the server side operation once it has started.

Set objIO = CreateObject("RDCMSASP.RdPageData")
objIO.XmlServerClassName = "RDCMSServer.XmlServer"
xmlData = "<IODATA sessionkey=""" & session("sessionkey") & """ loginguid=""" & session("loginguid") & """><PAGE action=""load"" guid=""" & strTreeGuid & """/></IODATA>" 
xmlData = objIO.ServerExecuteXml (xmlData, sError)
' parse that xmlData

Shortly After

There was COM using C#. It is a cleaner language, but one has to relax COM security for this to work. Also, it is susceptible to server timeout in large operations and cannot cancel the server side operation once it has started.

// look up how to transfer asp session to aspx session
// Basically, asp page loop through all sessions and submit them to aspx
// which then save the received sessions into aspx sessions
string _LoginGuid = HttpContext.Current.Session["projectguid"].ToString();
string _SessionKey = HttpContext.Current.Session["sessionkey"].ToString();
string _PageGuid = HttpContext.Current.Session["treeguid"].ToString();
object objRQL;

object[] RQL_Server = { "RDCMSServer.XmlServer" };
objRQL.GetType().InvokeMember("XmlServerClassName", BindingFlags.SetProperty, null, objRQL, RQL_Server);
object[] RQL_Command = { string.Format("<IODATA sessionkey=\"{0}\" loginguid=\"{1}\"><PAGE action=\"load\" guid=\"{2}\"/></IODATA>", _LoginGuid, _SessionKey, _PageGuid) };
object retObj = objRQL.GetType().InvokeMember("ServerExecuteXml", BindingFlags.InvokeMethod, null, objRQL, RQL_Command);

if (retObj != null)
{
	// parse that retObj
}

Not Long After

There was web service using C#. It has the benefit of a cleaner language and no need for extra configuration in COM security, but the plugin will be competing with Management Server for communication bandwidth because many core components are also using the web service. Also, it is susceptible to server timeout in large operations and cannot cancel the server side operation once it has started.

// look up how to transfer asp session to aspx session
// Basically, asp page loop through all sessions and submit them to aspx
// which then save the received sessions into aspx sessions
string _LoginGuid = HttpContext.Current.Session["projectguid"].ToString();
string _SessionKey = HttpContext.Current.Session["sessionkey"].ToString();
string _PageGuid = HttpContext.Current.Session["treeguid"].ToString();

// RqlService is a class manually generated using Visual Stuio by pointing to the web service URL
RqlService RqlServiceObj = new RqlService();

string RQL_Command = string.Format("<IODATA sessionkey=\"{0}\" loginguid=\"{1}\"><PAGE action=\"load\" guid=\"{2}\"/></IODATA>", _LoginGuid, _SessionKey, _PageGuid);
object retObj = RqlServiceObj.ExecuteString(RQL_Command);

if (retObj != null)
{
	// parse that retObj
}

Overtime

Some people advanced to AJAX against an ASP connector or the web service because these plugins are easy to write, troubleshoot, and no longer susceptible to server timeout in large operations and run away server side operation once it has started. It is best practice to use ASP connector instead of web service because ASP connector do not compete with core component for communication bandwidth and it is compatible with Management Server 6.x, 7.x, 9.x, 10.x, whereas the web service is only available beginning at 7.x, changes location at 10.x and 11.x. Hence plugins written against the web service is not all version compatible automatically.

// AJAX ASP
var strRQLXML = padRQLXML('<PAGE action="load" guid="<%= session("treeguid") %>">');

$.post('rqlaction.asp', { rqlxml: strRQLXML },
function(data){
	// parse $(data)
});

function padRQLXML(innerRQLXML)
{
	return '<IODATA loginguid="<%= session("loginguid") %>" sessionkey="<%= session("sessionkey") %>">' + innerRQLXML + '</IODATA>';
}
<?xml version="1.0" encoding="utf-8" ?>
<%
	' action.asp
	Response.ContentType = "text/xml"

	Dim objIO	'Declare the objects
	Dim xmlData, sError, retXml
	set objIO = Server.CreateObject("RDCMSASP.RdPageData")
	objIO.XmlServerClassName = "RDCMSServer.XmlServer"

	xmlData = Request.Form("rqlxml")
	
	xmlData = objIO.ServerExecuteXml (xmlData, sError) 

	Set objIO = Nothing
	
	If sError <> "" Then
        retXml = "<ERROR>" & sError & "</ERROR>"
	Else
        retXml = xmlData
	End If
	
	Response.Write(retXml)
%>
// AJAX web service
var SOAPMessage = '';
SOAPMessage += '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cms="http://reddot.de/cms/webservices/navigation/1_1"><soapenv:Header/><soapenv:Body><cms:ExecuteString><cms:command>';
SOAPMessage += padRQLXML(InnerRQL);
SOAPMessage += '</cms:command></cms:ExecuteString></soapenv:Body></soapenv:Envelope>';

$.ajax({
	type: 'POST',
	url: '/CMS/Navigation/Services/RQLService.asmx',
	data: SOAPMessage,
	contentType: 'text/xml; charset=utf-8',
	dataType: 'xml',
	beforeSend: function(xhr) {
		xhr.setRequestHeader('SOAPAction', '"http://reddot.de/cms/webservices/navigation/1_1/ExecuteString"');
	},
	success: function (data) {
		// parse $(data)
	},
	error: function (message) {
		//alert(message);
	}
});
	
function padRQLXML(InnerRQL)
{
	var Rql = '<IODATA loginguid="<%= session("loginguid") %>" sessionkey="<%= session("sessionkey") %>"><![CDATA[' + InnerRQL + ']]></IODATA>';
		
	return Rql;
}

Finally

Management Server is at version 11.x. One has to change the COM object name in ASP in order for VB plugins to continue to work, and this should only be a short term fix because as stated in the RQL manual, COM will be obsolete and web service will be the sole future. One also has to change the web service URL and SOAP format in order for AJAX web service plugins to continue to work in 11.x. The question: how to write a plugin that is 7.x to 11.x compatible automatically? Answer: use a AJAX RQL connector library at https://github.com/jhuangsoftware/j-rql-connector

<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="Rqlconnector.js"></script>
<script type="text/javascript">
var LoginGuid = '<%= session("loginguid") %>';
var SessionKey = '<%= session("sessionkey") %>';
var RqlConnectorObj = new RqlConnector(LoginGuid, SessionKey);

var strRQLXML = '<PAGE action="load" guid="' + PageGuid + '"/>';
RqlConnectorObj.SendRql(strRQLXML, false, function(data){
	// parse $(data)
});
</script>
' quick and short term change to make VB to continue to work
Set objIO = CreateObject("OTWSMS.AspLayer.PageData")
xmlData = "<IODATA sessionkey=""" & session("sessionkey") & """ loginguid=""" & session("loginguid") & """><PAGE action=""load"" guid=""" & strTreeGuid & """/></IODATA>" 
xmlData = objIO.ServerExecuteXml (xmlData, sError)
' parse that xmlData

NOTE

The AJAX RQL Connector is meant to be used on something small to medium things, like to automatically send some RQLs whenever a user does something in SmartEdit or Page Preview, or to send some RQLs based on user inputs in a plugin interface. Ideally, all plugins should use this connector library over other RQL libraries (Java, C#, PHP?) because a plugin should be plug-and-play with no dependency on any other external installations or configurations.

Does it mean other RQL libraries (Java, C#, PHP?) are bad? No. They are still useful for large implementations, where a plugin should really be called an application integration. However, please be aware that support for RQL libraries (Java, C#, PHP?) falls outside of OpenText support because in event of error, one has to proof the fault is at RQL level, not the library that encapsulates the RQL.

Monday, December 10, 2012

Content Import Manager (CIM) in Management Server 11

In Management Server 11, after importing and activating Content Import Manager (CIM) and attempting to run it from the project node, one would get error 500.

Is CIM broken in Management Server 11?  I thought so until support pointed me to "OpenText Web Site Management Content Import Manager Release Notes.pdf" in the CIM folder.

One need to go onto the Management Server environment and register a dll
regsvr32 %RDCMS%\Plugins\CIM\bin\RDCIM.dll

Friday, April 27, 2012

UploadIt

Available for Purchase in North America via asowsm@opentext.com

Screenshot

Compatibility
  • 7.x
  • 9.x
  • 10.x

Description
  1. Batch image/file upload
  2. Compatible with folder authorization packages
  3. Easy installation
  4. Support sub folders
  5. Supports all browsers

Accessibility
  • SmartTree, Start -> Administer Project Settings -> Project -> Folders, Action Menu, UploadIt
  • SmartEdit, Open page, right click Plugin-ins, UploadIt

Wednesday, March 21, 2012

Find Page By Guid 2

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Find page by guid

Accessibility
  • In SmartTree, Start -> Administer Project Structure -> Project, Action Menu, Find Page By Guid

Check Multiple Page Connections

Download

Screenshot



Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Search all page instances of a content classes for pages with multiple page connections
  2. Option to fix pages with multiple connections should the connection is not a main link and connected to an anchor

Accessibility
  • In SmartTree, Select content class, Action Menu, Check Multi Page Connection

Tuesday, March 20, 2012

Auto Order Elements 2

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Allow user to quickly reorder elements according to element order in page, making edit elements via form more user friendly
  2. Allow user to quickly inspect, find, and delete unused elements within content class

Accessibility
  • In SmartTree, Select content class, Action Menu, Auto Order Elements

Monday, March 12, 2012

AssignIt

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Assign a draft page from user A to user B
  2. Reassign a draft page because current owner is away
  3. Collaboration and communicate via built in email functionality (email server must be configured in server manager)
  4. Accessible in SmartTree and SmartEdit
  5. Easy to install

Accessibility
  • In SmartTree, Select Page, Action Menu, AssignIt.
  • In SmartEdit, please see readme.txt within plugin zip for easy installation instructions.

Friday, February 24, 2012

Content Class Inspector

Download

Screenshot



Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Displays all content class folders, content classes, and template/project variant association
  2. Opens template as read-only directly from interface
  3. Checks content class for possible unused elements, which slow down project performance
  4. Copies content class folder and content class name into clipboard via easily accessible bottom

Accessibility
  • In SmartTree, Start -> Administer Content Classes, Action Menu, Content Class Inspector.

Tuesday, February 21, 2012

Delete All Unlinked Pages 2

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Deletes unlinked pages in bulk
  2. Fast, averaging 2 pages per second
  3. Minimal server load, will not affect other users during operation
  4. Deletes oldest page first
  5. Provides status update

Accessibility
  • In SmartTree, Start -> Administer Project Structure -> Edit Special Pages -> Unlinked Pages, Action Menu, Delete All Unlinked Pages 2.

Monday, February 20, 2012

File Renamer

Download

Screenshot

Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. View and edit all page file names of a content class
  2. Helpful one click functionalities like use headline as file name, lower case all letters, replace invalid characters with SEO friendly characters, one click save

Accessibility
  • In SmartTree, Start -> Administer Content classes -> Content Class Folder -> Content Class, Action Menu, FileRenamer.

Auto File Name

Download

Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Automatically assign SEO friendly page file name using page headline

Accessibility
  • Please see readme.txt within plugin zip for easy installation instructions.

Job Report Manager

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Allows the user to view all publishing job reports with ease
  2. Light and fast to load (100 entries, 0.3 seconds)
  3. Sortable (sorts publishing time in dsc order by default)
  4. Support multi sort
  5. Support multi job report deletion

Accessibility
  • In SmartTree, start->administer publication->job reports, Action Menu, Job Report Manager.

Friday, February 17, 2012

Retroactive References 3

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Allows user to retroactively apply link or page references to anchor, list, and containers for all page instances of a content class
  2. Allows user to retroactively apply image, standard field, and text element references to image, standard field, and text element for all page instances of a content class
  3. Can process unlimited references without server timeout
  4. No run away processing upon closing window, which is common in most asp plugins
  5. Multi-threaded for faster processing

Accessibility
  • In SmartTree, navigate to a content class, expand and select a structural element, ensure target link/page is selected in clipboard, in Action Menu, click Retroactive References 2 to bring up final confirmation screen.

Thursday, February 16, 2012

TagIt

Download

Screenshot

Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Lists all categories and keywords at once, so user can assign categories and keywords more efficiently
  2. Highlights assigned category and keywords for better usability and faster content review
  3. Categories and keywords fit to window size automatically

Accessibility
  • In SmartTree, select page, Action Menu, TagIt
  • In SmartEdit, open page, right click, plugins in context menu, TagIt

RQLConsole

Download

Screenshot



Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Send a RQL message via console and view RQL response
  2. See all available server sessions for debugging and RQL development.

Accessibility
  • In SmartTree, Start -> Administer Project Structure -> Project, Action Menu, RQLConsole

FindIt 2

Download

Screenshot


Compatibility
  • 7.x
  • 9.x
  • 10.x
  • 11.x

Description
  1. Ability to search for code within all content classes or content classes within specific content class folder
  2. Supports regex syntax
  3. User can open template as read only directly from search results

Accessibility
  • In SmartTree, Start -> Administer Content Classes, Action Menu, FindIt 2