Skip to main content
Topic: Primary Group + Post Group in poster area (1.1) (Read 2180 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Primary Group + Post Group in poster area (1.1)

So yeah, I was going through most of the suspected files in Sources........

And only Groups.controller.php actually had the link to the file (<img src="' . $settings['images_url'] . '/group_icons/'):
Code: [Select]
		// Fix the membergroup icons.
$context['group']['icons'] = explode('#', $context['group']['icons']);
$context['group']['icons'] = !empty($context['group']['icons'][0]) && !empty($context['group']['icons'][1]) ? str_repeat('<img src="' . $settings['images_url'] . '/group_icons/' . $context['group']['icons'][1] . '" alt="*" />', $context['group']['icons'][0]) : '';
$context['group']['can_moderate'] = allowedTo('manage_membergroups') && (allowedTo('admin_forum') || $context['group']['group_type'] != 1);

But this doesn't actually affects the poster area.......... T.T

I'm trying to find where is the link to this part over here (GenericMessages.template.php):

Code: [Select]
		// Show the post group icons, but not for guests.
if (!$message['member']['is_guest'])
$poster_div .= '
<li class="listlevel1 icons">' . $message['member']['group_icons'] . '</li>';

// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
$poster_div .= '

<li class="listlevel1 membergroup">' . $message['member']['group'] . '</li>
<li class="listlevel1 membergroup">' . $message['member']['post_group'] . '</li>
<li class="listlevel1 icons">' . $message['member']['post_group_icons'] . '</li>';

Note: Post_Group & Post_Group_Icons are my own add ons :p

Yeah, so right now Elkarte automatizes the selection of icons... so how do I manually select it?

Anyone has any clues?
Facta, non verba.

Re: Primary Group + Post Group in poster area (1.1)

Reply #1

 emanuele wonders if niloc is looking for http://www.elkarte.net/community/index.php?topic=1637.0

Anyway, controllers define the "path" the code should take, so when staring at a topic, the controller that takes action is Display_Controller (Display.controller.php).
Group icons are generally loaded in loadMemberContext and then used in prepareDisplayContext_callback for the poster area.
Bugs creator.
Features destroyer.
Template killer.

Re: Primary Group + Post Group in poster area (1.1)

Reply #2

OMG finally found that the "link" is inside load.php!!! Hahahaha yes!

Code: [Select]
'group_icons' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['icons'][1]) ? $settings['images_url'] . '/group_icons/' . $profile['icons'][1] : '') . '" alt="[*]" />', empty($profile['icons'][0]) || empty($profile['icons'][1]) ? 0 : $profile['icons'][0]),
'warning' => $profile['warning'],

But anyways, still not getting what I want. T.T

Yeah you are right,..
 niloc is looking for what you posted.

BUT then that addon... can't be installed.. it goes to:
"An Error Has Occurred
The database value you're trying to insert does not exist: filename"

And on a second try it goes to:
"Connection Problems
Sorry, we were unable to connect to the database. This may be caused by the server being busy. Please try again later."

Any common fix to this? Or is it not ready for 1.1? Hmm..
Facta, non verba.