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 ForumsEventsEventsPersonalized events calendarPersonalized events calendar
Previous
 
Next
New Post
3/30/2006 5:07 PM
 

In addition, you would need to address all other modules and security/roles that is built-in to the existing modules...

If you get it to work, add a "Settings Parameter" to control it, and can maintain all existing functionality, I will be glad to roll it into the next release...please keep track of the modified code lines, so I can re-integrate it.  Thanks.

 
New Post
3/30/2006 6:34 PM
 

We know we need to pass the log in user's UserID, but how do we get it? I think adding the following lines to the .vb file will give it to me, but not quite sure.

Imports System.Web.Security

Imports AspNetSecurity = System.Web.Security

Imports DotNetNuke.Security.Roles

Dim objUser as UserController

Dim objUserInfo as UserInfo

objUserInfo = objUser.GetUserByUserName(PortalID, userControl.UserName)

 

 
New Post
4/4/2006 1:08 PM
 
I finally figured out I had a bad reference to the DotNetNuke.dll and fixed it, now everything intellisences like its supposed to. I still can't figure out how to get the 03.02.00SqlDataProvider to add the UserID to the events table, or use my altered stored procedure which filters on the UserID. I changed the EventsGetByRange by adding a @UserID parameter, then in the WHERE I added UserID = @UserID, starting at the LoadEventDateRange and working back to the definition of the function I added the UserID as a parameter, also adding to every call and definition of EventsGetByRange. The altered files are DataProvider.vb, EventController.vb, EventMonth.ascx.vb, and SqlDataProvider.vb. I manually placed a field in the database called UserID and gave my one event an ID other than the one I use to log in, yet I still see it. I can only imagine my stored procedure isn't firing on install. Any suggestions?
 
New Post
4/4/2006 4:28 PM
 
I figured out the stored procedure part finally and now I have a new problem. After installing the new events module with the changes I made; the calendar won't display at all, in the options all the new features such as importing an AVCalendar, creating an appointment, and the new options for categories don't show up either. I figured it had something to do with the LoadEventDateRange function being filtered on the UserID so I removed that parameter throughout the module, so only the EventsGetByRange function (which is called by the LoadEventDateRange function) has the parameter for the UserID. Still nothing shows up. Also under the module settings, when I go to look at the Events settings all the new options you created in Admin settings and Notification settings are replaced with "Event width/height". Any idea's where I might have screwed up?
 
New Post
4/14/2006 6:56 PM
 
Alan, just a little update on my progress and a question. So far I've been able to get the calendar to filter based on the logged in user. The problem is it only shows events that are assigned to the logged in user. I imagine what is needed is if there is no designated user for the event that everyone sees it, but if there is a designated user only they will see it. I only had to modify a few places to achieve this, the dataprovider.vb, eventcontroller.vb, the sqldataprovider.vb, and the 03.02.00.sqldataprovider files. Basically adding a userid parameter to each call of the EventsGetByRange function, while adding the userid and filter to the stored procedure of the EventsGetByRange function and adding a field to the events table called EventUserID (UserID was to unambiguous).

Now my question... Here's the important parts of the stored procedure
CREATE PROCEDURE {databaseOwner}{objectQualifier}EventsGetByRange
(
    @ModuleID int,
    @BeginDate datetime,
    @EndDate datetime,
    @UserID int
)
... followed by code

WHERE ((EventDateBegin  BETWEEN @BeginDate AND @EndDate)
    AND (SendReminder = 1)   
    AND (Approved = 1)
    AND (EventUserID = @UserID)) OR
    ((EventDateEnd  >= @BeginDate)
    AND (SendReminder = 1)   
    AND (Approved = 1)
    AND (EventUserID = @UserID))
  ORDER BY EventDateBegin, EventTimeBegin, EventDateEnd
END

As I'm sure you see there is the new parameter @UserID, which I've added a filter to the where clause of (EventUserID = @UserID). This is what limits the event to only be seen by the currently logged on user. How would you go about saying WHERE ... AND ((EventUserID = @UserID) OR (EventUserID = NULL)). I say NULL because if there is no EventUserID assign the value is NULL. I tried it just like I typed it here, but it didn't seem to work to well, perhaps I need something other than NULL?
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsPersonalized events calendarPersonalized events calendar


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