selection – What is the most appropriate way to ask user to select few (10 for example) categories from a list of thousands to proceed with the app

I would suggest creating a short list of broad “top-level categories” that every other category can be grouped into (maybe around 20 of them). For example:

Technology, Art, Leisure, etc.

Then (painfully) link your thousands of categories to those top-level categories.

That way, when the user signs up, they can pick which of those handful of top-level categories interest them. Then you can automatically assign all related categories to that user (or limit it to a random subset if you don’t want too many).

I would then suggest that a feature of the application is that when showing content to the user, they can clearly see the original category and provide an easy option for them to “unsubscribe” if they don’t like that content.

Yes, it’s a lot of work for you in the back end, but that’s your selling point – you do the heavy lifting, so that the user doesn’t have to.

php – After creating Custom post type by user delete old one

I have created a form where users update their profile. When a profile is created or updated it creates a CPT called course. The url is the permalink + /course/ + the title of the course

/*  CREATING COURSE PAGES FROM USER PROFILES */

function create_course_page( $user_id = '' ) {
   $user = new WP_User($user_id);
   if ( ! $user->ID ) return '';

   // check if the user whose profile is updating has already a post
   global $wpdb;
   $course_post_exists = $wpdb->get_var( $wpdb->prepare(
   "SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type = 'course' and post_status = 'publish'", $user->course_name
   ) );

  if ( ! in_array('instructor', $user->roles) ) return '';

  $user_info = array_map( function( $a ){ return $a(0); }, get_user_meta( $user->ID ) );
  $title = $user_info('course_name');
  // of course create the content as you want
  $content = 'This is the page for: ';
  $content .= $user_info('description_course');
  $post = array(
    'post_title' => $title,
    'post_name' => $user->course_name,
    'post_content' => $content,
    'post_status' => 'publish',
    'post_type' => 'course'
  );
  if ( $course_post_exists ) {
    $post('ID') = $course_post_exists;
    wp_update_post( $post );
  } else {
    wp_insert_post( $post );
  }
}

add_action( 'personal_options_update', 'create_course_page' );
add_action( 'edit_user_profile_update', 'create_course_page' );

The problem that I’m facing is that when someone changes the title of the course it creates a new post with this url.

So I want to delete the old post when a title change is done on the course.

NOTE: When changing title of the course it changes the URL, that is why I think it takes like a new post.

I have customised this code a bit to do the job:

/* REMOVE OLD COURSES WHEN UPDATE */
add_action( 'admin_init', 'removing_older_posts' );
function removing_older_posts() {
    $args = array (
        'post_type'         => 'course',
        'author'            => get_current_user_id(),
        'orderby'           => 'date',
        );
    $query = new WP_Query( $args );

    if ( $query->have_posts() ) { //if the current user has posts under his/her name
        $i = 0; //create post counter
        while ( $query->have_posts() ) { //loop through each post
            $query->the_post(); //get the current post
            if ($i > 0) { //if you're not on the first post
                wp_delete_post( $query->post->ID, true ); //delete the post
            }
            $i++; //increment the post counter
        }
        wp_reset_postdata();
    }
}

But it isn’t working.

Appreciate any suggestion 🙂

7 – Where do I check whether the logged-in user is administrator, moderator, or just an authenticated user?

I have two separate login pages for users and administrators: /users/login and backend/login.

I have created a new function in my custom theme.

  function customtheme_theme() {
    $items = array(); 
    $items('user_login') = array(
      'render element' => 'form',
      'path' => drupal_get_path('theme', 'customtheme') . '/templates/user',
      'template' => 'user-login',
    );

    $items('user_pass') = array(
      'render element' => 'form',
      'path' => drupal_get_path('theme', 'customtheme') . '/templates/user',
      'template' => 'user-pass',
    );

    return $items;
  }

In /sites/all/themes/customtheme/templates/user, I created 2 files, user-login.tpl.php and user-pass.tpl.php. In user-login.tpl.php, I put the following code.

<?php $login_form = drupal_get_form("user_login"); ?>

<?php print $messages; ?>

<input autocomplete="off" type="text" 
value="<?php echo $login_form('name')('#value'); ?>" 
id="<?php echo $login_form('name')('#id'); ?>" 
name="<?php echo $login_form('name')('#name'); ?>" 
placeholder="Enter your username" required="" 
oninvalid="this.setCustomValidity('Username id is required')" 
oninput="setCustomValidity('')"/>

// password field..
// actions ..

So, I used the same setup for the admin login as well.

I created a new template at /sites/all/themes/customtheme/templates/page/page–backend.tpl.php. In that page, I just rendered the user_login form.

$elements = drupal_get_form("user_login"); 
$form = drupal_render($elements);   
echo ($form);

Now, both pages are working fine, but I need to show some message saying you are not allowed here if normal users logged in through the backend form.

I am not able to figure out at which place/file/path I need to check for the user role and display the message (push to $messages).

personas – How to start a user journey map for a new product and how does it translate to a product backlog?

I’m working on a new product that’s a talent marketplace for the events and entertainment space. The client has a rough idea (like 20%) of what the user journey would be like.

I’m curious how should i go about setting up the foundations for a user journey map. Right now i’ve identified 3 personas that would use the product for different reasons and i’m guessing there will be 3 user journeys.

Should i brainstorm with the client to build this journey? If so what would be a suitable brainstorming method? Also how could i validate this journey with real users?

Lastly, as the user journey gets more detailed, how this would connect to the product roadmap or product backlog?

windows 10 – How to run Office 365 applications as another user?

I have created a user (and set it is a part of Administratorsand Users) with password using the Computer Management program.

When I try to run an Office 365 application as that user via clicking Run as another user and inputting the correct username and password, I get this error message:

enter image description here

A specified logon session does not exist. It may already have been terminated

I am only able to run Office 365 applications as that user when I am logged in into that user’s Windows account.

What exactly is stopping me from running Office 365 applications as another user and how do I overcome it, if possible?

interaction design – How can I conduct user research on a product that already exists?

How can I conduct user research on a product that already exists?

Remember that User Research is a tool for discovering information about actual or potential users. This being said, don’t worry if the product already exist it’s perfectly normal to still perform a User Research.

Isn’t this backwards?

Not really. User Research can be done before or after a product launches. In both cases the goal will be to acquire information from users for a better understanding of them.

How can I conduct user research after the product already exists? // How should I go about this?

There are many ways on how to conduct a User Research. Mainly, information can be qualitative or quantitative. Some of the methods for acquiring information from users can be:

  • Analytics
  • Surverys
  • Tree Jacking
  • Eye Tracking
  • A/B Testing
  • Card Sorting
  • Contextual Inquiry
  • Heuristic Evaluation
  • Diary Study and more…

Remember that the role of the UX Designer will be to determine which methods will gain the information needed for the project and business goals.

For more about User Research visit:

authentication authorization – Where do I check whether logged in user in administrator, moderator or just authenticated user in Drupal 7?

I have 2 separate login pages for users and administrators userslogin and backendlogin.

I have created a new function in my custom theme as follows,

  function customtheme_theme() {

  $items = array(); 

  $items('user_login') = array(

    'render element' => 'form',

    'path' => drupal_get_path('theme', 'customtheme') . '/templates/user',

    'template' => 'user-login',

  );

  $items('user_pass') = array(

    'render element' => 'form',

    'path' => drupal_get_path('theme', 'customtheme') . '/templates/user',

    'template' => 'user-pass',

  );

  return $items;
}

and in /sites/all/themes/customtheme/templates/user I have created 2 files, user-login.tpl.php and user-pass.tpl.php.

Now in the user-login.tpl.php, I have put the following code,

<?php $login_form = drupal_get_form("user_login"); ?>

<?php print $messages; ?>

<input autocomplete="off" type="text" 
value="<?php echo $login_form('name')('#value'); ?>" 
id="<?php echo $login_form('name')('#id'); ?>" 
name="<?php echo $login_form('name')('#name'); ?>" 
placeholder="Enter your username" required="" 
oninvalid="this.setCustomValidity('Username id is required')" 
oninput="setCustomValidity('')"/>

// password field..
// actions ..

So, I used the same setup for the admin login as well.

Created a new template at /sites/all/themes/customtheme/templates/page/page--backend.tpl.php

So in that page, I just called the user_loin form as below,

$elements = drupal_get_form("user_login"); 

$form = drupal_render($elements);   
echo ($form);

Now, both pages are working fine, But I need to show some message saying you are not allowed here if normal users logged in through backend form.

Am not able to figure out at which place/file/path I need to check for the user role and display the message(push to $mesages).

design – Making a GUI for receiving/checking user input – how to arrange GUI and validation checks

Sorry if my question sounds general, I’m new to GUI and frontend/backend ideas and all that (mostly I just do scripts for math hw and such) but I make it more specific here. I have a program that runs through various processes (A -> B -> C -> etc), where each process depends on different user inputs. So here’s what I think is needed:

  1. A notebook where each page has parameters for each process, and the user can submit their inputs.
  2. Instant checks as the user inputs parameters – if they select something and a new option becomes available, or if they put in a bad character so an error pops up – all of these should occur immediately, which Tkinter allows with function calls when values change.
  3. And finally, I also want the user to be able to load input files and have the contents be checked, presumably with the same functions used by the GUI, but not necessarily through the GUI; that is, if it’s just being checked, this could be done through the command line

So my question is: what are the design principles I should follow for this? I’m thinking:

  1. A top-level Input_GUI.py class that gets pages based on what parts of the process the input wants to run.
  2. Each Process/Page should have a class that just organizes the widgets on the page, e.g. A_page.py, B_page.py. Each widget will have a function call to the appropriate function for checking, so –
  3. Each process/page should also have a class with functions that check the input parameters, e.g. A_checks.py
  4. As for users being able to load/check input files, maybe this would mean the Page classes would have a constructor that would accept an input file and set the parameters, then have the Page class also call the Checks?
  5. If the user wants to check input files on the command line, the Page class could print out any errors that occurred?

To figure out the correct approach, I looked for open-source software that might have similar things pop up – FileZilla had some similar GUIs for inputs, and I think they have all their function checks in cpp files like this one (manual_transfer.cpp), but not sure where the GUI details are (I’m not very familiar with C++). The TkDocs also showed a small example of a Query Dialog (under section Idle Dialogs), where they include the validation check as part of the widget function. Is this the way to go? Any thoughts would be much appreciated!