Page 3 of 6

Posted: Thu Jun 01, 2006 4:21 pm
by christhatsme
I will check that out.

Repackaged again, left a DEBUGing thing in there that shouldn't be there..

EDIT

download fixed.

Posted: Fri Jun 02, 2006 9:08 am
by christhatsme
new version, quite critical fix allowing users to see your clicksms password

re upload sms.php and language/lang_english/lang_sms.php

updationg download link now.

Posted: Fri Jun 02, 2006 9:42 am
by christhatsme
repackaged, forgot to do some things... cut down quieries now also.

Posted: Sat Jun 03, 2006 12:37 am
by Wroey
There are coding faults found in sms_config.tpl which are preventing the SMS config radio buttons working.

Old Code:

Code: Select all

<tr>
		<td class="row1">{L_DISALLOW_SEND}<br/><span class="gensmall">{L_DISALLOW_SEND_EXPLAIN}</span></td>
		<td class="row2"<input type="radio" name="disallow_send" value="1" {DISALLOW_SEND_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_send" value="0" {DISALLOW_SEND_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_SINGLE}<br/><span class="gensmall">{L_DISALLOW_SINGLE_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disallow_single" value="1" {DISALLOW_SINGLE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_single" value="0" {DISALLOW_SINGLE_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_LISTS}<br/><span class="gensmall">{L_DISALLOW_LISTS_EXPLAIN}</span></td>
		<td class="row2"<input type="radio" name="disallow_lists" value="1" {DISALLOW_LISTS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_lists" value="0" {DISALLOW_LISTS_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_SMS}<br/><span class="gensmall">{L_DISALLOW_SMS_EXPLAIN}</span></td>
		<td class="row2"<input type="radio" name="disable_sms" value="1" {DISABLE_SMS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disable_sms" value="0" {DISABLE_SMS_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISABLE_CREDITS}<br/><span class="gensmall">{L_DISABLE_CREDITS_EXPLAIN}</span></td>
		<td class="row2"<input type="radio" name="disable_credits" value="1" {DISABLE_CREDITS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disable_credits" value="0" {DISABLE_CREDITS_NO} /> {L_NO}</td>
	</tr>
New Code:

Code: Select all

	<tr>
		<td class="row1">{L_DISALLOW_SEND}<br/><span class="gensmall">{L_DISALLOW_SEND_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disallow_send" value="1" {DISALLOW_SEND_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_send" value="0" {DISALLOW_SEND_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_SINGLE}<br/><span class="gensmall">{L_DISALLOW_SINGLE_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disallow_single" value="1" {DISALLOW_SINGLE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_single" value="0" {DISALLOW_SINGLE_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_LISTS}<br/><span class="gensmall">{L_DISALLOW_LISTS_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disallow_lists" value="1" {DISALLOW_LISTS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disallow_lists" value="0" {DISALLOW_LISTS_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISALLOW_SMS}<br/><span class="gensmall">{L_DISALLOW_SMS_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disable_sms" value="1" {DISABLE_SMS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disable_sms" value="0" {DISABLE_SMS_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_DISABLE_CREDITS}<br/><span class="gensmall">{L_DISABLE_CREDITS_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="disable_credits" value="1" {DISABLE_CREDITS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="disable_credits" value="0" {DISABLE_CREDITS_NO} /> {L_NO}</td>
	</tr>
Basically the various row 2 are missing a closing ">"

Where the user is supposed to access and navigate the SMS functions?

Posted: Sat Jun 03, 2006 1:50 am
by Wroey
See below>>

Posted: Sat Jun 03, 2006 1:53 am
by Wroey
Signed up for a trial account at ClickSMS, 3 free credits so you don't get much of a chance to play.

Was able to launch this mod by running sms.php from root. (Will need to create a menu option for it later).

Added my mobile number and then tried to send myself an SMS text message,

It failed:

Error message all over the forum page, (very disconcerting). Here's what was posted:

Connection Error - There has been an error connecting to ClickSMS

Connect failed; Success
Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/forum/includes/class.clicksms.php:35) in /home/mysite/public_html/forum/includes/page_header.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/forum/includes/class.clicksms.php:35) in /home/mysite/public_html/forum/includes/page_header.php on line 494

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/forum/includes/class.clicksms.php:35) in /home/mysite/public_html/forum/includes/page_header.php on line 495


The Mod reports "SMS Sent Successfully!" but it hasn't. Though it did not count down the credits.

Tried to buy more credits via Paypal and this worked a treat.


Note: Tried to trial with a paid account at ClickSMS and their systems failed on enrolment, citing "header" problems. Hope this feature is not wasted on a poor SMS service provider!!! Will update you as and when...

Posted: Sat Jun 03, 2006 1:56 am
by Wroey
Problem with the lists feature. Can create a list but how on earth do you add users to it? TIA.

Posted: Sat Jun 03, 2006 3:14 am
by Wroey
Update: Found the problem with the "header" issues.

In includes/page_header.php the following code causes the problem with ClickSMS.

Code: Select all

//else
{
	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
So I commented it out thus:

Code: Select all

//else
//{
//	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
//}
//header ('Expires: 0');
//header ('Pragma: no-cache');
And the text messages got sent.

Just how essential is that header code in includes/page_header.php?

HOWEVER: As messages are being sent you would expect the credit counter to decrement. It does not, at least on the control panel. A flaw which could lead to financial ruin!

And I still haven't figured how to add numbers/users to the list I created...

Thanks.

Posted: Sat Jun 03, 2006 9:30 am
by christhatsme
none of these things are problems

that is not a fix at all, anyone can obtain peoples session details now.

If your admin, credits are not need, therefore it doesn't deincriment

the users have to add them selfs to lists otherwise = phone spam

as for that message, it might of been tempory server failure.

None of these problems have occured for me, with the exact package above. apart from the tpl one, which I will fix (and it does still allow you to change the radio buttons)

also please remember i have nothing to do with clicksms, so don't rant to me that it is unreliable.

Also this is BETA code, it may have errors.

repackaged with the template fix.

Posted: Sat Jun 03, 2006 10:02 am
by christhatsme
repackaged again with better CURL error handling (what happened few messages up with header was a curl error, but i had used an echo by accident, now i use message die, so it will be a normal error, and it won't lie about sending the SMS!)

EDIT

I am happy to make versions of this script for other providers.

They Must! Have an API

PM me with a link to the company, and I will see what i can do.

Posted: Sat Jun 03, 2006 1:06 pm
by Wroey
I can't see anyone ranting yet, but I have been dealing with ClickSMS all morning to try to find why IE and Firefox are URL encoding the xml tags.

I am on Win XP, with IE 6. They are getting the originator of the API to have a look.

BTW I do realise this is Beta so I expect bugs, that's why I helpfully pointed those html errors out to you, to help you and others.

Once I can get it running I will be suggesting all sorts of enhancements to take the guesswork out of it. Am I the only one to have taken the plunge?

Once others more expert than me wade in I think this will be a beauty. In the meantime, prepare for some more helpful suggestions from all over and resist interpreting them as rants! :wink:

Posted: Sun Jun 04, 2006 10:21 am
by christhatsme
I havn't had any problems with this. I have tested it with the following

IE 5
IE6
Firefox
Mozilla
Opera
BT Yahoo Browser (but heh, who actually uses this...)

What php version are you using?

Posted: Sun Jun 04, 2006 3:41 pm
by Wroey
I have Phil Brogan at ClickSMS, and the writer of the API looking at it.

Have even tested their specimen form independently of the forum Mod, and Phil can see the attempt at connection in his logs. I do wonder if the PHP version is the key to this. Will confirm later.

Thanks.

Posted: Sun Jun 04, 2006 4:02 pm
by christhatsme
it possibly is, what version is it? It may be something with CURL in your paticular version.

Can you stick the bellow in a file, and find curl, and copy what it says

Code: Select all

<?php
phpinfo()
?>

Posted: Sun Jun 04, 2006 7:03 pm
by Wroey
The curl info is:

CURL support enabled
CURL Information libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4


PHP Version 4.3.8

Thanks.