The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

New Member Popup/Tutorial

View previous topic View next topic Go down

In progress New Member Popup/Tutorial

Post by DesignersSociety on April 2nd 2015, 2:54 am

I've created a tutorial using WalkMe and I want it to appear for new members only. My question is if there's a way to create a popup like element that will appear on all pages of the site, but only for new members? I'm not sure if there's a way to detect like their first few times logging into the site or my other guess is a javascript that detects if the join date has been within a week or something? I don't have a whole lot of time to put research into that myself so I was wondering if anyone else has done something like this? Basically content only visible to new members within the first few days or a week? It'd really really help me out, thanks in advanced

DesignersSociety
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by Ange Tuteur on April 2nd 2015, 6:00 am

Hi @DesignersSociety,

It can depend, how do you classify "New members" on your forum ? By post count, time registered ?

On the support, we have a temporary popup for members with 0 posts which is removed after one post. Mostly to inform users about the PM post minimum. The condition for that would be :
Code:
if (_userdata.user_posts > 0) {
  // executable code
}

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by DesignersSociety on April 2nd 2015, 4:50 pm

@ange tuteur Thank you I actually didn't think of using post count which works better really. Although i may want to check the join date for other features. Like lets say after 30 days on the site they unlock a new feature.

DesignersSociety
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by Ange Tuteur on April 2nd 2015, 7:41 pm

I've not done this before, but it looks like we can convert the join date to a date object. Here's what I've written up :
Code:
$(function() {
 
  if (!my_getcookie('newMember') == 'false') {
   
    $.get('/u' + _userdata.user_id, function(d) {
   
      if (+new Date($('#field_id-4 dd', d).text()) > +new Date + 30*24*60*60*1000) {
        my_setcookie('newMember','false'); // set a cookie so we don't send anymore requests for old members
      } else {
        // code to execute if member is new.
      }
   
    });
   
  }
 
});

Depending on what you're doing, you might also want to set newMember to false or use a new cookie in the else statement so it doesn't send a request on each page change for new members.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum