vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




Requesting Help With a plugin -

Peggy
07-08-2007, 10:46 PM
Ok here's one for all you coders out there... :)


My members have been after me to install the /me bbcode plugin, so I found it, installed it, works great. Love it. Except for one thing....

I would like for the results to be italicized, perhaps even bold? So, looking at the code in this plugin, could you tell me what to add, and where to add it at?
global $post;
if ('' == $post[username]) {
global $reputation;
if ('' == $reputation[username]) {
global $pm;
if ('' == $pm[fromusername]) {
$meUsername = $vbulletin->userinfo[username];
} else {
$meUsername = $pm[fromusername];
}
} else {
$meUsername = $reputation[username];
}
} else {
$meUsername = $post[username];
}
if (empty($meUsername))
{
$meUsername = 'Error Parsing Username';
}
$text = preg_replace('#^/me (.*)$#im', "* $meUsername \\1 ", $text);
$parsedtext = preg_replace('#^/me (.*)$#im', "* $meUsername \\1 ", $parsedtext);

julia44
07-08-2007, 11:02 PM
I wonder who's awake to help you. I don't know what hack that is so I'm obviously of zero help.

Peggy
07-08-2007, 11:04 PM
I really wasn't expecting an answer til tomorrow ;)

julia44
07-08-2007, 11:06 PM
ROFL can you read my post because I'm sure you'll know the answer and beats me searching for the next 2 hours.

kenfuzed
07-09-2007, 12:47 AM
Ok here's one for all you coders out there... :)


My members have been after me to install the /me bbcode plugin, so I found it, installed it, works great. Love it. Except for one thing....

I would like for the results to be italicized, perhaps even bold? So, looking at the code in this plugin, could you tell me what to add, and where to add it at?
global $post;
if ('' == $post[username]) {
global $reputation;
if ('' == $reputation[username]) {
global $pm;
if ('' == $pm[fromusername]) {
$meUsername = $vbulletin->userinfo[username];
} else {
$meUsername = $pm[fromusername];
}
} else {
$meUsername = $reputation[username];
}
} else {
$meUsername = $post[username];
}
if (empty($meUsername))
{
$meUsername = 'Error Parsing Username';
}
$text = preg_replace('#^/me (.*)$#im', "* $meUsername \\1 ", $text);
$parsedtext = preg_replace('#^/me (.*)$#im', "* $meUsername \\1 ", $parsedtext);


I recall seeing this before, and think it was something like adding a /italic, right after $#im',

Big Dan
07-09-2007, 01:17 AM
$text = preg_replace('#^/me (.*)$#im', "[color=\"red\"]* $meUsername \\1 ", $text);
$parsedtext = preg_replace('#^/me (.*)$#im', "* $meUsername \\1 ", $parsedtext); You see where the color BB code is? Try wrapping that with the italics or bolded bbcode or

If you want just the text, wrap the $parsedtext with the bbcode.

Hope it helps, I've never installed this but going on my general knowledge that's what it looks like needs to be done. :)


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum