Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  Looking for an idea on how to create an "About Members Section"
Previous Previous
 
Next Next
New Post 4/12/2007 11:06 AM
User is offline ttkachuk
2 posts
10th Ranked


Looking for an idea on how to create an "About Members Section" 

I am trying to create a list of all the registered members in a form of:

[Display Name]
[City], Province [Country]
[Biography]

I have the SQL Stmt of the data select that I want to display as:

select DisplayName,
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 65) as [City],
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 66) as [Province],
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 67) as [Country],
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 74) as [Biography]
from users
 inner join UserRoles on users.userid = userroles.userid
 where userroles.RoleID = 7
order by LastName

 

The issue that I have is that the [Biography] is loaded with html tags, etc.  So I am looking for a way to display in a HTML layout. 

Any help is greatly appreciated.

Thanks

ttkachuk

 
New Post 4/12/2007 6:23 PM
User is offline ttkachuk
2 posts
10th Ranked


Re: Looking for an idea on how to create an "About Members Section" 

I have a temporary solution that I have worked out, still looking for a better solution.  I build a SQL function and added that to my query to "remove all the tags"  Took an example from (http://www.thescripts.com/forum/thread591852.html) and modified to keep the <BR> and </p> and remove the rest.  I am sure I will have to keep modifing onward.

Modified query to be:

select DisplayName,
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 65) as [City],
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 66) as [Province],
 (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 67) as [Country],
 dbo.RemoveHTMLTags (Select PropertyValue from userProfile where UserID = Users.UserID and PropertyDefinitionID = 74)) as [Biography]
from users
 inner join UserRoles on users.userid = userroles.userid
 where userroles.RoleID = 7
order by LastName

 

Function Added to DNN Db

alter function dbo.RemoveHTMLTags
(
@tmpstr as varchar(8000)
)
RETURNS varchar(8000)
AS
BEGIN
declare @i int

set @i = patindex('%&lt;br&gt;%', @tmpstr)
while @i > 0
begin
 set @tmpstr = stuff(@tmpstr, @i, charindex('&lt;br&gt;', @tmpstr, @i) - @i + 10, 'wsxcderfv')
 set @i = patindex('%&lt;br&gt;%', @tmpstr)
end

set @i = patindex('%&lt;/P&gt;%', @tmpstr)
while @i > 0
begin
 set @tmpstr = stuff(@tmpstr, @i, charindex('&lt;/P&gt;', @tmpstr, @i) - @i + 10, 'wsxcderfv')
 set @i = patindex('%&lt;/P&gt;%', @tmpstr)
end

set @i = patindex('%&amp;nbsp;%', @tmpstr)
while @i > 0
begin
 set @tmpstr = stuff(@tmpstr, @i, charindex('&amp;nbsp;', @tmpstr, @i) - @i + 10, ' ')
 set @i = patindex('%&amp;nbsp;%', @tmpstr)
end

set @i = patindex('%&lt;%&gt;%', @tmpstr)
while @i > 0
begin
 set @tmpstr = stuff(@tmpstr, @i, charindex('&gt;', @tmpstr, @i) - @i + 4, '')
 set @i = patindex('%&lt;%&gt;%', @tmpstr)
end

set @i = patindex('%wsxcderfv%', @tmpstr)
while @i > 0
begin
 set @tmpstr = stuff(@tmpstr, @i, charindex('wsxcderfv', @tmpstr, @i) - @i + 9, '<br>')
 set @i = patindex('%wsxcderfv%', @tmpstr)
end

return @tmpstr
END

 
New Post 4/12/2007 9:52 PM
User is offline Andrew Nurse
366 posts
8th Ranked






Re: Looking for an idea on how to create an "About Members Section" 

This is a known issue (RPT-5449) but unfotunately its a little non-trivial to come up with a blanket fix that will work in all situations. In particular, there may be cases where the data should be HTML Decoded (as in the Biography) but there may also be cases where it should not be decoded (for example, if you intend to show the markup). In the mean time, you might check out the XSLT Visualizer, I believe the Help button under Reports Module Settings in the Module Settings page has a description of the XML format that is used by the XSLT Visualizer. That may allow you to do the HTML Decoding.


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post 4/13/2007 6:44 PM
User is offline jyo
63 posts
10th Ranked


Re: Looking for an idea on how to create an "About Members Section" 

I think you should add this in your code to eliminate the tags.

HttpUtility.HtmlDecode(Biography).

I think this will be helpful.

Thanks

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  Looking for an idea on how to create an "About Members Section"
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP