The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

New Member Popup/Tutorial

2 posters

Go down

In progress New Member Popup/Tutorial

Post by DesignersSociety April 2nd 2015, 5: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
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by Ange Tuteur April 2nd 2015, 9: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
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by DesignersSociety April 2nd 2015, 7: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
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: New Member Popup/Tutorial

Post by Ange Tuteur April 2nd 2015, 10: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
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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