BBCode/ HTML in member titles
Started by smcentral, Nov 18 2011 12:13 PM
1 reply to this topic
#1
Posted 18 November 2011 - 12:13 PM
Past few weeks, my members are requesting that they have colour in their member titles. So I've been doing research all over to find out how I can add bbcode/ html to member titles in 3.2. Member titles are added by admins so I have no fear of any wrong-doing or such. Just need to get pointed in the right direction, maybe a tweak or tickle.
Hi there!
#2
Posted 18 November 2011 - 01:36 PM
With my basic understanding of php. I managed a work around, creating this.
This is in the /admin/applications/members/member.php
Is there a way to put this in a hook?
This is in the /admin/applications/members/member.php
//-----------------------------------------
// Fix custom title
// @see http://forums.invisionpower.com/index.php?app=tracker&showissue=17383
//-----------------------------------------
$memberTitle = $this->request['title'];
$rankCache = ipsRegistry::cache()->getCache( 'ranks' );
$toReplace = array('<', '>'); // replace this
$replaceWith = array('<', '>'); // with this
$memberTitle = str_replace($toReplace, $replaceWith, $memberTitle); // final product
if ( is_array( $rankCache ) && count( $rankCache ) )
{
foreach( $rankCache as $k => $v)
{
if ( $member['posts'] >= $v['POSTS'] )
{
/* If this is the title passed to us from the form, we didn't have a custom title */
if ( $v['TITLE'] == $memberTitle )
{
$memberTitle = '';
}
break;
}
}
}
Is there a way to put this in a hook?
Edited by smcentral, 18 November 2011 - 01:36 PM.
Hi there!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
















