Difference between revisions of "MyPortal Development guide"

From Catglobe Wiki
Jump to: navigation, search
(New page: Here comes with full information about MyPortal module. Of course, i am not going to mention about what it is.<br> To see how it works, visit helpfiles at [http://vietnamhelpfiles.catglo...)
 
m
Line 1: Line 1:
Here comes with full information about MyPortal module. Of course, i am not going to mention about what it is.<br>
+
== Introduction ==
  
To see how it works, visit helpfiles at [http://vietnamhelpfiles.catglobe.com/ vietnamhelpfiles.catglobe.com/] under Persionalization/MyPortal.<br>
+
The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you.  
  
<u>'''How to make an user defined element?'''</u><br>
+
For more information, visit helpfiles at [http://vietnamhelpfiles.catglobe.com/ vietnamhelpfiles.catglobe.com/] under Persionalization/MyPortal.
  
An user defined element as its name is the one you can put anything you want. You have 2 sections to make it real.<br>  
+
== How to make an user defined element<br> ==
  
- Use Detailed decsription tabs ( one for default, one for specific): They are just a HTML editor. It is required not empty to show on your portal page.<br>  
+
An user defined element as its name is the one you can put anything you want. You have 2 sections to make it real.<br>
  
- Script editor: Available from version 5.5. Comes from the need to show data in real time using webservice to collect data. It is really a powerful feature which makes MyPortal more alive.<br>  
+
- Use Detailed decsription tabs ( one for default, one for specific): They are just a HTML editor. It is required not empty to show on your portal page.<br>
  
<u>'''Use Script Enabled Feature'''</u>:<br>  
+
- Script editor: Available from version 5.5. Comes from the need to show data in real time using webservice to collect data. It is really a powerful feature which makes MyPortal more alive.<br>
  
<u>Events supported</u>:<br>  
+
== Script Enabled Feature<br> ==
 +
 
 +
<u>Events supported</u>:<br>
  
 
''onload'': called when element finished loading<br>''onadd'': called when it is added to MyPortal for the first time ( by Insert dialog)<br>''onminimize'': when minimize<br>''onmaximize'': when maximize<br>''onremove'': when element is removed from MyPortal<br>''onmouseover'': when mouse is over an element.<br>''onmouseout'': when mouse is out of an element.  
 
''onload'': called when element finished loading<br>''onadd'': called when it is added to MyPortal for the first time ( by Insert dialog)<br>''onminimize'': when minimize<br>''onmaximize'': when maximize<br>''onremove'': when element is removed from MyPortal<br>''onmouseover'': when mouse is over an element.<br>''onmouseout'': when mouse is out of an element.  
Line 19: Line 21:
 
''set_title(titleText)'': Change the title of element to the new one.  
 
''set_title(titleText)'': Change the title of element to the new one.  
  
How to write code?<br>  
+
How to write code?<br>
  
 
this.onload = function()  
 
this.onload = function()  
Line 28: Line 30:
  
 
}  
 
}  
 +
 +
== Examples ==
  
 
<u>Call a webservice</u>:  
 
<u>Call a webservice</u>:  
 
[Help from Mai]
 
  
 
<u>Play a movie clip using CGFlashPlayer</u>:  
 
<u>Play a movie clip using CGFlashPlayer</u>:  
  
[Help from Mai]
+
== Problems<br> ==
 
 
<u>'''Problems'''</u>:<br>  
 
  
Even though it is quite simple to make an element but people usually get problems with using something. First, i want to mention some problems with HTML editor:<br>  
+
Even though it is quite simple to make an element but people usually get problems with using something. First, i want to mention some problems with HTML editor:<br>
  
- <u>Using flash object</u>: You are free to add a flash object. Problem is that it is places on top of others, thus, you cannot see the menu opening from tools. To cover it, you need to add these parameters into flash:<br>  
+
- <u>Using flash object</u>: You are free to add a flash object. Problem is that it is places on top of others, thus, you cannot see the menu opening from tools. To cover it, you need to add these parameters into flash:<br>
  
''IE: "&lt;param name='wmode' value='transparent' /&gt;"<br>FF: 'wmode="transparent" '''<br>  
+
''IE: "&lt;param name='wmode' value='transparent' /&gt;"<br>FF: 'wmode="transparent" '''<br>
  
 
- Be careful with the HTML you made. There is no checking or warrantee from MyPortal framework.<br>
 
- Be careful with the HTML you made. There is no checking or warrantee from MyPortal framework.<br>

Revision as of 11:23, 31 December 2008

Introduction

The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you.

For more information, visit helpfiles at vietnamhelpfiles.catglobe.com/ under Persionalization/MyPortal.

How to make an user defined element

An user defined element as its name is the one you can put anything you want. You have 2 sections to make it real.

- Use Detailed decsription tabs ( one for default, one for specific): They are just a HTML editor. It is required not empty to show on your portal page.

- Script editor: Available from version 5.5. Comes from the need to show data in real time using webservice to collect data. It is really a powerful feature which makes MyPortal more alive.

Script Enabled Feature

Events supported:

onload: called when element finished loading
onadd: called when it is added to MyPortal for the first time ( by Insert dialog)
onminimize: when minimize
onmaximize: when maximize
onremove: when element is removed from MyPortal
onmouseover: when mouse is over an element.
onmouseout: when mouse is out of an element.

set_title(titleText): Change the title of element to the new one.

How to write code?

this.onload = function()

{

// use "this" keyword to access the element itself.

}

Examples

Call a webservice:

Play a movie clip using CGFlashPlayer:

Problems

Even though it is quite simple to make an element but people usually get problems with using something. First, i want to mention some problems with HTML editor:

- Using flash object: You are free to add a flash object. Problem is that it is places on top of others, thus, you cannot see the menu opening from tools. To cover it, you need to add these parameters into flash:

IE: "<param name='wmode' value='transparent' />"
FF: 'wmode="transparent" '

- Be careful with the HTML you made. There is no checking or warrantee from MyPortal framework.