2014-01-10, 01:41 PM
2014-01-10, 03:30 PM
<?php
// Hooks
$plugins->add_hook('parse_message_end', 'FancyPlugin2_content');
function FancyPlugin2_info(){
return array(
"name" => "Your fancy plug-in",
"description" => "Let's check some lengths",
"website" => "http://mybb.com",
"author" => "marcus",
"authorsite" => "http://mybb.com",
"guid" => "",
"version" => "1.0",
"compatibility" => "16*"
);
}
function FancyPlugin2_content($content) {
global $post;
if ($post['custom_parsed']!==true) {
$content .= ' You can do anything with the content variable, it is the message itself';
// Remember to "mark it parsed"
$post['custom_parsed'] = true;
}
return $content;
}
?>
Theoretically this should work since the message is parsed before the signature. There might be a better approach but this one also does the job.
2014-01-10, 03:36 PM
Holy cow you have just nailed it again you are awesome I really like you man, can I borrow your brain for two days?
Thanks I appreciate this big time
Thanks I appreciate this big time
2014-01-10, 03:54 PM
(2014-01-10, 03:36 PM)marcus123 Wrote: [ -> ]Holy cow you have just nailed it again you are awesome I really like you man, can I borrow your brain for two days?
Thanks I appreciate this big time
You're welcome. You would need a lot of coffee to feed (/fuel) it, so it might not be worth it.
2014-01-10, 04:06 PM
I am sorry how to integrate my code into yours?
function seowords($message)
{
global $mybb;
$message = str_replace("SEO", "<acronym title='Search Engine Optimization'>SEO</acronym>", $message);
$message = str_replace("test", "<acronym title='Search Engine Optimization'>seo</acronym>", $message);
return $message;
}
2014-01-10, 04:09 PM
<?php
// Hooks
$plugins->add_hook('parse_message_end', 'FancyPlugin2_content');
function FancyPlugin2_info(){
return array(
"name" => "Your fancy plug-in",
"description" => "Let's check some lengths",
"website" => "http://mybb.com",
"author" => "marcus",
"authorsite" => "http://mybb.com",
"guid" => "",
"version" => "1.0",
"compatibility" => "16*"
);
}
function seowords($message)
{
global $mybb;
$message = str_replace("SEO", "<acronym title='Search Engine Optimization'>SEO</acronym>", $message);
$message = str_replace("test", "<acronym title='Search Engine Optimization'>seo</acronym>", $message);
return $message;
}
function FancyPlugin2_content($content) {
global $post;
if ($post['custom_parsed']!==true) {
$content = seowords($content)';
// Remember to "mark it parsed"
$post['custom_parsed'] = true;
}
return $content;
}
?>
This should work.
2014-01-10, 04:15 PM
No way................ you nailed it again bro. People I love this guy a lot, thanks you so much you just fix all my issues in 10 minutes now that's what I called good support
2014-01-10, 04:25 PM
(2014-01-10, 04:15 PM)marcus123 Wrote: [ -> ]No way................ you nailed it again bro. People I love this guy a lot, thanks you so much you just fix all my issues in 10 minutes now that's what I called good support
Glad to help man, looks like you're up to some cool stuff on your forum, good luck with that.