News:

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

Main Menu

Need help!(About membergroups)

Started by nunopitbull, October 24, 2009, 06:50:22 PM

Previous topic - Next topic

nunopitbull

Ok, so here's my problem, i'm using advanced settings on permissions, so i can have a membergroup having permission only for that board.
Ex: Portuguese Moderator, Downloads Moderator etc, and each one has it own image.

Now everything was great, untill a member told me that it's not showing the (Moderator: Nick) on the places. So i thought to myself:

Well, let me go on Admin -> Boards -> Modify(Portuguese) -> Moderators: Additional members to have moderation privileges on this board. Note that administrators don't have to be listed here. -> Select wannabe.

So i thought it was going to do the trick, BUT it replaced wannabe's "badge" for a Moderator one and his "membergroup title" changed aswell. I thought on removing the image on the Moderator membergroup, and it worked, the SMF 1.1.10 used the Language Moderator badge. But the title keeps "Moderator" and not "Portuguese Moderator" as it is called the membergroup. Now why that hapens if I have wannabe seted as primary group: Portuguese Moderator?

Any help is apreciated, really!

thanks,
Nuno!

EDIT: i tried deleting the name of the membergroup "Moderator" but it replaces me for a post-count membergroup title... not even the primary membergroup:/

   

greyknight17

It sounds like it's working as it should be. If you created a custom moderator group, it's not the same as the "board" moderator. So when you assigned him to that specific board as moderator, it will change his status to be moderator for that board.

For the Portuguese Moderator badge, it should still apply in all the other boards as long as you didn't add him as a board moderator for them specifically.

nunopitbull

Well, but that ain't solving my problem still :D

I want to keep the advance permissions(so i can have a badge for each membergroup that moderaters diff parts on forum) and have a (Moderator: nick) like if I was assigning it from Real moderator stuff.

I tried doing it manually, like adding in the board description (Moderator: blaba) but BBcode doesnt works. Any solutions? please :x :-X

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

nunopitbull

Well i did it, but as chield board i have to see like Spanish(Moderator: Donfro) :|

JimM

If this is solved please mark it solved by clicking the Mark Topic Solved link at the bottom left of the page.
Jim "JimM" Moore
Former Support Specialist

nunopitbull

It is not close to beeing solved :'(

Nothing said untill now solves my problem:x

nunopitbull

Position:     Portuguese Moderator

That's what shows in the profile of "wannabe".

Now my question is: I have "wannabe" as Primary Group: Portuguese Moderator.
After that, i added him as that Board moderator(so that people can see the (moderator: wannabe) on that board.

But then, the Group Moderator(Local board mod) overwrote the image It has as a Portuguese membergroup, so i went to moderator group and deleted the pic, and it replaced for the Portuguese one. Ok by now. But i also deleted the Moderator Group name as i thought it was gonna have Portuguese Moderator, but instead, it now has the name has a post-count group. (Grade: D) Now, if the position showed is from Portuguese Moderator, why hes name is a post-count group?:|

Noone can me help?

nunopitbull

#8
Althouth, i wonder ... I have this idea....

Can you guys help me out giving some "tweak"? instead of Going on Admin -> Board -> Modify -> Choose the local moderator for that board, when doing that action, it DOESNT inserts the member on that membergroup BUT only makes him visible saying on the board (moderator: blabla).

Please :D that would be what i want! Since nothing else working!

EDIT: I attach the ManageBoards.template.php of the default theme, i guess it's the one it might need? (I'm using OverView theme from DZ studio + SMF 1.1.10)

nunopitbull


Arantor

Unfortunately it doesn't work like that. The membergroups system is a little more complex than that.

nunopitbull

Quote from: Arantor on October 30, 2009, 10:11:18 PM
Unfortunately it doesn't work like that. The membergroups system is a little more complex than that.

Aw damn, don't say that :/ I was so ansious to just delete the effect of ading that person to that membergroup. :|, theres no possible work-around? :x

Arantor

Not really since they're moved into a sort-of member group when you add them to the board as moderator, which triggers a special permission group all on its own - if you go into Membergroups, you'll see the Moderator group (group 3). This isn't a real group, you can't assign people to it -- except by configuring them as such in the board panel.

This group is unique; it has so many tweaks throughout the code to make it work like that.

nunopitbull

So there's no way I can have some tweak that will cause the same effect has having the  name of the person moderating that board (Moderator: xxx) ?

For example, making that box as the effect of just adding the (Moderator: xxx) style? :x

Arantor

One thought: you can add it into the board description itself.

You could even go one further and make the board description HTMLified:
This is my board's description<br /><span class="smalltext">Moderator: <a href="index.php?action=profile;u=12345">Joe Bloggs</a></span>

nunopitbull

Well, i added it, and i thought to myself: How, what an awsome solution, really looks like i wanted! But then, i noticed still something missing :x, look at attach. Can't that part be made?

Arantor

You would have to manually edit the code from MessageIndex.template.php for your theme.

nunopitbull

Quote from: Arantor on October 31, 2009, 12:19:13 PM
You would have to manually edit the code from MessageIndex.template.php for your theme.

Where and how exactly? :< aw nvm, seems to many ways :|

Arantor

If you're interested in doing this you'd have to attach the file here for me to edit.

nunopitbull

My theme doesnt has a MessageIndex.template.php ... i'll post the one on default theme(im using overviwe theme)


Arantor

Argh, I was thinking of the wrong thing. If you want to add it into the linktree rather than the rest of the template, that's actually a change to theme_linktree() in index.template.php.

The problem is, it's board specific, so the information pretty much has to be pushed from MessageIndex.php itself. I can give you a guide for you to add it in for yourself though.

nunopitbull


Arantor

In MessageIndex.php you'll see this block of code:

// Build a list of the board's moderators.
$context['moderators'] = &$board_info['moderators'];
$context['link_moderators'] = array();
if (!empty($board_info['moderators']))
{
foreach ($board_info['moderators'] as $mod)
$context['link_moderators'][] ='<a href="' . $scripturl . '?action=profile;u=' . $mod['id'] . '" title="' . $txt[62] . '">' . $mod['name'] . '</a>';

$context['linktree'][count($context['linktree']) - 1]['extra_after'] = ' (' . (count($context['link_moderators']) == 1 ? $txt[298] : $txt[299]) . ': ' . implode(', ', $context['link_moderators']) . ')';
}


You will need to make a list of the moderators for each board, their id number and their name.

Then before $context['moderators'] = &$board_info['moderators']; add:

$moderators = array(
1 => array(
array('id' => 123, 'name' => 'Moderator A'),
array('id' => 456, 'name' => 'Moderator B'),
),
5 => array(
array('id' => 789, 'name' => 'Moderator C'),
array('id' => 1234, 'name' => 'Moderator D'),
),
);
if(isset($moderators[$board_info['id']]))
$board_info['moderators'] = $moderators[$board_info['id']];


This says, Moderator A (user id 123) and Moderator B (user id 456) are moderators of board 1, and Moderator C (id 789) and Moderator D (id 1234) are moderators of board 5. Boards 2, 3, 4 etc will not show any extra moderators.

Just go through and fill that out for all your boards and moderators, adding new entries as necessary.

nunopitbull

And what Board 1 and 2 will be repective too? I'll have to play lottery and try guess if board 1 = Portuguese moderator for example? :P Or there is any kind of order?

Arantor

Look at your forum's URLs.

When you see a URL that contains board=1.0, that's board 1.

This board, for example, http://www.simplemachines.org/community/index.php?board=60.0 is board 60.

nunopitbull

I cant find that bit of code on my messageindex.template.php ...

Arantor

That's because it isn't there. As I said... MessageIndex.php - it's in Sources.

nunopitbull

With that, i still need the change on the Board description? This thing:
Post here your problems related to L2.<br /><span class="smalltext" style="padding-top:1px;"><i>Moderator: <a title="L2 Help Moderator" href="index.php?action=profile;u=80">chuchy</a></i></span>

Also, i attached the edit file, can you check if its ok?

nunopitbull

Lol, i still need to have that thing on board description, i thought this would do all the changes necessary :/

Arantor

Yes, you still need the changes to the board description. I never said it would do anything else.

Does the edit work out for you? If so I don't need to check it.

nunopitbull

Yeap, and thanks for all the help :P . But...is there any simple mod that can do both things? Or some mod that add some fileds when u Press Board that they can add it on the link tree

Arantor

You could write a mod but it'll be SPECIFIC to your forum, meaning that it won't be on the mod (since we'd never approve it) so you have to have it specific to your forum by making the edits yourself.

nunopitbull

Problem is that i have no idea how to do a mod or even know Php language :P

Arantor

Well, the code I've given you is a mod to your source.

The only difference is that it's not in a handy-dandy package for the package manager.

Were a mod to be written it would just do exactly what you've already done, really.

nunopitbull

So teach me how to "write" a mod, i mean, something that will do it automaticly :x

I mean, adding the Board ID in a field + Mod ID in other field + Mod aname or smth xD

Arantor

Like I said it would be specific to your site and would do almost nothing that the code you have above does already. All it would do would make a little interface which would be 3-4x the amount of code you already have.

nunopitbull

Yes I know that, as you noticed all around, it's only for my forum :P .

I like to program, i programed mIRC language alot. Even made a mIRC client. But i kinda not familiar with Php.
So if you can give me a hand i apreciate :).

Arantor

It's not just PHP. It's across multiple PHP files, and likely adding a database query or two.

It's a surprising amount of work. I can't just teach you to do it without teaching you PHP first or simply writing the entire mod, which to be frank I don't actually have the time to do right now given my todo list.

nunopitbull

Aw, i thought it was a smth like 15m work :P , thanks for the all support given anyways!

Nice end-of-Sunday, and see you in my next problem :D

Advertisement: