Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsHttpHandler LinkClick.aspxHttpHandler LinkClick.aspx
Previous
 
Next
New Post
7/30/2007 3:50 PM
 

This module only tracks file links.  Should I write my own HttpHandler to track clicks for urls, pages, and so forth?

Thanks

 
New Post
7/31/2007 12:27 AM
 

Actually it can track URLs, Files, Page and User links and this is set for each individual announcement.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
8/3/2007 6:48 PM
 

In this section (lines 88-99 of UrlController.vb) of code:

 

Dim objUrlTracking As UrlTrackingInfo = GetUrlTracking(PortalID, Url, ModuleId)
If Not objUrlTracking Is Nothing Then
   If objUrlTracking.TrackClicks Then
      DataProvider.Instance().UpdateUrlTrackingStats(PortalID, Url, ModuleId)
      If objUrlTracking.LogActivity Then
         If UserID = -1 Then
            UserID = UserController.GetCurrentUserInfo.UserID
         End If
         DataProvider.Instance().AddUrlLog(objUrlTracking.UrlTrackingID, UserID)
       End If
   End If
End If

objUrlTracking always comes back null

 

 
New Post
8/8/2007 11:03 AM
 

Can you please fix this?  Here's my httphandler:

 

 

public void ProcessRequest(HttpContext context)PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();// get TabId

 

 

{

TabId =

}

 

Int32 TabId = -1;if (context.Request.QueryString["tabid"] != null )Int32.Parse(context.Request.QueryString["tabid"]);// get ModuleId

 

 

{

ModuleId =

}

 

Int32 ModuleId = -1;if (context.Request.QueryString["mid"] != null )Int32.Parse(context.Request.QueryString["mid"]);// get the URL

 

 

 

 

 

{

URL =

}

 

{

URL =

URL2 = URL;

}

 

{

URL = context.Request.QueryString[

URL2 = URL;

 

{

URL =

string URL2 = string.Empty;string URL = string.Empty;bool blnClientCache = true;bool blnForceDownload = false;if (context.Request.QueryString["fileticket"] != null )"FileID=" + UrlUtils.DecryptParameter(context.Request.QueryString["fileticket"]);if (context.Request.QueryString["userticket"] != null )"UserId=" + UrlUtils.DecryptParameter(context.Request.QueryString["userticket"]);if (context.Request.QueryString["link"] != null )"link"];if ( URL.ToLower().StartsWith("fileid="))string.Empty; // restrict direct access by FileID

}

}

 

{

 

 

{

URL = DotNetNuke.Common.

}

 

{

 

if ( URL != string.Empty )TabType UrlType = DotNetNuke.Common.Globals.GetURLType(URL);if (UrlType != TabType.File)Globals.LinkClick(URL, TabId, ModuleId, false);if (UrlType == TabType.File && URL.ToLower().StartsWith("fileid=") == false)// to handle legacy scenarios before the introduction of the FileServerHandler

 

URL =

}

 

FileController objFiles = new FileController();"FileID=" + objFiles.ConvertFilePathToFileId(URL, _portalSettings.PortalId);// get optional parameters

 

{

blnClientCache =

}

 

{

blnForceDownload =

}

 

if (context.Request.QueryString["clientcache"] != null)Boolean.Parse(context.Request.QueryString["clientcache"]);if (context.Request.QueryString["forcedownload"] != null || context.Request.QueryString["contenttype"] != null)Boolean.Parse(context.Request.QueryString["forcedownload"]);// update clicks

 

 

{

objUrls.UpdateUrlTracking(_portalSettings.PortalId, URL2, ModuleId, -1);

}

 

UrlController objUrls = new UrlController();if (URL2 != String.Empty)else

{

objUrls.UpdateUrlTracking(_portalSettings.PortalId, URL, ModuleId, -1);

}

 

// clear the current response

context.Response.Clear();

 

{

 

 

switch (UrlType)case TabType.File:// serve the file

 

{

 

{

context.Response.Write(DotNetNuke.Services.Localization.

}

}

 

if (TabId == Null.NullInteger)if (false == FileSystemUtils.DownloadFile(_portalSettings.PortalId, Int32.Parse(UrlUtils.GetParameterValue(URL)), blnClientCache, blnForceDownload))Localization.GetString("FilePermission.Error"));else

{

 

{

context.Response.Write(DotNetNuke.Services.Localization.

}

}

 

 

 

if (false == FileSystemUtils.DownloadFile(_portalSettings, Int32.Parse(UrlUtils.GetParameterValue(URL)), blnClientCache, blnForceDownload))Localization.GetString("FilePermission.Error"));break;case TabType.Url:// prevent phishing by verifying that URL exists in URLs table for Portal

 

{

 

if (objUrls.GetUrl(_portalSettings.PortalId, URL) != null)// redirect to URL

context.Response.Redirect(URL,

}

 

 

 

true);break;default:// redirect to URL

context.Response.Redirect(URL,

 

}

}

}

true);break;

{

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsHttpHandler LinkClick.aspxHttpHandler LinkClick.aspx


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out