> Forums > Active Social > Themes and Templates > Possible solution for joining third party modules to AS Groups
Last Post 26 Jan 2011 01:21 PM by mmoney. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
mmoney
Customers
mmoney
Post Count:150

--
26 Jan 2011 01:21 PM
    • Active Social Version: 1.9.1
    • DotNetNuke Version: 5.6.1
    Hi Folks,

    I've read a number of posts here on the difficulties of integrating third party modules with groups, as most modules don't know about groupids only userids. I know my solution is not very elegant, and I'm sure it has some potential issues, but I thought I would share what I've decided to go with in case others need a new idea. You can see a sample of my groups including videos from UVG here: http://www.neighbay.ca/groups/gord-...ship/media
    (the videos are listed below the photos)

    First, I downloaded a copy of Open Web Studio (OWS) (free). This is a really powerful tool if you can wade through some initial frustration until it starts to make sense. I then add a copy of the module to a page and start the administration tool. I created a very basic routine to query the group owners id and then look up the records associated with that member in the third party module. For the purposes of this code sample I am loading data from UVG but you can apply this to Ventrian modules as well as others.

    OWS let you create a template right in your code to display the data anyway you'd like. You can turn on debugging in OWS until you get your code running smoothly. In the sample below I get the Ownerid for the groups table and then use this to find any videos posted by the groups owner. You could modify this technique to get the videos of all members of a group as well.

    I know the code below looks crazy, but all I did was use the export function in OWS so that I could post it here. In reality this code turns into some nicely ordered and very simple steps in OWS when you import it. (Click on import in the Administration tool and paste in the code to get started)

    {"Name":"GroupLoadVideo","ConfigurationID":"7081344f-2362-41ee-a0b5-53f2b902ae3a","searchItems":[],"queryItems":[],"listItems":[],"messageItems":[{"Index":1,"Level":0,"Parameters":{"Name":"OnLoad","RenderType":"0","skipDebug":"False","includeSearch":"False","includeExport":"False","includeImport":"False"},"ActionType":"Action-Region","ChildActions":[{"Index":2,"Level":1,"Parameters":{"Value":"Place all general operations within this region as a starting point. This includes Template and Variable assignments."},"ActionType":"Action-Comment","ChildActions":[]},{"Index":3,"Level":0,"Parameters":{"Name":"Query Variables","RenderType":"0","skipDebug":"False","includeSearch":"False","includeExport":"False","includeImport":"False"},"ActionType":"Action-Region","ChildActions":[{"Index":4,"Level":0,"Parameters":{"VariableType":"<QueryString>","QuerySource":"asg","QueryTarget":"@asg","QueryTargetLeft":"","QueryTargetRight":"","QueryTargetEmpty":"","EscapeListX":"0","Protected":"true","EscapeHTML":"true","VariableDataType":"Any","Formatters":""},"ActionType":"Template-Variable","ChildActions":[]},{"Index":5,"Level":0,"Parameters":{"VariableType":"<Action>","QuerySource":"Source Value","QueryTarget":"New Query Variable","QueryTargetLeft":"","QueryTargetRight":"","QueryTargetEmpty":"","EscapeListX":"0","Protected":"true","EscapeHTML":"true"},"ActionType":"Template-Variable","ChildActions":[]},{"Index":6,"Level":0,"Parameters":{"VariableType":"<Action>","QuerySource":"Source Value","QueryTarget":"New Query Variable","QueryTargetLeft":"","QueryTargetRight":"","QueryTargetEmpty":"","EscapeListX":"0","Protected":"true","EscapeHTML":"true"},"ActionType":"Template-Variable","ChildActions":[]}]}]},{"Index":7,"Level":0,"Parameters":{"Name":"OnRender","RenderType":"0","skipDebug":"False","includeSearch":"False","includeExport":"False","includeImport":"False"},"ActionType":"Action-Region","ChildActions":[{"Index":8,"Level":0,"Parameters":{"Type":"Query-Query","GroupStatement":"","GroupIndex":"","Value":"SELECT * FROM dbo.UVG_Video WHERE CreatedbyUser = (SELECT ownerID FROM dbo.activesocial_Groups WHERE GroupID = @asg)\n","Connection":"","Filter":"","CacheTime":"","CacheName":"","CacheShared":"false"},"ActionType":"Template","ChildActions":[{"Index":9,"Level":0,"Parameters":{"Type":"Group-Header","GroupStatement":"","GroupIndex":"","Value":"<div style=\"background-color:#f5f5f5;padding:3px;padding-left:5px;margin-bottom:10px;margin-top:10px;width:100%;font-family:verdana;font-size:12pt;\">Equine Videosdiv>\n<div style=\"padding-left:10px;\">","Connection":"","Filter":"","CacheTime":"","CacheName":"","CacheShared":"false"},"ActionType":"Template","ChildActions":[{"Index":10,"Level":0,"Parameters":{"Type":"Detail-Detail","GroupStatement":"","GroupIndex":"","Value":"<table>\n    <tr>\n        <td style=\"padding:2px;border-style:solid;border-width:1px;border-color:#D3D3D3;\">\n            <a href='http://www.neighbay.ca/VideosArticles/VideoPlayer/TabId/215/Default.aspx?VideoId=[ItemID]'><img src='[Thumbnail]' width='160' border='0' alt='[Title]' />a>\n        td>\n        <td style=\"padding-left:5px;vertical-align:middle;\">\n            <a href='http://www.neighbay.ca/VideosArticles/VideoPlayer/TabId/215/Default.aspx?VideoId=[ItemID]'><span style=\"font-family:verdana;font-size:8pt;\"><b>[Title]b>span>a>\n            <div style=\"font-family:Verdana;font-size:7pt;padding-top:3px;padding-bottom:2px;\">[Description]div>\n            <div style=\"margin-top:3px;border-top:2px solid #f2f2f2;padding-right:2px;padding:3px;\"><span style=\"font-family:Verdana;font-size:7pt;\">by {SUBQUERY, Name=\"qryPAVideoAuthor\", Query=\"SELECT Displayname as Name FROM dbo.Users WHERE UserID = [CreatedbyUser]\", \n\t\t\t\t\t    NoResultFormat=”N/A”,\n\t\t\t\t\t    Format=\"[Name]\", \n\t\t\t\t\t    SelectedFormat=\"\", SelectedField=\"Filename\",SelectedItems=\"1\", UseCache=False}<br />When:[CreatedDate] Views:[Views]span>div>\n        td>\n     tr>\ntable>","Connection":"","Filter":"","CacheTime":"","CacheName":"","CacheShared":"false"},"ActionType":"Template","ChildActions":[{"Index":11,"Level":0,"Parameters":{"Type":"Group-Footer","GroupStatement":"","GroupIndex":"","Value":"div>","Connection":"","Filter":"","CacheTime":"","CacheName":"","CacheShared":"false"},"ActionType":"Template","ChildActions":[]}]}]}]},{"Index":12,"Level":1,"Parameters":{"Value":"Default Region OnRender, used for the purpose of any runtime which will change the course of the outcome of the module, or handling of the general interaction."},"ActionType":"Action-Comment","ChildActions":[]},{"Index":13,"Level":0,"Parameters":{"Type":"Detail-NoResults","GroupStatement":"","GroupIndex":"","Value":"<div style=\"background-color:#f5f5f5;padding:3px;padding-left:5px;margin-bottom:10px;margin-top:10px;width:100%;font-family:verdana;font-size:12pt;\">Equine Videos


    After you import that code and modify it the way you wish, click publish. Then go to the page on which you placed the module and use "settings" to associate the module with the code configuration you made using the administration tool. Get the tab and module id for the OWS module and use it to load it into a tab using the moduleloader method that is well documented on AS. That's it.

    The General tab in the Administrator tool in OWS contains methods of controlling paging so you can pick and choose the options you want. I know this is a quick and dirty version but you might find it provides a method you can modify to suit your purposes.

    I can't say I'm much of an expert in using OWS but I have spent a bit of time with it and I can answer some very basic questions regarding the configuration and the general functions. The forums at OWS are well-supported if you have programming questions. 

    You are not authorized to post a reply.
    > Forums > Active Social > Themes and Templates > Possible solution for joining third party modules to AS Groups
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy