OK, I have installed SMS Center v.0.0.1b and modified it considerably to fit my needs.
The module is working and I can send SMS messages. (I am not a coder, so I am sure there is a better way to do this) but I have adapted the script so that ANY sms privider can be used, t-mobile, Verizon etc.
OK - here is what I am having trouble with:
Sender seems to default to whatever email address is set in PHP ie: admin@ site.com - and I would like to change that to whatever domain name I happen to be using on the site.
Also, it doesn't seem to pick up the "From:" and I would like to be able to use user_email from the PHPNuke database.
Here is the form script I modified for use with t-mobile:
Quote:
<?php
/************************************************************************/
/* radically based on:
/* Send_Mail: PHP-NUKE module created by Jan Skurovec (svab@cooltura.cz)*/
/* Nuke_Mailer: module by yahooooh@yahooooh.com */
/* =========================== */
/* */
/* Module further modified by shep@thedaggers.net for use with various */
/* phone SMS gateways. Please notify Shep is you make it better! */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$index = 1;
$registered_only = "1";
function adresar() {
global $dbi, $module_name, $cookie;
$result = sql_query("SELECT * FROM nuke_send_sms_phonebook WHERE smuid='$cookie[1]' ", $dbi)or die (mysql_error());
while(list($adress_id, $suid, $smemail, $smname) = sql_fetch_row($result, $dbi)) {
$usersnames .= "<option value=\"$smemail\">$smname</option>"; }
return $usersnames;
}
function error_delete() {
global $module_name;
include("header.php");
OpenTable();
echo ""._error_delete."";
echo "<br><a href=\"modules.php?name=$module_name\">"._ted."</a>";
CloseTable();
include("footer.php");
}
function error_update() {
global $module_name;
include("header.php");
OpenTable();
echo ""._error_update."";
echo "<br><a href=\"modules.php?name=$module_name\">"._ted."</a>";
CloseTable();
include("footer.php");
}
switch($func)
{
default:
main();
break;
case "error":
error();
break;
case "pridat":
pridat($smuid, $smemail, $smname);
break;
case "sent":
sent();
break;
case "pridano":
pridano();
break;
case "install":
createdb();
break;
case "adresa":
adresa();
break;
case "smula":
smula();
break;
case "error_update":
update();
break;
case "error_delete":
error_delete();
break;
case "terms":
terms();
break;
}
?>
And here is the processing script (also modified):
Quote:
<?php
/************************************************************************/
/* SMS: PHP-Nuke module modified to work with an ICQ email2sms gateway. */
/* radically based on:
/* Send_Mail: PHP-NUKE module created by Jan Skurovec (svab@cooltura.cz)*/
/* Nuke_Mailer: module by yahooooh@yahooooh.com */
/* =========================== */
/* */
/* Module further modified by shep@thedaggers.net for use with various */
/* phone SMS gateways. Please notify Shep is you make it better! */
/* */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$multisend = 0;
switch($jak)
{
case "normal":
if($multisend == 0):
if(!ereg("^[0-9]",$komu)) // number validation
{
header("location: modules.php?name=$module_name&file=t-mobile&func=adresa");
exit;
}
endif;
break;
$prefix = ""; // You country code. (Leave empty if you want users to use full 11 digit numbers)
// Note that some mobile providers required "+" from the begining of number
$gateway = "@tmomail.net"; // Your mobile provider e-mail gateway E.g.: @t-momail.net.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum