Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Tue Mar 09, 2010 5:21 pm Reply with quote

The code provided by both you guys is not on my production server yet, just two testing domains .. thanks

Will give this one a shot and see where we windup.

Cheers
 
View user's profile Send private message
dad7732







PostPosted: Tue Mar 09, 2010 5:48 pm Reply with quote

Doesn't work at all, phone numbers, even the test number remains phone numbers in the original format. No idea what or if I'm doing anything wrong except following directions and uploading the files to their proper places, etc.

I added the include line as you said and my phone_numbers.php looks like:

Code:
<?php

/***
Find phone numbers in documents using word boundary tokens (\b) in an attempt to avoid non phone number type matches
Written by Gaylen Fraley (aka Raven)
March 9, 2010
Free for use
***/
$testPhoneNumber = '(01)1234567890';
$replacement = '#';
$text = 'This is testing for matching/replacing a phone number type entry of ' . $testPhoneNumber . '. <br />Did it work?';

$phonePattern     = '\(?\b([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})\b';
$phoneIntlPattern = '\(?\b([0-9]{2})\)?[-. ]?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})\b';  // For including International codes
$message = preg_replace("/$phoneIntlPattern/", $replacement, $message);
?>


Dunno what else to do.


Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©