PDA

View Full Version : Has anyone already got mobile phone SMS working from vBulletin?


HeadStAtE!
07-03-2002, 05:32 AM
Has anyone already done an SMS script, I performed a search but could only find requests, I just wondered as it would save me some work?

I've been up all night with an existing SMS class and have it working (sending SMS's successfully) from a vBulletin template but I've never documented or posted a hack here before so any advice would be appreciated.

Where can I find details on vBulletin variables to pass to the script?

Maybe a mod could shift this post to "Help Me Finish" if that's considered more appropriate - thanks...

Screenshot of work in progress:

Admin
07-03-2002, 06:34 AM
What kind of vBulletin variables do you need?

HeadStAtE!
07-03-2002, 07:08 AM
The username (as I'll include this to the end of the SMS (or maybe the userID) to prevent SMS spam abuse.

I'd also want to create three custom fields (hidden from public view) in the user cp profile which I'd need to pass to the SMS class:

1) The mobile number of the user.
2) The username on the chosen SMS portal (for example Genie - now O2).
3) The password on the chosen portal. I could also do with having the password encrypted in the database if this is possible.

Admin
07-03-2002, 07:15 AM
$bbuserinfo[userid] = user ID; $bbuserinfo[username] = username; $bbuserinfo[field#] = field number #.

Setup the custom profile fields from the Admin CP, note the profile field ID and use it as # in the example above.

HeadStAtE!
07-03-2002, 07:21 AM
Firefly, thank you for that.

That's fairly straight forward. What about making the password field encrypted?

Admin
07-03-2002, 07:45 AM
What kind of encryption do you want to use?

HeadStAtE!
07-03-2002, 07:56 AM
Is it possible to encrypt it in the same manner as the existing forum password (I'm assuming that's fairly well encrypted). My concern is that the same username/password combination used on some of the SMS portals are the same one the users would enter for their billing so must be protected.

Please bear in mind with any reply that I'm a PHP n00b, although I have a sound programming knowledge of other languages so have some sense. :)

Also is it not possible to refer to the custom field by name?

HeadStAtE!
07-03-2002, 08:42 AM
Originally posted by FireFly
$bbuserinfo[field#] = field number #.

Setup the custom profile fields from the Admin CP, note the profile field ID and use it as # in the example above. I can add custom fields in the admin CP.

But what is the ID, obviously I give each field a name, it has a display order too, and also a seperate ID which I can only find if I view the table via phpmyadmin?

When I refer to a field for example $bbuserinfo[10] I get one of the existing default fields like user title, or yahoo and such like.

Admin
07-03-2002, 08:46 AM
You need to use $bbuserinfo[field10]. And you canu use PHP's md5() for the hashing.

Delmon
07-03-2002, 01:17 PM
are you going tomake it as a hack?

HeadStAtE!
07-03-2002, 04:35 PM
Originally posted by Delmon
are you going tomake it as a hack? I'll do my best but will need help.

I'll probably start with something basic, I'm creating a page driven by a custom template so that forum user can send SMS's but there's nothing to stop the functionality being used for PM's and such like, that's beyond my current knowledge although I'm sure there's plenty of people here that could add such things.

CJi
07-04-2003, 04:18 PM
Just out of interest what engine are you using to send the messages? Is it just interfacing http-post style to existing providers, or are you building on top of something like Simplewire?

Have a browse of https://vborg.vbsupport.ru/showthread.php?s=&threadid=53013 for inspiration.