MyBB Community Forums
Where is the {$post['userstars']} and {$post['groupimage']} code located? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Where is the {$post['userstars']} and {$post['groupimage']} code located? (/thread-23709.html)



Where is the {$post['userstars']} and {$post['groupimage']} code located? - Soshite - 2007-09-03

I need to apply an align="absmiddle" to these images, but I can't find where the HTML code for them in the language files.

Anyone know where they are located?


RE: Where is the {$post['userstars']} and {$post['groupimage']} code located? - LeX- - 2007-09-03

Lang file ? =/ Those are vars used in templates. And in this case, the postbit_author_user template.


RE: Where is the {$post['userstars']} and {$post['groupimage']} code located? - Soshite - 2007-09-03

That template only has this...

<strong><span class="largetext">{$post['profilelink']}</span></strong><br />
<span class="smalltext">
	{$post['usertitle']}<br />( {$post['onlinestatus']} )<br /><br />
	{$post['useravatar']}<p></p>
	{$post['userstars']}
	{$post['groupimage']}<br />
</span>

I need to find what file/lang piece/etc. creates the <img> tag that wraps around the userstars or groupimage.


RE: Where is the {$post['userstars']} and {$post['groupimage']} code located? - LeX- - 2007-09-03

User stars [ ./inc/functions_post ]

		if($usergroup['stars'])
		{
			$post['stars'] = $usergroup['stars'];
		}

		if(!$post['starimage'])
		{
			$post['starimage'] = $usergroup['starimage'];
		}
		for($i = 0; $i < $post['stars']; $i++)
		{
			$post['userstars'] .= "<img src=\"".$post['starimage']."\" border=\"0\" alt=\"*\" />";
		}
		if($post['userstars'] && $post['starimage'] && $post['stars'])
		{
			$post['userstars'] .= "<br />";
		}

Groupimage : postbit_groupimage template
	if(!empty($usergroup['image']))
	{
		if(!empty($mybb->user['language']))
		{
			$language = $mybb->user['language'];
		}
		else
		{
			$language = $mybb->settings['bblanguage'];
		}
		$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']);
		eval("\$post['groupimage'] = \"".$templates->get("postbit_groupimage")."\";");
	}



RE: Where is the {$post['userstars']} and {$post['groupimage']} code located? - Soshite - 2007-09-04

Thanks, that worked like a charm. Smile