Halo I try this BBCode, work fine... but I want more validation in input;
PHP
<?php
require_once(WCF_DIR.'lib/data/message/bbcode/BBCodeParser.class.php');
require_once(WCF_DIR.'lib/data/message/bbcode/BBCode.class.php');
class YMstatusBBCode implements BBCode {
public function getParsedTag($openingTag, $content, $closingTag, BBCodeParser $parser) {
$yahooID = $content;
// need some validation here
// $yahooID = "someID"; valid
// $yahooID = "someID@yahoo.com"; not valid
// $yahooID = "someID@msn.com"; not valid
// Yahoo Hint
// Use 4 to 32 characters and start with a letter. You may use letters, numbers, underscores, and one dot (.)
if ($parser->getOutputType() == 'text/html') {
return '<a href="ymsgr:sendIM?'.$yahooID.'"><img src="http://opi.yahoo.com/online?u='.$yahooID.'&m=g&t=14" alt="" /></a>';
}
else if ($parser->getOutputType() == 'text/plain') {
return '[YMSTATUS]'.$yahooID.'[/YMSTATUS]';
}
}
}
?>
Display More
Hope someone can help;