collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 1107
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Help Capturing Additional Info  (Read 4398 times)

0 Members and 1 Guest are viewing this topic.

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Help Capturing Additional Info
« on: January 29, 2011, 07:08:24 AM »
One site that I have created can be used by members and non-members alike; and they would like me to add a block to the landing page that can quickly gather the users email address and/or cellular number to be used to inform them of site updates via email/text.  I've done quite a bit of searching here and on SMF, but either I'm searching for the wrong terms, or it just doesn't exist as a mod or block.

Is there a way to add a text box or two along with a submit button that would capture the information to a new table and/or email the information to a particular address?  I know the functionality is at the core of SMF/SP, but how do we leverage that functionality for custom use?

Are there maybe wiki's on how to create a db table and manipulate the information via a block or custom code?  Any help or direction would be greatly appreciated.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #1 on: February 10, 2011, 12:40:57 PM »
You can certainly use custom profile fields to hold additional member information.
After that, you'd have to write some code to actually make use of that information.
 
But you have website followers who DO NOT WANT TO REGISTER but WANT you to send them email and text? So anybody can just enter an email or phone # and get your updates sent to, well, anybody in the world?  You want an email list for that.  You aren't going to find that at SMF, but there are plenty of free ones out there, at least for email.
 
Once you've got it working, you can even put it in a SimplePortal block.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #2 on: February 14, 2011, 10:16:12 AM »
Thank you for the reply.  Yes, that's exactly what they want.  The site is a transit union website and they want to be able to capture both union members and riders (i.e.; customers) email addresses and/or cell numbers for "call to action" type blasts.  I tried leading them in the direction of twitter (because that's what twitter does best), but they want this instead <shrug>.

I know SMF (and SP) both use sendmail.  Would it be possible to mock up a simple HTML form with the PHP code to send the results via sendmail?  Has anyone ever done this?  For example, I see the following code in ManageMembers.php (this particular block is for sending email for activated users):

Code: [Select]
$replacements = array(
'USERNAME' => $member['name'],
'ACTIVATIONLINK' => $scripturl . '?action=activate;u=' . $member['id'] . ';code=' . $validation_code,
'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate;u=' . $member['id'],
'ACTIVATIONCODE' => $validation_code,
);

$emaildata = loadEmailTemplate('admin_approve_activation', $replacements, $member['language']);
sendmail($member['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
}
}

Obviously, I'm most interested in the sendmail line at the end.  What would I need to change in order to use my form blocks instead of pulling from the db?  Is this just standard PHP sendmail?  Can I just google it for examples or are there special rules to follow?




Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #3 on: February 14, 2011, 11:24:50 AM »
Did you say you wanted to be able to send email to people who are not registered members of the forum?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #4 on: February 14, 2011, 01:05:33 PM »
Actually, we're simply gathering email addresses and/or cell phone numbers for the purposes of email blasts.  So I'm not interested in storing this information in a database anywhere, I simply want to take the contents of the message that is generated and mail it off to someone who is building a mailing list.


Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #5 on: February 14, 2011, 01:07:25 PM »
I realized that I didn't answer your question.  Yes, we are interested, ultimately, in capturing members and non-members email addresses and/or cell phone numbers for the purposes of sending them out notices.  BUT, we're not looking to email non-members from within SMF/SP, but rather send their name/cell to another email address so they can manually build a mailing list.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #6 on: February 14, 2011, 01:37:31 PM »
Have you considered free mailing list software like Subscribe Me Lite, and other similar packages?
You install the cgi, you put a tiny (two-line )form in a block on your portal, the email list just works.
Very little hassle for you -- nothing to build.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #7 on: February 18, 2011, 02:51:54 PM »
Just wanted to give an update here.  I ended up going with NateMail, which just takes the information from a form and mails it to an address of your choosing.  I picked NateMail because it's a little more secure than other mail programs. 

The only thing I can not seem to do cleanly is have the "thank you" redirect page show up inside of the block that called the mail script.  Is this even possible? 

Even still, it's working perfectly, I just have the redirect link back to the main page and all

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #8 on: February 18, 2011, 03:21:28 PM »
Having the redirect show up in the same block would be awfully tricky, when you think about it, if you are passing the login information to an external CGI.
 
If it is just a generic "thank-you" page, I suppose that would be possible -- if you can tell your email software a specific URL, the block code could look for an extra parameter in the URL and decide to show the thank-you page.
Your solution gets you 80% of the way there, though, and is easier.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help Capturing Additional Info
« Reply #9 on: February 18, 2011, 04:44:09 PM »
I suppose I will tackle that when I have a bit more time.  80% there plus the path of least resistance equals a happy man (at least for me).      :)

Thank you for the help.  As always, it's greatly appreciated.