Previous Thread
Next Thread
Print Thread
Rate Thread
#283710 02/21/2005 11:14 AM
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Hi all,

One of my forum categories is dedicated to personals (SWF seeks...). I have set up my Threads 6.5.1 with special templates (postlist.tmpl, showflat.tmpl, showthreaded.tmpl) for these forums.

What I want to do is this:

First of all, I want to add another field to the user profile: an optional field for the users cell phone number.

This field is not to be shown in public.

Lets say the user Grunt (with Threads user number 11111) enters his cell phone number and then posts an ad in the personals. When this ad is viewed by someone, Threads will notice the phone number and then publish the users usernumber (NOT the cell phone number) just like Grunts Location is published like "Loc: Las Vegas".

Only this time the sentence would be "To send SMS to Grunt: send an SMS starting with PERSONAL REPLY 11111 followed by your reply to number 77777"

How do I do this?

Second, and this is the tricky part I guess, I want another server to communicate with Threads using HTTP GET and POST requests.

This server, the SMS-server, will authenticate itself to Threads and then send Grunt´s usernumber to Threads. The response from Threads will be to send Grunt´s cell phone number to the SMS-server.

Has anyone done anything like this before with Threads?

The $1 000 000 question is of course: how???

Sponsored Links
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
So far I have managed to get the front end to work. If there is a phone number, the SMS info text will show. If not, nothing will be displayed.

Does this look ok? It seems to work on my dev site.

Code
  <br /><br /><br />##############<br />showflat.php<br />##############<br />##############<br />find:<br />##############<br /><br /><br />	$postrow[$i]['Username'] = $Username;<br />	$postrow[$i]['Title']    = $Title;<br /><br />	if ( ($config['showip'] == 1) && $IP) {<br />		$postrow[$i]['IP'] = "($IP)";<br />	}<br /><br /><br />##############<br />replace with:<br />##############<br /><br />	$postrow[$i]['Username'] = $Username;<br />	$postrow[$i]['usernumber'] = $usernumber;<br />	$postrow[$i]['Extra3'] = $Extra3;<br />	$postrow[$i]['Title']    = $Title;<br /><br />	if ( ($config['showip'] == 1) && $IP) {<br />		$postrow[$i]['IP'] = "($IP)";<br />	}<br /><br /><br /><br /><br /><br /><br /><br />$userob = new user;<br />$user = $userob -> authenticate("U_Display, U_Groups, U_PostsPer, U_PicturePosts, U_FlatPosts, U_TimeOffset,U_ShowSigs,U_TimeFormat,U_Ignored,U_SearchSession,U_Preview,U_TextCols,U_TextRows");<br />isset($user['U_Username']) && $Username = $user['U_Username'];<br /><br /><br /><br /><br />##############<br />replace with:<br />##############<br /><br /><br />$userob = new user;<br />$user = $userob -> authenticate("U_Extra3, U_Display, U_Groups, U_PostsPer, U_PicturePosts, U_FlatPosts, U_TimeOffset,U_ShowSigs,U_TimeFormat,U_Ignored,U_SearchSession,U_Preview,U_TextCols,U_TextRows");<br />isset($user['U_Username']) && $Username = $user['U_Username'];<br />isset($user['U_Extra3']) && $Extra3 = $user['U_Extra3'];<br /><br /><br /><br /><br />##############<br />find:<br />##############<br /><br /><br />	// -----------------------------------------------------------<br />	// If this thread has been moved we need to send them properly<br />	if ($Open == "M") {<br />		@list($NewBoard,$NewNumber,$Body) = split("-ML-",$Body);<br />		$Body = "<a href=\"{$config['phpurl']}/showflat.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}$NewNumber\">{$ubbt_lang['POINTER']}</a>$Body";<br />	}<br /><br />##############<br />replace with:<br />##############<br /><br /><br />   // SMS yes or no<br />	if ($user['U_Extra3'] != "") {<br />		$SMS = "on";<br />	}<br /><br /><br />	// -----------------------------------------------------------<br />	// If this thread has been moved we need to send them properly<br />	if ($Open == "M") {<br />		@list($NewBoard,$NewNumber,$Body) = split("-ML-",$Body);<br />		$Body = "<a href=\"{$config['phpurl']}/showflat.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}$NewNumber\">{$ubbt_lang['POINTER']}</a>$Body";<br />	}<br /><br /><br /><br />##############<br />find:<br />##############<br /><br /><br />// Edit Button?<br />	$postrow[$i]['editlinkstart'] = "";<br />	$postrow[$i]['editlinkstop'] = "";<br />	$postrow[$i]['editdisplay'] = "";<br />	if ($edit == "on") {<br />		$postrow[$i]['editlinkstart'] = "<a href=\"{$config['phpurl']}/editpost.php?Cat=$Cat&amp;Board=$Board&amp;Number=$Number&amp;page=$page&amp;what=showflat&amp;vc=1\">";<br />		$postrow[$i]['editlinkstop'] = "</a>";<br />	}<br />	else {<br />		$postrow[$i]['editdisplay'] = "style=\"display: none;\"";<br />	}<br /><br /><br />##############<br />replace with:<br />##############<br /><br /><br />	// Cell Phone SMS code<br />	$postrow[$i]['SMScodestart'] = "";<br />	$postrow[$i]['SMScodestop'] = "";<br />	$postrow[$i]['SMScodedisplay'] = "";<br />	if ($SMS == "on") {<br />		$postrow[$i]['SMScodestart'] = "Send SMS: <B>REPLY $usernumber 'YOUR TEXT'";<br />		$postrow[$i]['SMScodestop'] = "</B> to number 777777";<br />	}<br />	else {<br />		$postrow[$i]['SMScodedisplay'] = "style=\"display: none;\"";<br />	}<br /><br />         <br />// Edit Button?<br />	$postrow[$i]['editlinkstart'] = "";<br />	$postrow[$i]['editlinkstop'] = "";<br />	$postrow[$i]['editdisplay'] = "";<br />	if ($edit == "on") {<br />		$postrow[$i]['editlinkstart'] = "<a href=\"{$config['phpurl']}/editpost.php?Cat=$Cat&amp;Board=$Board&amp;Number=$Number&amp;page=$page&amp;what=showflat&amp;vc=1\">";<br />		$postrow[$i]['editlinkstop'] = "</a>";<br />	}<br />	else {<br />		$postrow[$i]['editdisplay'] = "style=\"display: none;\"";<br />	}<br /><br /><br /><br /><br /><br /><br /><br />##############<br />showflat.tmpl<br />##############<br />##############<br />find:<br />##############<br /><br /><br /><br />{$postrow[$i]['Location']}<br /><br />##############<br />replace with:<br />##############<br /><br /><br />{$postrow[$i]['Location']}<br /><br /><br />{$postrow[$i]['SMScodestart']}<br />{$postrow[$i]['SMScodestop']}<br /><br />


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)