News:

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

Main Menu

Remove SMF news from the moderation panel

Started by ThijsW, September 09, 2014, 02:49:57 PM

Previous topic - Next topic

ThijsW

Hello,

By default, there SMF news on the moderation panel. I will that moderators doesn't see this, and this is not interesting for them. They know that it is powered by SMF and that's enough.

How can I remove this option for moderators? Completely away from the panel moderator. Only on the admin panel.

Regards, Thijs.

Ninja ZX-10RR

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

br360

Quote from: ♦ Ninja ZX-10RR ♦ on September 09, 2014, 03:06:41 PM
Forum » Moderation Center » Change Settings » SM News Uncheck that box :)


That actually just changes your settings in the moderation panel, all other mods and admins would still see the smf news.

Arantor

Sources/ModerationCenter.php

$context['homepage_blocks'] = array(
'n' => $txt['mc_prefs_latest_news'],
'p' => $txt['mc_notes'],
);


Replace with:
$context['homepage_blocks'] = array(
'p' => $txt['mc_notes'],
);



Find:
// Load what blocks the user actually can see...
$valid_blocks = array(
'n' => 'LatestNews',
'p' => 'Notes',
);


Replace with:
// Load what blocks the user actually can see...
$valid_blocks = array(
'p' => 'Notes',
);

Ninja ZX-10RR

Quote from: br360 on September 09, 2014, 03:10:54 PM
Quote from: ♦ Ninja ZX-10RR ♦ on September 09, 2014, 03:06:41 PM
Forum » Moderation Center » Change Settings » SM News Uncheck that box :)


That actually just changes your settings in the moderation panel, all other mods and admins would still see the smf news.
Yes but it's wise to avoid manually editing files like that one IMO. Plus it does actually the same thing, whoever wants it he can keep it while whoever doesn't he can get rid of it in one click :) that replacement instead will remove that block for all users with access to the moderation panel, including admins so that's why I suggested that way instead :)
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

br360

I agree with that except the OP didn't seem to mind keeping the news himself. He wanted his mods to be unable to see the smf news.

Ninja ZX-10RR

I guess he can choose since both ways were explained ;) mine was the easy one and Arantor's the coding one :)
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

Arantor

Well, the news is the same as in the admin panel so he won't lose it himself, it just needs to be hidden there.

I never quite understood the logic of exposing it in the mod panel, except for the notion that the admin might possibly see it more often but judging by poor upgrade history from users, I don't think it makes much difference. (News was removed from the mod centre in 2.1 and notes was made mandatory and bigger)

Ninja ZX-10RR

Probably because most of the times he cannot connect to smf.org... Well.. 9/10 of the times it doesn't work to me. Might be related to that as well?
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

Steve

Quote from: Arantor on September 09, 2014, 03:25:13 PM... except for the notion that the admin might possibly see it more often  ...

Just now was the first time I'd ever clicked on the moderate panel. *blink*
DO NOT pm me for support!

Arantor

Quote from: ♦ Ninja ZX-10RR ♦ on September 09, 2014, 03:32:00 PM
Probably because most of the times he cannot connect to smf.org... Well.. 9/10 of the times it doesn't work to me. Might be related to that as well?

In theory no, because both the admin and mod panels get the data from the same place: the relevant locally cached copy of the news JS file. If it's failing to load, there's a JS problem.


@Steve: It's a problem we noticed. Making it more useful without knowing how best to achieve that.

Ninja ZX-10RR

I have already posted about it, look --> http://www.simplemachines.org/community/index.php?topic=524038.0 I have been told that there is some kind of host problem... But no there is not since sometimes it works (for instance now yes and after refreshing the page again no).
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

ThijsW

Quote from: Arantor on September 09, 2014, 03:14:49 PM
Sources/ModerationCenter.php

$context['homepage_blocks'] = array(
'n' => $txt['mc_prefs_latest_news'],
'p' => $txt['mc_notes'],
);


Replace with:
$context['homepage_blocks'] = array(
'p' => $txt['mc_notes'],
);



Find:
// Load what blocks the user actually can see...
$valid_blocks = array(
'n' => 'LatestNews',
'p' => 'Notes',
);


Replace with:
// Load what blocks the user actually can see...
$valid_blocks = array(
'p' => 'Notes',
);


It's works! Thank you for this answer!!

ThijsW

And how I can remove it from the admin center?  :P

Arantor

Bad idea. Removing it from the admin panel will also stop notifications to you of new SMF versions.

Ninja ZX-10RR

Unless you do it via .css code. It is actually doable.
P.s. I'm replying only because I had posted before...
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

Arantor

Even then it might actually hide the other notification if you're not careful.

P.S. No-one cares why you reply. If you want to reply to help people, great, if not, that's fine too.

Ninja ZX-10RR

It won't if you can code .css properly. And no it's not for "helping out", it's a matter of being harrassed or not - that's the reason.

By the way if you are using default theme it's really easy.
Code (find) Select

#live_news
{
width: 64%;
font-size: 0.85em;


Code (add after) Select

display: none;


And that's just it.
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

Arantor

"Harassment". Interesting term from you. Rather ironic, too. Had it occurred to you that I might be giving you a hard time to break this 'hero worship' thing going on? Had it occurred to you also that the 'harassment' you claim might be because you're annoying people?


Anyway, yes, that would work - except for the small detail that there is suddenly a huge-ass section of white in its place. Presumably the next thing to do would be to add:

#supportVersionsTable
{
  width: 100%;
}

Ninja ZX-10RR

[ot]
Quote from: Arantor on December 01, 2014, 12:13:56 PM
"Harassment". Interesting term from you. Rather ironic, too. Had it occurred to you that I might be giving you a hard time to break this 'hero worship' thing going on? Had it occurred to you also that the 'harassment' you claim might be because you're annoying people?

Hero worship? Are you crazy? Never claimed to be anybody. Messages like those are one of the reasons why I am practically not posting, you have just been rude for no reason, and it's not the first time.
Annoying people? Yes probably. I noticed that some people are in some ways jealous if they can't post the answers coz somebody else did that before they could do it themselves. Other than that... Interesting since I often received a lot of thanks rather than "screw you you annoy me". Strange also that I have quite a few people telling me (elsewhere) that I am awesome, even if I don't think that I am "that" awesome, but with some more knowledge than the average well that yes. Also strange that in the italian forum (not italian section) I am one of the major posters and I am just receiving thanks, quite strange. It's just here that I had (and have) problems, it's the only forum in which it happened. So yeah, go on and say it's just me, I'll do like many others already did before me - post, understand how things work, leave.[/ot]

As for the code, yes, if he wanted to do that too. Personally I don't like that panel being stretched like that so I didn't say that :P Guess this is solved so I'm gonna say goodbye once again.

ThisjW if that helped you in any way then good, otherwise it will be the same I guess.
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: