Advertisement:

Author Topic: Welcome Topic  (Read 226463 times)

Offline MadMick

  • Charter Member
  • Jr. Member
  • *
  • Posts: 125
  • Gender: Male
    • Australian Hunting Net
Re: Welcome Topic
« Reply #720 on: May 26, 2017, 01:13:19 AM »
Thank you so much mate, now to wait a little while until a new member joins :)
Regards,

Mick.

AHN Moderators - Can explain it to you, but they can't understand it for you" :upu:

Offline mysimplesite

  • Semi-Newbie
  • *
  • Posts: 53
Re: Welcome Topic
« Reply #721 on: August 16, 2017, 11:03:58 AM »
SMF 2.0.14, php 7

Does Welcome Topic automatically add a Welcome Post if the new member registers using a Social Login mod?

I have the registration set for 'email activation' in the Members Settings.

My concern is visitors joining the forum using Facebook or Twitter etc to sign in won't get the Welcome Topic posted in the board I've assigned.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,273
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Welcome Topic
« Reply #722 on: August 16, 2017, 11:26:05 AM »
Not sure probably not.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline mysimplesite

  • Semi-Newbie
  • *
  • Posts: 53
Re: Welcome Topic
« Reply #723 on: August 16, 2017, 11:58:02 AM »
Oh well, still it's a great mod and I thank you for it.

Offline Apostaganha

  • Semi-Newbie
  • *
  • Posts: 82
  • Gender: Male
    • Apostas
Re: Welcome Topic
« Reply #724 on: August 16, 2017, 08:31:40 PM »
great mod

Offline ivanr

  • Semi-Newbie
  • *
  • Posts: 29
Re: Welcome Topic
« Reply #725 on: Today at 06:57:35 AM »
I have created a Custom Profile;
First Name
Last Name

How do I put the correct syntex in the Welcome Member Topic
at the moment I have   

Welcome to the UKVGA {username}

How do I change it for First Name and Last name

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,273
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Welcome Topic
« Reply #726 on: Today at 09:20:13 AM »
You would have to write the code to pull in custom profile fields. You would have to a query before that to load that data.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline ivanr

  • Semi-Newbie
  • *
  • Posts: 29
Re: Welcome Topic
« Reply #727 on: Today at 11:29:53 AM »
OK thanks,
Would anybody know what the script is? my PHP coding is very basic. I guess it would go in Managemembers.php under Welcome Topic Mod but I have not a clue on the script.

Our old script when using realname mod with SMF1.1.21 is as below but SMF 2.0.14 Welcome Topic Mod is different.

// Welcome Topic Mod
   require_once($sourcedir . '/Subs-Post.php');
   if ($modSettings['welcome_boardid'] != 0)
   {
      global $db_prefix;
      
      $result = db_query("SELECT welcomesubject, welcomebody FROM {$db_prefix}welcome
       ORDER BY RAND() LIMIT 1", __FILE__, __LINE__);
      if (mysql_num_rows($result) != 0)
      {
         $row2 =  mysql_fetch_assoc($result);

         foreach ($member_info as $member)
         {
                  $msgOptions = array(
                           'id' => 0,
                           'subject' => str_replace("{username}",$member['name'],$row2['welcomesubject']),
                           'body' => str_replace("{username}",$member['name'],$row2['welcomebody']),
                           'icon' => 'xx',
                           'smileys_enabled' => 1,
                           'attachments' => array(),
                        );
                        $topicOptions = array(
                           'id' => 0,
                           'board' => $modSettings['welcome_boardid'],
                           'poll' => null,
                           'lock_mode' => null,
                           'sticky_mode' => null,
                           'mark_as_read' => false,
                        );
                        $posterOptions = array(
                           'id' => $modSettings['welcome_memberid'],
                           'name' => $modSettings['welcome_membername'],
                           'email' => '',
                           'update_post_count' => (($modSettings['welcome_memberid'] == 0) ? 0 : 1),
                        );

            createPost($msgOptions, $topicOptions, $posterOptions);
         }
      }

      mysql_free_result($result);