]> git.mxchange.org Git - friendica.git/commitdiff
new member page
authorFriendika <info@friendika.com>
Fri, 3 Jun 2011 13:12:34 +0000 (06:12 -0700)
committerFriendika <info@friendika.com>
Fri, 3 Jun 2011 13:12:34 +0000 (06:12 -0700)
include/auth.php
mod/newmember.php [new file with mode: 0644]
mod/profile.php

index fd80a63e221a553e6b484ec19c84e99e61297af3..d1eb9d131c7e27a6f090be7acf0698c8d9d2d8e5 100644 (file)
@@ -63,6 +63,12 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
                $_SESSION['theme'] = $a->user['theme'];
                $_SESSION['page_flags'] = $a->user['page-flags'];
 
+               $member_since = strtotime($a->user['register_date']);
+               if(time() < ($member_since + ( 60 * 60 * 24 * 14)))
+                       $_SESSION['new_member'] = true;
+               else
+                       $_SESSION['new_member'] = false;
+
                if(strlen($a->user['timezone'])) {
                        date_default_timezone_set($a->user['timezone']);
                        $a->timezone = $a->user['timezone'];
@@ -211,6 +217,13 @@ else {
                else
                        info( t("Welcome back ") . $a->user['username'] . EOL);
 
+
+               $member_since = strtotime($a->user['register_date']);
+               if(time() < ($member_since + ( 60 * 60 * 24 * 14)))
+                       $_SESSION['new_member'] = true;
+               else
+                       $_SESSION['new_member'] = false;
+
                if(strlen($a->user['timezone'])) {
                        date_default_timezone_set($a->user['timezone']);
                        $a->timezone = $a->user['timezone'];
diff --git a/mod/newmember.php b/mod/newmember.php
new file mode 100644 (file)
index 0000000..bc1fb75
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+function newmember_content(&$a) {
+
+
+       $o = '<h3>' . t('Welcome to Friendika') . '</h3>';
+
+       $o .= '<h3>' . t('New Member Checklist') . '</h3>';
+
+       $o .= '<div style="font-size: 120%;">';
+
+       $o .= t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page.');
+
+       $o .= '<ul>';
+
+       $o .= '<li>' . '<a href="settings">' . t('On your <em>Settings</em> page -  change your initial password. Also make a note of your Identity Address. This will be useful in making friends.') . '</a></li>' . EOL; 
+
+       $o .= '<li>' . '<a href="settings">' . t('Review the other settings, particularly the choice of publishing your profile to various directories. An unpublished directory is like an unlisted phone number. Great for privacy - but unless you inform all your friends, nobody can find you.') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="profile_photo">' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '</a></li>' . EOL;  
+
+       if(in_array('facebook', $a->plugins))
+               $o .= '<li>' . '<a href="facebook">' . t("Authorise the Facebook Connector if you currently have a Facebook account and we will \x28optionally\x29 import all your Facebook friends and conversations.") . '</a></li>' . EOL;
+
+    $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+       
+       if(! $mail_disabled)
+               $o .= '<li>' . '<a href="settings">' .  t('Enter your email access information on your Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="profiles">' . t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="profiles">' . t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="contacts">' . t('Your Contact page is your gateway to editing and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Connect</em> dialog.') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="directory">' . t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.') . '</a></li>' . EOL;
+
+       $o .= '<li>' . '<a href="help">' . t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.') . '</a></li>' . EOL;
+
+       $o .= '</div>';
+
+       return $o;
+}
\ No newline at end of file
index 52551c45f45bf0a9f555d1547e0396955865ca1f..68110d76196b61c9983e629b1efee35c56c57a3f 100644 (file)
@@ -126,6 +126,9 @@ function profile_content(&$a, $update = 0) {
                        return $o;
                }
 
+               if(x($_SESSION,'new_user') && $_SESSION['new_user'])
+                       $o .= '<a href="newmember">' . t('Tips for New Members') . '</a>' . EOL;
+
                $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
                $commvisitor = (($commpage && $remote_contact == true) ? true : false);