Register | Login   
  
DotNetNuke Gold Benefactor
 
About VivaIFrame Module

The VivaIFrame Module extends a code IFrame Module by adding a dynamic parameter passing.

PLUS - for Authenticated Users:
Pass UserId and/or Username,
Add any Profile Property,
Check UserInRole, and
Pass all role names or ids User belongs to.

AND! Autostretch height and width of IFrame!


All you have to do is either pass vp_useuserid parameter or set it in VivaIFrame Module Options

The VivaIFrame Module extends a code of IFrame Module by adding a dynamic parameter passing.

The concept is simple - you can either set all parameters statically - just like the Core IFrame module, or they can be passed dynamically.

The dynamic parameters take precedence - if you have a static parameter set up and, then, pass a dynamic, VivaIFrame will use dynamic value.

Dynamic Parameter Static Field Name Possible Values
Basic Settings
vp_url URL any valid URL - important: if you want to link to an outside source, you must include HTTP:// in front of URL.
vp_frmbrdr FrameBorder set to false/true, 0/1, no/yes (i.e. vp_frmbrdr=no)
vp_hght Height set to integer, if not set at all, defaults to 300px (i.e. vp_hght=600)
vp_autohght Autosize Height set to 1/-1/true/yes/y (i.e. vp_autohght=y)
This will tell VivaIFrame to strech the height of the IFrame to the height of target page
vp_wdth Width set to integer, if not set at all, defaults to 400px (i.e. vp_wdth=900)
vp_autowdth Autosize Width set to 1/-1/true/yes/y (i.e. vp_autowdth=y)
This will tell VivaIFrame to strech the width of the IFrame to the width of target page
vp_scrllng Scrolling set to auto/yes/no (i.e. vp_scrllng=auto)
vp_ttl Title set to String (i.e. vp_ttl=Welcome)
User Settings
vp_useuserid Boolean
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to 1/-1/true/yes/y (i.e. vp_useuserid=y)
This will tell VivaIFrame to append a UserId to the IFrame url
vp_useridname A parameter name to be used for UserId passing
NOTE: This param is only taken into account when a vp_useuserid param is set to true.
set to any string you'd like (i.e. vp_useridname=uid)
If omitted, IFrame will use "vp_userid" name
vp_useusername Boolean
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to 1/-1/true/yes/y (i.e. vp_useusername=y)
This will tell VivaIFrame to append a Username to the IFrame url
vp_usernamename A parameter name to be used for Username passing
NOTE: This param is only taken into account when a vp_useuserid param is set to true.
set to any string you'd like (i.e. vp_usernamename=uid)
If omitted, IFrame will use "vp_username" name
Misc Profile Properties Any profile property(ies) found on Manage Profile Properties option page under User Accounts page Check as many as you'd like. Parameter name will be set to the Property name unless you specify otherwise.
UserInRole Settings
vp_roles Comma-delimited string of Role Names User should be check against.
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
i.e. vp_roles=Registered Users,Administrators
MUST BE spelled exactly the way it is store in DNN DB.
VivaIFrame will pass "true" or "false".
vp_checkstrict Boolean
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to 1/-1/true/yes/y (i.e. vp_checkstrict=y)
This will tell VivaIFrame to check if User belongs to ALL roles specified in vp_roles.
If omitted or set to "false", VivaIFrame will only check if User belongs to ANY one of the specified roles.
vp_isinroleparamname String
NOTE: This param is only taken into account when a vp_roles param has value.
A parameter name to be used for UserInRoles check result.
Set to any string you'd like (i.e. vp_isinroleparamname=roles)
If omitted, IFrame will use "vp_isinrole" name.
User Roles Settings
vp_includeallroles Boolean.
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to 1/-1/true/yes/y (i.e. vp_includeallroles=y)
This will tell VivaIFrame to append a string of all Roles to which User belongs
vp_roleseparator String.
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to "comma", "tilda", "semicolon" or "pipe" (i.e. vp_roleseparator=pipe)
This will tell VivaIFrame which character to place between role names.
If omitted, VivaIFrame will use "semicolon"
vp_includerolenameid String.
NOTE: This param is only taken into account when a user is LOGGED IN to the site.
set to "roleid" or "rolename" (i.e. vp_roleseparator=roleid)
This will tell VivaIFrame whether to pass Role Names or Ids.
If omitted, VivaIFrame will pass role names.
vp_includeallrolesname String
NOTE: This param is only taken into account when a vp_roles param has value.
A parameter name to be used for User Roles passing.
Set to any string you'd like (i.e. vp_includeallrolesname=roles)
If omitted, VivaIFrame will use "vp_includeallroles" name
Miscellaneous Settings
vp_debug Boolean. set to 1/-1/true/yes/y (i.e. vp_includeallroles=y)
If passed, VivaIFrame will print the IFRAME tag as a text immediately below IFrame window.

Example:

http://www.yourwebsite.com/Default.aspx?tabid=28&vp_url=http//www.yahoo.com&vp_scrllng=auto

If tab 28 has Viva IFrame module on it, http://www.yahoo.com will be displayed in it in the iframe with width=400 and height=300. If you were to set width and height using Edit Settings option, then iframe would assume those params.

If a url for IFrame has to contain it's own parameters (i.e. http://www.yahoo.com/index.asp?UserID=332&Pass=555&Page=MyPage), it will have to be formatted:

GET method (passed through url): "&" has to be replaced with "~" (tilda) and "=" - with "|" (pipe). For example, the url in your question would have to be passed as follows:

http://www.mysite.com/Default.aspx?tabid=1&vp_url=http://www.yahoo.com?UserID|332~Pass|555~Page|MyPage

POST method (passed through form): Nothing special is necessary. The IFrame will handle whatever url you'll pass to it.