Pages

Tuesday, April 2, 2013

Blockmark Usages

I hope the following blockmark usage examples would help clarify the many blockmarks and associated usages.

<!-- do not need conditional, no output if empty -->
<%stf_teaser%>


<!IoRangeConditional>
<div class="orange">
    <%stf_teaser%>
</div>
<!/IoRangeConditional>


<!IoRangeRedDotMode>
<!-- this is shown in SmartEdit, either open or closed
<div class="reddot-area">
    <!IoRedDotOpenPage>
    <!IoRangeNoEditMode>
    <!-- this is shown when this section is closed in SmartEdit -->
    <div class="reddot-closed">[Open to Edit]</div>
    <!/IoRangeNoEditMode>
    <!IoRangeRedDotEditOnly>
    <!-- this is shown when this section is open in SmartEdit -->
    <div class="reddot-opened">[Close to Edit]</div>
    <!/IoRangeRedDotEditOnly>
</div>
<!/IoRangeRedDotMode>


<!--
if you want to produce repeatable HTML with variable content,
and the links go to the DIFFERENT sub folder

<ul>
    <li><a href="/products/link1.htm">link 1</a></li>
    <li><a href="/news/link2.htm">link 2</a></li>
    <li><a href="/about-us/link3.htm">link 3</a></li>
</ul>
-->

<ul>
    <!IoRangeDynLink>
    <li><%anc_dyn_links%></li>
    <!/IoRangeDynLink>
</ul>


<!--
if you want to produce repeatable HTML with variable content,
and the links go to the SAME sub folder

<ul>
    <li><a href="/products/link1.htm">link 1</a></li>
    <li><a href="/products/link2.htm">link 2</a></li>
    <li><a href="/products/link3.htm">link 3</a></li>
</ul>
-->

<ul>
    <!IoRangeList>
    <li><%lst_links%></li>
    <!/IoRangeList>
</ul>

Friday, March 8, 2013

Tiny C# Facebook Batch Request Connector

Why

Recently, I have had the great joy of working on some Facebook events integration. The issue was that the requests were sent one at a time. Facebook batch request was the answer.

The existing code base is C#. I can use the popular C# Facebook SDK at http://csharpsdk.org/, but it might be overly complex for the project.

So I wrote this little C# Facebook Batch Request connector: https://github.com/jhuangsoftware/FacebookBatchRequest


Can It Return Html?

Sure. Extend current project to covert returned JSON to HTML. Alternatively, use the current connector as part of your project, which actually converts JSON to HTML


Sample Code: Inline ASPX Code

<%@ Import Namespace="FacebookBatchRequestLib" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%
    FacebookBatchRequest FBBatchRequestObj = new FacebookBatchRequest("XYZ|XYZ");
    FBBatchRequestObj.AddBatchUrl(RequestMethod.GET, "something1/events?access_token=XYZ|XYZ&fields=name,description,start_time,end_time,location,id&since=2013-03-08&limit=15");
    FBBatchRequestObj.AddBatchUrl(RequestMethod.GET, "something2/events?access_token=XYZ|XYZ&fields=name,description,start_time,end_time,location,id&since=2013-03-08&limit=15");

    List RetJSONs = FBBatchRequestObj.Send();
%>

Just remember to drop FacebookBatchRequestLib.dll into the bin folder


Sample Code: Windows Application

Included in the GitHub project. Check it out.

Monday, February 18, 2013

Management Server 11 with MSSQL 2008 Installation Checklist

Here is a simple checklist for Management Server 11 installation with MSSQL 2008.

Note that this checklist prepares the system for Management Server installation using local MSSQL accounts.


Download Doc

Monday, February 11, 2013

HTML5 in Management Server 9, 10, and 11

Just want to share a proof of concept project (proof that Management Server supports HTML5) I did based on Smashingmagzine's HTML5.

I wrote this project a few years back, when Management Server was still called CMS, to be more exact, CMS 9.

SmartEdit in CMS 9, IE8
SmartEdit in CMS 9, FireFox
SmartEdit in CMS 9, IE9
SmartEdit in CMS 10, IE9

It is recommended to use projects with HTML5 code after 10.1 SP2 HF18 (Build 10.1.2.391) because the Telerik/RadEditor text editor now also support HTML5 code and would not strip them out.


Download HTML5 Project Export (CMS 9)

Thursday, January 31, 2013

Foreach Rendertag in Text Array Processing

<reddot:cms>
<foreach itemname="ArrayItem" object="Escape:Text(Test1,Test2).Split(Escape:Text(,))">
 <htmltext>
  <h2><%!! Store:ArrayItem !!%></h2>
 </htmltext>
</foreach>
</reddot:cms>

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