Log in

View Full Version : Code not working


Itworx4me
01-31-2009, 05:51 PM
Hello,

I am trying to replace the username with a profile field. Trying to get the following code to work as a plugin. Can some look it over and see why it doesn't work?

if ($vbulletin->userinfo['usergroupid']=='1')
{
$output = str_replace('$post[musername]', $post[field2], $output);
}

Thanks,
Itworx4me

Dismounted
02-03-2009, 04:49 AM
And you are putting this into a plugin where?

Itworx4me
02-03-2009, 10:52 PM
And you are putting this into a plugin where?

global_complete

Thanks,
Itworx4me

Dismounted
02-04-2009, 04:59 AM
All the templates have already been evaluated at that point (i.e. variables replaced with actual values).

Itworx4me
02-05-2009, 02:07 AM
All the templates have already been evaluated at that point (i.e. variables replaced with actual values).

What would you suggest?

Thanks,
Itworx4me

Dismounted
02-05-2009, 03:46 AM
The best way would be just to edit your templates.