Multiple distinct YAFNET forums (via different pages) on same site - asp.net

I have an existing YAFNET forum at http://www.paydirt.co.nz/forums/ concerned with Gold Fossicking and Metal Detecting. At present these two "Categories" are all grouped together on a single page.
Unfortunately from time to time I get a bit of bickering between the gold fanciers and the swingers so I'd like to separate these out across two distinct pages:
http://www.paydirt.co.nz/forums/gold (could end in .aspx if required)
http://www.paydirt.co.nz/forums/metal-detecting (could end in .aspx if required)
I'd like the users to be shared across both pages without users re-registering (as some users contribute to both areas), but the pages themselves I'd like to be be filtered by category. Each page would only show "Active Discussions" for the category used.
Is it possible to setup 2 distinct pages each with a YAFNET user control on, but using parameters on the user controls which will filter the categories shown on each?
I do see that it's possible to setup multiple "boards", and I could move some categories manually via an update to the database. However, I also notice that the yaf_User table has a BoardID so this would suggest users are tied to a single board.
As a bonus nice-to-have, I'd ideally like the "Discussion" category (which is a general discussions area for anything) to be shared between these two pages. Though I suspect this might be asking a little too much.
Thanks in advance for any ideas or solutions!

YAF.NET always pulls users from the current Membership Provider. The yaf_User table is a sync from the Membership Provider. For example, when an existing membership user visits a new board, YAF.NET will automatically create an new entry in yaf_User for that user and keep them synced.
Multiple controls with different board setting should do what you need. They do require unique "Pages", though.

Related

roll up similar pages into some kind of "page type"

I've got an app that has a /restaurants URL, which lists restaurants.
Each restaurants has a URL like: /restaurants/
So, GA reports pages views like:
/restaurants
/restaurants/1234
/restaurants/3456
This means that when I view the "Behavior Flow" tab in GA, there are hundreds of little boxes for each individual restaurant. It would be more informative (in some cases) to lump all 'restaurant' pages together.
However -- I do not want to do away with the granular URL identifiers for each different restaurant all together, because that it is useful in some other reporting.
So, should I be passing some different data with each page view? Should I use events? Ideally, this is a change to the code that is reporting data so that I don't have to add some configuration change to every view that uses this data.
I'd suggest to use Content Grouping, which can be set on View level. In your case, use rule definition for creating a page group of restaurants, which can be later used as a dimension in your reports. E.g. create a page group Restaurants, and define a rule for Page containing /restaurants/
This way, you won't need to alter basic data collection, and you'll still access per restaurant details in Page reports.
However, if you'd have more than 5 of these content groups, you might consider a different logic for grouping.

Track user's action

In our company I have to extend the functionality of existing Drupal 7 website. Here are the requirements:
The business needs to inform all staff members, on different topics using uploaded to the Drupal site documents. (I already implemented this requirement.)
The business needs to know, which staff members have read a document and which still have not.
They need a report like this:
Document 1 25/50 (25 from 50 staff members still didn't read the file)
Document 2 50/50 (all staff members did read the file), etc.
In order to fulfill the second business requirement, I need a module which can track specific user's activity (in my case click on a link to download a file, which means the file is read). The module(s) have to be able to create a report like the one above.
(All staff members have a drupal account with a specific role.)
Is there any drupal module I can use or maybe a part of it. Or the requirements are too 'custom' and I have to create my own module.
I created almost exactly the feature you need. I would be glad to help you in the process.
I developed indeed a full custom module. And I could tell you that you will need different things:
A custom table in your DB to store the data
A custom entity called "track" or "action" that will be stored in the DB
Implementing the right hooks to create a track when you want to keep a track of a user's action
A custom page or block to display the tracks you stored in your DB with a custom query and appropriated permissions
To achieve all that, I suggest you to take a look at these pieces of documentation:
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_schema/7
https://www.drupal.org/node/878784
https://api.drupal.org/api/drupal/includes!module.inc/group/hooks/7
https://www.drupal.org/node/1343708
http://befused.com/drupal/page-programatically
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_permission/7
Hope it will help.

Using Active Directory to restrict access to data in webforms app (mainly through populating dropdowns)

Please review the scenario and solution I came up with. If it sucks please tell me so.
Scenario
Need to create an application for submitting & viewing accidents reports that will be used by 50 schools. When submitting a form, an employee will select their school from a dropdown. Likewise when viewing accident reports, the employee will select their school from a dropdown. Some employee's are to be assigned multiple schools. Thus the dropdown needs to be populated with each school they are assigned to. The IT department wants to control the population of the dropdowns using Active Directory.
Possible Solution
Within Active Directory, create an organizational unit called AccidentReportingSchools
Within the organizational unit, create a security group for each school.
Add an attribute called SchoolName to the security group
Add an attribute called SchoolID to the security group
Write an active directory query to return all of the security groups that are within the AccidentReportingSchools organizational unit (created from step 1) that the logged in employee is a member of.
When an employee logs into the application, create a session variable or cookie for storing the employee's schools. Populate it based on the results of the active directory query.
Use the cookie/session variable to populate the dropdowns.
Alternate Solution
Tell the IT department that Active Directory is not well suited in this particular situation and that a database table should be used for assigning employees to their schools.
It doesn't sound like a bad idea. Though I don't think you need to setup an attribute for SchoolName. You can just go by the name of the AD Group. I have something similar (though not nearly as large in scope.) I created a basic Intranet page for IT Trouble Tickets.
And for what it's worth, if you plan on doing this through ASP.net look at MVC rather than WebForms.

create unique and editable profiles

I am working on a web development project that will require keeping records for around 3-4,000 companies. If possible I want to use a wordpress plugin that enables a user to CREATE a unique user account / profile and update their profile with their up to date information at a later date. I tested profile builder but it wont let non admins initiate a new account (something I dont want to do 4,000 times).
Information also needs to be searchable (income range, location, etc.). This is not necessarily a deal breaker as I could develop a second app to search the DB.
Right now I am trying to choose between building a app where a user can create an account and interact with a UI (time consuming). I hate to ask such silly question but I am not having much luck.
Approximate wireframe:
Enable user registration and dispatch the 4 thousand emails inviting to open an account.
The default User Profile system remains as it is, just basic user info (it's easy to remove stuff from that page and give it a nice style).
Create a Custom Post Type for the big profile with all the searchable capabilities this offers.
Limit the number of posts the user can manage to One.
Ask new questions as the specifics arise.

How to filter views in Drupal on current user (not author)

I am a relatively noobe on Drupal and I have hit a problem with Views that I've not been able to resolve by Googling and reading similar questions here.
I have ten pages in a content type "Book". I want to encourage users to read all of ten pages. My intention was to create a View that listed specifically for each user which pages they had opened.
I can create a View and produce a list of the pages.
I can filter the list on Content statistics: Total views (>= 1) to produce a list of pages that have been opened.
--- So far this works predictably and produces the same correct list for three roles: admin, anonymous and logged in user.
My difficulty is setting up the filter for current user. I am aware that the filter for current user does not come up until a relationship is set up. I have not been able to figure out the correct relationship to make a simple logged in user appear in the filter without being attached to author.
For further clarification, if it is relevant, the content type is the default book content type.
I would be grateful if anyone could steer me in the right direction
I don't think the content statistics (Total views) keeps a count PER user.
Is there a statistic for instance "visited pages" for users. Because you could match that url with the current url.

Resources