News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Online users > branches ?!

Started by ThijsW, September 01, 2014, 10:29:27 AM

Previous topic - Next topic

Burke ♞ Knight

You talking about the brackets?
That is normal SMF coding that adds them to the key.

br360

Quote from: ♦ Ninja ZX-10RR ♦ on September 02, 2014, 03:42:50 PM
Works *WAY* better but I still have those damn borders :( it's something related to .css from the defaul theme, I'm trying to figure out how to improve it.
Thanks anyway, at least it works as intended with no errors in the error log :D

Are you talking about this border- between the memberlist and the legend?



if so-

find in boardindextemplate.php-
if (!empty($context['membergroups']))
         echo '<div style="padding-top: 2px; margin-top: 2px; border-top: 1px solid #c6c6c6; font-size: 10px">
                     [' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']', '</div>';


and replace with-

if (!empty($context['membergroups']))
         echo '<div style="padding-top: 2px; margin-top: 2px; font-size: 10px">
                     [' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']', '</div>';

Burke ♞ Knight

I edited the mod, and added my group key style mod to it. :)




Group Key Order and Style

Latest Version: 1.0
Compatible With SMF: 2.0.x


Made by: BurkeKnight - BurkeKnight Enterprises
For Support: The mod's Support topice at SMF, or at BurkeKnight Enterprises.


This mod will allow changing the order of the membergroups legend under the list of online members.

The displayed member legend by default is:
    [Administrator] [Global Moderator] [Hero Member] [Sr. Member] [Full Member] [Jr. Member] [Newbie]

Re-arrange the display of groups the way you would like it displayed by going to:
    Admin -> Features and options -> Membergroup legend display arrangement.

Remove or add group id's from the list to select the groups you want to be displayed.
Separate the arranged group id with comma except for the the last number (i.e. 1,2,8,7,6,5,4).

To enable the display of the membergroup legend, disable the built-in group key from
    Admin -> Current Theme: uncheck "Show group key on board index" checkbox.




This will also let you change the style for group key in board index.
Has 2 slots, one for HTML code placed before the key, and one for HTML code placed after the key.

You may use any HTML code to adjust the looks of the group key.

Be sure to close the HTML tags in reversed order.



br360


Burke ♞ Knight


Ninja ZX-10RR

Nope I have those same dark stripes I had with the other mod, one dotted and the other one not dotted, I managed to get rid of the dotted one but I still have to remove an useless amount of space under the membergroups and I actually don't know how to do it. I'll investigate.

EDIT: wait that's what br360 posted. Hmm yeah basically it's that one but the problem is that space left blank for no reason... Thinking about it I will keep the upper border/stripe whatever thingy and remove that space, if I can figure out where the heck to find it since it appears I am the only one with that space...
I attach a screenshot and the index.css

EDIT 2: dang I had so many things to do this post was left open for so much time... Well if it's your birthday happy birthday BK :D and thanks again for the mod :D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Illori

try looking at the edits the mod made to boardindex.template.php

Burke ♞ Knight

That is what I have been doing, as I also get the added space, yet I can't find anything to do to prevent it.
Might be something in Sources/BoardIndex.php that is doing it.

Illori

as i said... check the edit the mod does to boardindex.template.php... it is right there.

Burke ♞ Knight

I am there, and I removed all but default, and it still was spaced.

Illori

did you remove the whole div? of course if you wrote the mod you would know exactly what makes it happen as you put it there.

Burke ♞ Knight

Yes, I removed the div to check...
Somehow, I think it is the coding in Sources/BoardIndex.php that may be doing it.

Here is what is changed in there:

<file name="$sourcedir/BoardIndex.php">
<operation>
<search position="before"><![CDATA[$context['membergroups'] = cache_quick_get('membergroup_list', 'Subs-Membergroups.php', 'cache_getMembergroupList', array());]]></search>
<add><![CDATA[
elseif (!empty($modSettings['arrange_groupkeyorder']))
{
// group color legend
global $smcFunc, $scripturl;
$context['groupkeyorder'] = array();

$result = $smcFunc['db_query']('', '
SELECT online_color, group_name, id_group
FROM {db_prefix}membergroups',
array()
);
    while ($row = $smcFunc['db_fetch_assoc']($result))
    {
if (allowedTo('view_mlist'))
$link = '<a href="' . $scripturl . '?action=groups;sa=members;group=' . $row['id_group'] . '" ' . ($row['online_color'] ? 'style="color: ' . $row['online_color'] . '"' : '') . '>' . $row['group_name'] . '</a>';
else
$link = !empty($row['online_color']) ? '<span style="color: ' . $row['online_color'] . ';">'. $row['group_name'] . '</span>' : $row['group_name'];
$context['groupkeyorder'][] = array (
'id' => $row['id_group'],
'link' => $link,
);
}
    $smcFunc['db_free_result']($result);
$context['gko_group'] = explode(',', $modSettings['arrange_groupkeyorder'], 30);
foreach($context['gko_group'] AS $key => $dummy)
for ($i = 0; $i < count($context['groupkeyorder']); $i++)
if ($context['groupkeyorder'][$i]['id'] == $context['gko_group'][$key])
$context['membergroups'][] = $context['groupkeyorder'][$i]['link'];
}]]></add>
</operation>
</file>

Burke ♞ Knight

A bit unorthodox, but I fixed the issue, by removing the div and adding a line break.
Unknown why it added a line break after the div, as there was no call for one in my code, but it may have to do with something in the SMF file for Board Index somewhere...LOL

Downloads section at my site, and mod site here updated.

Ninja ZX-10RR

Now there are commas between the membergroups and the line above them disappeared... This has started to drive me crazy... Square brackets and the border to make some kind of a space between online members and membergroups? :(
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Burke ♞ Knight

The commas are there as a separator, since the brackets are gone.
The line above was a border for the div which was removed.
Look at the info center here, there is no divider line here either.
I could always add another line break above the groups, though.

margarett

This topic started as a mod request, went from a mod teaser to coding discussion to mod announcement and now goes as mod support. Nothing like a good old off topic to make us all smile :P

Now, can we please stop? ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Burke ♞ Knight

Where would the fun be in that, my friend? LOL :P

From now on, support for this mod, until approved at the mod site, can be held at it's topic at BurkeKnight Enterprises.
Link for site in my sig.

Ninja ZX-10RR

Yes but it's actually related to what the OP asked since "we" (actually BK, not me XD) are trying to tweak the mod before making it publicly accessible on smf.org itself and also to provide a better solution, the ways are quite strange (the path is indeed the one you outlined :P ) but the objective is basically to provide a real solution compatible with 2.0.8 and working without "weird" things happening ;)
But yeah switching there and then maybe coming back here when the tweak will be over is wise :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Advertisement: