MyBB Community Forums

Full Version: Show Additional Group Images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
where the hell is the
/admin/modules/user/groups.php part of the plugin since i don't have that i get this error code Parse error: syntax error, unexpected $end in /home2/databasename/public_html/inc/plugins/additionalimg.php on line 193
(2014-01-06, 06:27 PM)kso Wrote: [ -> ]where the hell is the
/admin/modules/user/groups.php part of the plugin since i don't have that i get this error code Parse error: syntax error, unexpected $end in /home2/databasename/public_html/inc/plugins/additionalimg.php on line 193
Oops, sorry, I was missing a closing bracket. Blush
Try to download it now (from the attachment).
Nice plugin. Working FINE!
But i have a question. As u can see, if using the classic layout postbit style, after the MAIN group image to secondary images, there is a small space. How can i remove that space? So there won't be a space after primary group image and secondaryes ones.

Thanx!
Open /inc/functions_post.php
Find (About line 233)
if($mybb->settings['postlayout'] == "classic")
{
	$post['groupimage'] .= "<br />";
}
Replace with:
/* if($mybb->settings['postlayout'] == "classic")
{
	$post['groupimage'] .= "<br />";
} */
(2014-01-28, 08:54 PM)Dvdxseo Wrote: [ -> ]Open /inc/functions_post.php
Find (About line 233)
if($mybb->settings['postlayout'] == "classic")
{
	$post['groupimage'] .= "<br />";
}
Replace with:
/* if($mybb->settings['postlayout'] == "classic")
{
	$post['groupimage'] .= "<br />";
} */

Done that, but messed up the group images. It put first and second group images on horizontal, after one and other, and the seconds, underneath, one under another.
Update with the modification?
Your plugin is working fine without adding that code you mentioned in OP. Is it normal? What's the use of that code?
I am using the latest version of your plugin on MyBB 1.6.12
Very nice plugin installed and works a treat for me thank you very much
Hello,

I have been using this plugin for quite a while and find it incredibly useful. Unfortunately, for quite a while (possibly since I began using it, but I didn't notice it until a few months ago), I have had a minor issue with it. In the array of group images, there is always (at least that I have noticed) a blank image. As in, among the other group images, there is an img tag that does not link to anything. Here's an example of the output HTML code (viewed via the browser):

<!-- start: postbit_groupimage -->
<img title="(a) Kerfufflicans" alt="(a) Kerfufflicans" src="images/groupimages/english/group_kerfufflican.png"></img>
<!-- end: postbit_groupimage -->
<img alt="Kerfufflers - Guild Wars 2" src="images/groupimages/english/group_gw2.png"></img>
[b]<img src=""></img>[/b]
<img alt="Kerfufflers - Minecraft" src="images/groupimages/english/group_minecraft.png"></img>
<img alt="Kerfufflers - Path of Exile" src="images/groupimages/english/group_poe.png"></img>
<img alt="Kerfufflers - PlanetSide 2" src="images/groupimages/english/group_ps2.png"></img>

This appears whether viewed on the post bit or on the profile page. It also seems to appear regardless of the theme used. It isn't random, as it is always in the same place for the same user, though its location varies between users. As far as I can tell, it isn't related to any particular usergroup, but I could be wrong.

I haven't really bothered with trying to fix it before, since it is invisible in most cases (which is also why it took me a long time to notice it). Most browsers don't display img tags with no source specified, but Internet Explorer does and, as of a recent update, Firefox on my Linux PC does. So, if you have any guidance as to what may be causing this and how to address it, that would be much appreciated. I would be happy to supply any other debugging information that might be helpful as well. Smile
Regarding the above issue, I discovered the problematic code. On line 178 of the plugin file additionalimg.php is the following code:

if($groupimages == $usergroups[$post['displaygroup']]['image'])
{
	// We don't want double images!
	$additionalimg .= "<img src=\"{$usergroups[$post['usergroup']]['image']}\">".$br;
}

Since on my forum, nearly every member is in a primary usergroup that doesn't have a group image, that means that for just about every member on my forums there is an image tag with a blank source produced. Anyway, I now know how to fix it for the purposes of my forums.
Pages: 1 2 3 4