DescriptionThis project contains a webapplication which can be easily deployed on portals, based on Gentics Portal.Node 4, especially the Gentics Enterprise 2.0 Portal (short GEP). It consists of a following files used to get the Twitter portlet working: - war-file which contains all needed files, styles, javascripts, etc.
- XML-Objecttype (for import in portaladministration-portlet) for the contentrepository
How it worksTODO: Describe the way how the twitter portlet works How to intallAdd it to the portalcreate the database-objectIf you are not using GEP, you have to manually add a new sms-objecttype to your contentrepository. The sms-objecttype can be downloaded >here<. Now you simply have to navigate to the portletadministration of your portal and import the objecttype. portletapplications.xmlNow you have your war-package. But what to do now. Firstly you have to add the webapplication to your portletapplications.xml located in .../tomcat/conf/gentics by adding following line: <portlet-app context="Twitter"/> pnodeAfter you have added the Twitter-Portlet to the portletapplications.xml, you have to add following pnode in your portletentities.xml or portaltemplate. <!-- Twitter Module -->
<pnode type="Twitter/Tweet" id="Tweet">
<actions>
<action name="windowstate.maximized">
<visible>true</visible>
</action>
<action name="portletmode.View">
<visible>false</visible>
</action>
<action name="portletmode.Edit">
<visible>false</visible>
</action>
<action name="sidebar">
<visible>true</visible>
</action>
</actions>
<style>defaultstyle</style>
<titleaction>focus</titleaction>
<parameters>
<parameter name="supportssidebar">true</parameter>
<parameter name="datasource">twitter_pcr</parameter>
<parameter name="user_datasource">pcr</parameter>
<parameter name="gentics.portletreload">true</parameter>
<parameter name="gentics.portletreload.replaceall">true</parameter>
<parameter name="gentics.portletreload.replacelink">true</parameter>
<parameter name="gentics.portletreload.replaceform">true</parameter>
</parameters>
<reactions />
</pnode> Add javascript to your portalpageTo implement the functionality of automatic loading new messages to the tweet-list, you have to add following javascript. It checks in all 5 seconds if there are new tweets and reloads the portlet. <script type="text/javascript" src="/Twitter/script/init.js"></script> ConfigurationDatasourcesIn the web.xml of the Twitter-webapplication the used datasources and objecttypes of sms and user have to be configured. Adjust following settings: <init-param>
<param-name>cr_tweet_url</param-name>
<param-value><![CDATA[jdbc:mysql://127.0.0.1:42006/twitter_pcr?user=node&password=xxxxx]]></param-value>
</init-param>
<init-param>
<param-name>cr_user_url</param-name>
<param-value><![CDATA[jdbc:mysql://127.0.0.1:42006/demoportal_pcr?user=node&password=xxxxx]]></param-value>
</init-param>
<init-param>
<param-name>smsobjecttype</param-name>
<param-value>90022</param-value>
</init-param>
<init-param>
<param-name>userobjecttype</param-name>
<param-value>50000</param-value>
</init-param> Install SMS service
|