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  |  

DotNetNuke Marketplace
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


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
363 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.

 


BataviaSoft DotNetNuke Solutions
BataviaSoft offers custom DotNetNuke solutions especially for the European and the South East Asian market.
www.bataviasoft.com
Viva Portals, L.L.C.
Expert module development and graphic design.
www.continure.com
DNN Photo Gallery
DNN Photo Gallery is a truly unique photo management module released January 1st 2006. With DNN Photo Gallery you can REALLY integrate images into your existing portal and make them look like they were designed for your site.
DNN Photo Gallery

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