PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1191

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

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
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1191

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

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
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum