Stephen Smith's Blog

All things Sage ERP…

Displaying Social Media in the Accpac 6 Portal

with 2 comments


The Sage ERP Accpac 6.0A Web Portal provides a nice home page of relevant accounting information to act as a starting point for performing your accounting duties. However it is a web portal and as such it might be nice to display some additional non-accounting information. How to do that? In this blog posting we will see how to add a “Social Media” category to the data snapshots that you can add to your home page and then fill it with a number of useful sites. Plus we will look at how to find and add other useful web pieces. We’ll also do this by adding the proper strings to the database so they can be translated, rather than just hard-coding them in the XML.

Portlet Categories

First we will add the “Social Media” category. This is similar to the categories for the applications already selectable. We need to edit: “C:\Program Files (x86)\Common Files\Sage\Sage Accpac\Tomcat6\portal\swtServices\portletCategoriesMap.xml”. We need to add the following section:

<!-- This is the Social category for Snapshots -->
<PortletCategories>
<id>SOCIAL</id>
<captionID>portal60a_portalMenus_mnuSocial</captionID>
<captionString></captionString>
<parentID></parentID>
<type>2</type>
<shortCategoryString></shortCategoryString>
<shortCategoryID>portal60a_portalMenus_mnuSocial</shortCategoryID>
</PortletCategories>

For a bit more information on XML and customizing see here.

Portlet Map

Now we need to add all the icons to the category (menu) that we have created. To do this we need to edit: ”C:\Program Files (x86)\Common Files\Sage\Sage Accpac\Tomcat6\portal\sageERP\portal60a\portletMap.xml” and add the following items:

<portlet>
<id>Social1001</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.bbc.co.uk/mobile/i</applicationURL>
<captionID>portal60a_social_titlBBC</captionID>
<previewID>portal60a_social_prevBBC</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1004</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.gstatic.com/ig/modules/tabnews/tabnews.xml&amp;up_ned=&amp;up_items=8&amp;up_show_image=1&amp;up_font_size=13pt&amp;up_selectedTab=0&amp;up_tabs=&amp;up_last_url=&amp;up_onebox=&amp;synd=open&amp;w=320&amp;h=200&amp;title=__MSG_title__&amp;lang=en&amp;country=ZW&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlGoogleNews</captionID>
<previewID>portal60a_social_prevGoogleNews</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1005</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/105654898094210970759/Social_2_Links.xml&amp;synd=open&amp;w=245&amp;h=350&amp;title=Social+2+Bookmarks+and+Links&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlSocial2Links</captionID>
<previewID>portal60a_social_prevLSocial2Links</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1006</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/finance/finance_related.xml&amp;up_contracted=%2C&amp;up_finance_symbol=GOOG&amp;up_symbol=GOOG&amp;up_finance_symbol_enabled=0&amp;up_finance_rowlinking_enabled=0&amp;synd=open&amp;w=320&amp;h=200&amp;title=__MSG_related_companies__&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlGoogleCompanies</captionID>
<previewID>portal60a_social_prevGoogleCompanies</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1007</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.twittergadget.com/gadget.xml&amp;synd=open&amp;w=320&amp;h=400&amp;title=TwitterGadget&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlTwitter</captionID>
<previewID>portal60a_social_prevTwitter</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1009</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.notkewl.com/myWeather/myWeather.xml&amp;up_paikka=SFXX0023&amp;up_merkki=1&amp;synd=open&amp;w=280&amp;h=260&amp;title=theWeather&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlWeather</captionID>
<previewID>portal60a_social_prevWeather</previewID>
<previewImage>igoogle_logo_sm.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1010</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/facebook.xml&amp;up_session=&amp;synd=open&amp;w=320&amp;h=300&amp;title=__MSG_title__&amp;lang=en&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlFacebook</captionID>
<previewID>portal60a_social_prevFacebook</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1011</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.google.com/uds/modules/elements/localsearch/localsearch.xml&amp;up_location=johannesburg&amp;up_largeMapMode=1&amp;up_kml=0&amp;up_traffic=&amp;up_locationCacheString=&amp;up_locationCacheLat=&amp;up_locationCacheLng=&amp;up_mapType=m&amp;up_idleZoom=11&amp;up_transitionQuery=&amp;up_rawquery=&amp;up_selectedtext=&amp;synd=open&amp;w=320&amp;h=375&amp;title=__MSG_title__&amp;lang=all&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlGoogleMaps</captionID>
<previewID>portal60a_social_prevGoogleMaps</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>
<portlet>
<id>Social1012</id>
<categoryID>SOCIAL</categoryID>
<type>1</type>
<contentType>1</contentType>
<applicationURL>http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube_igoogle/v2/youtube.xml&amp;up_channel=&amp;up_channel_url_to_preload=http%3A%2F%2Fgdata.youtube.com%2Ffeeds%2Fapi%2Fstandardfeeds%2FUS%2Frecently_featured%3Falt%3Djson&amp;up_current_channel_id=0&amp;up_history=&amp;up_historyEnabled=true&amp;up_prefs_version=0&amp;up_rawQuery=&amp;up_searchTerm=&amp;up_search_channel_name0=&amp;up_search_channel_name1=&amp;up_search_channel_name2=&amp;up_search_channel_url0=&amp;up_search_channel_url1=&amp;up_search_channel_url2=&amp;up_search_channels=0&amp;up_showPromo=true&amp;up_title=YouTube&amp;up_userHasSeenSharedActivities=false&amp;up_username=&amp;synd=open&amp;w=320&amp;h=375&amp;title=__MSG_title__&amp;lang=en&amp;country=UK&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999</applicationURL>
<captionID>portal60a_social_titlYoutube</captionID>
<previewID>portal60a_social_prevYoutube</previewID>
<previewImage>previewimage-GS.png</previewImage>
<thumbnailImage>HELP-GS.png</thumbnailImage>
<helpID>Portal/index_CSH.htm#110010001</helpID>
<showConfigureMenu>false</showConfigureMenu>
<showReportMenu>false</showReportMenu>
<showRefreshMenu>false</showRefreshMenu>
<securityResources></securityResources>
</portlet>

 

UI Content

For the translatable strings used in the previous files you need to create one file and edit another. The first is social_uiContent.xml that goes in the: “C:\Program Files (x86)\Common Files\Sage\Sage Accpac\Tomcat6\portal\swtServices\uiContent\portal60a\eng” folder. Create the file with the following contents:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<uiContentList xmlns="http://schemas.sage.com/swtServices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.sage.com/swtServices/uiContent.xsd">
<uiContent id="titlBBC" status="approved" value="BBC"/>
<uiContent id="titlYammer" status="approved" value="Yammer"/>
<uiContent id="titlLinkedin" status="approved" value="LinkedIn"/>
<uiContent id="titlTwitter" status="approved" value="Twitter"/>
<uiContent id="titlGoogleNews" status="approved" value="Google News"/>
<uiContent id="titlGoogleCompanies" status="approved" value="Google Companies"/>
<uiContent id="titlSocial2Links" status="approved" value="Social 2 Links"/>
<uiContent id="titlWeather" status="approved" value="Weather"/>
<uiContent id="titlFacebook" status="approved" value="Facebook"/>
<uiContent id="titlGoogleMaps" status="approved" value="Google Maps"/>
<uiContent id="titlYoutube" status="approved" value="YouTube"/>
<uiContent id="menuPortal" status="approved" value="Social Media"/>
<uiContent id="prevBBC" status="approved" value="View BBC News on your Sage ERP Accpac Portal."/>
<uiContent id="prevYammer" status="approved" value="Stay in touch with your co-workers on Yammer using your Sage ERP Accpac Portal."/>
<uiContent id="prevLinkedin" status="approved" value="Connect with others on LinkedIn using your Sage ERP Accpac Portal."/>
<uiContent id="prevTwitter" status="approved" value="View tweets about Sage ERP Accpac."/>
<uiContent id="prevGoogleNews" status="approved" value="View news provided by Google."/>
<uiContent id="prevGoogleCompanies" status="approved" value="Research company profiles."/>
<uiContent id="prevSocial2Links" status="approved" value="Links to Social Media networks."/>
<uiContent id="prevWeather" status="approved" value="Shows weather reports of your area."/>
<uiContent id="prevFacebook" status="approved" value="Connect with your friends in the Sage ERP Accpac Portal."/>
<uiContent id="prevGoogleMaps" status="approved" value="View Google Maps in the Sage ERP Accpac Portal."/>
<uiContent id="prevYoutube" status="approved" value="Watch YouTube videos in the Sage ERP Accpac Portal."/>
</uiContentList>

Now we need to edit portalMenus_uiContent.xml located in: “C:\Program Files (x86)\Common Files\Sage\Sage Accpac\Tomcat6\portal\swtServices\uiContent\portal60a\eng”

Add the line:

<uiContent id="mnuSocial" status="approved" value="Social Media"/>

 

With the other entries.

Graphic File

Save the following graphic:

As igoogle_logo_sm.png in the folder:  C:\”Accpac install location”\Accpac\WebUIs\images.

Give it a Try

Before these changes will work you need to delete the UIContent table from your Portal database. This will cause it to be re-loaded the next time you run the Accpac Portal. When it reloads, it loads all the xml files in the uiContent directories into this table including the ones we created and modified above.

With these customizations in place you should get a Social Media menu when you add a snapshot to your workspace:

How to Add More URLs

Given this framework, it’s easy to expand it to include different URLs. But where do you get URLs for web sites that will fit nicely in these data snapshot windows? First if you can’t find a small version of a web site you want to include, if you make the type in the portletmap.xml, a 2 rather than a 1, then the item will appear in the task menu and you can add it to the shortcuts, rather than the home page workspace.

Generally there are three possible ways to find a small version of a web site: a mobile version, a mashup version or a portlet version (like an iGoogle widget). It’s a matter of trial and error to see which works best. All the examples included here are iGoogle widgets. So how do you get the URL for an iGoogle Widget?

Go to iGoogle and choose “add stuff”, select a widget to add, then press “embed this gadget”. Now configure it how you want and then press the “Get the Code” button. This will give you something like:

<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/datetime_v2/datetime_v2.xml&amp;up_color=blue&amp;up_dateFormat=wmd&amp;up_firstDay=0&amp;up_24hourClock=1&amp;up_clocks=&amp;synd=open&amp;w=320&amp;h=148&amp;title=__MSG_title__&amp;lang=en&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>

 

Now to use it in the portal you need to trim off the front: <script src=” and the back: &amp;output=js”></script>. This middle part is then the URL you can use in the portletmap.xml to activate the widget.

Not all iGoogle widgets will work. Some require certain container behavior that iGoogle provides, but that we don’t provide yet.  It just takes a bit of trial and error.

If you browse to a web site on your iPhone or Android and it looks ok, make note of the URL that website is using. Usually something like m.usualURL.com and use that in the Portal. Often this will give a nice small version of the website.

Often services like twitter have a page like http://twitter.com/about/resources/widgets that help you embed their service in your website. From these pages you configure the widget and when done click a “Generate Code” button which generates html code for to display their site correctly. You can’t embed this HTML directly in the portletmap.xml file, but you can save it somewhere under Accpac\WebUIs, and then refer to this in the portletmap.xml (remember http://hostname/SageERPAccpac points to Accpac\WebUIs).

Summary

Hopeful this article provides some useful information on how to incorporate information from other sources into the Sage ERP Accpac 6 Web Portal. If future versions of Accpac we should be including this in the normal UIs for customizing the Portal rather than resorting to XML.

About these ads

Written by smist08

February 5, 2011 at 7:17 pm

Posted in Sage 300 ERP

Tagged with , ,

2 Responses

Subscribe to comments with RSS.

  1. […] This post was mentioned on Twitter by Keith Cerny and smist08, Geek Fetch. Geek Fetch said: ACCPAC Displaying Social Media in the Accpac 6 Portal: The Sage ERP Accpac 6.0A Web Portal provides a nice home … http://bit.ly/hGFfwo […]

  2. […] their ERP. What does that mean? We created an integration to the Accpac 6 Portal which I blogged on here. This was just done via customization, so people can use this now if they wish. But the main point […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 276 other followers

%d bloggers like this: