Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Ok, so how do I do these?

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
chocolate
Posts:51



11/20/2007 10:00 AM  

I must say I'm frustrated with the answering from the Dotnetnuke Forums. They do not understand what someone wants. What they care is that the answer is as short and as vague as possible. I think you're the only one who answers our questions with real attention.

Ok, so here are my 2 questions:

1. Regarding validation: (I was told to create a custom validation but I don't know how to create it at all)

  • Disallow users to use space in their usernames. That means username "Peter Parker" is not permitted.
  • Allow symbols such as "_", "-", "." in Child Portal's aliases. I think restricting these is nonsense since a lot of people name their website "john_woo" or "john.woo"...

2. Regarding Reports module:

          I want to display the total page views of the current portal. The code must be dynamically generated based on the portal it is on.

Best regards, John. I appreciate your commitment.

Duc Le

 


Pijaja.Com - Innovative Site Builder
chocolate
Posts:51



11/21/2007 6:14 AM  

I've found the solution for #1:

In Signup.ascx.vb, change to these (modifications are yellow highlighted):

For intCounter = 1 To txtPortalName.Text.Length
                            If InStr(1, "abcdefghijklmnopqrstuvwxyz0123456789-_.", Mid(txtPortalName.Text, intCounter, 1)) = 0 Then
                                strMessage &= "
" & Localization.GetString("InvalidName", Me.LocalResourceFile)
                            End If

and

Dim strValidChars As String = "abcdefghijklmnopqrstuvwxyz0123456789-_."
                        If Not blnChild Then
                            strValidChars += "./:"
                        End If

You'll be able to create aliases such as "spider_man" or "spider.man"


Pijaja.Com - Innovative Site Builder
John Mitchell
Posts:3478



11/21/2007 10:09 AM  
Hi Duc,
I'm not ignoring you, but your question takes a little digging to find out the best answer.
Thanks for posting your solution to the Portal Naming validation. I didn't realize they had that restriction in the code.

For the Page Views you are going to need to specify the query explicitly for each module in each portal so you can put the portalid in.
There is not an option in the reports module to use a dynamic token in the query that I know of.

chocolate
Posts:51



11/22/2007 5:52 AM  

That's ok, John. I understand your situation.

I'm trying to use SQL View from DnnStuff. It allows [dnn:portalid] to be used in the reports. Can you give me a query to get the REQUEST count for the current portal? I really suck at SQL.

1 more thing. The {objectQualifier}Portals.PortalName only returns the portal titles. Is there a way to return portal aliases?


Pijaja.Com - Innovative Site Builder
John Mitchell
Posts:3478



11/26/2007 10:22 PM  

Here's a query that will give you the name and the number of Requests recorded in the SiteLog for Portal 0

SELECT     COUNT(SiteLog.SiteLogId) AS RequestCount , Portals.PortalName
FROM         SiteLog INNER JOIN
                      Portals ON SiteLog.PortalId = Portals.PortalID
WHERE     (SiteLog.PortalId = 0)
GROUP BY Portals.PortalName

To use your Token it would be

SELECT     COUNT(SiteLog.SiteLogId) AS RequestCount , Portals.PortalName
FROM         SiteLog INNER JOIN
                      Portals ON SiteLog.PortalId = Portals.PortalID
WHERE     (SiteLog.PortalId = [dnn:portalid])
GROUP BY Portals.PortalName

chocolate
Posts:51



11/27/2007 5:20 AM  

Thanks man! Works like a charm.


Pijaja.Com - Innovative Site Builder
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >General-DNN-Help > Ok, so how do I do these?



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 Performance for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

Item codeXDAkuna
AuthorNina Meiers
Price$49.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

AuthorNina Meiers
Price$49.00
Product Information