News:

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

Main Menu

hide Info Center from everyone except Admin

Started by joehark, April 18, 2018, 05:07:12 AM

Previous topic - Next topic

joehark

There is a 3/4 year old thread about this that recommends.

http://custom.simplemachines.org/mods/index.php?mod=3929

Right off the bat I am thinking, it's been up there all this time and I am the schlub who thinks the installation "instructions" are useless? Obviously it's me, right? But what I am saying below is still true.

The instructions are opaque to me and make unstated assumptions about what I know about installing an SMF mod. The unzipped download contains 8 files. There are no instructions on where and when to upload those 8 files - and that confusion is compounded further down in the so-called "installation instructions." 

The instructions list three steps, "file edit", "code" and "file operations" with an unlabeled, non-working check box next to each title. What is the purpose of a non-labeled, non-working check box???? Or is it just an unfortunate choice of graphic bullet??? Please don't tell me I'm the first noob to think it's a check box?

The first step, if I understand what I am reading, tells me to insert a line of code in ./Themes/default/BoardIndex.template.php BEFORE the code that controls the Info Center. Does that make sense? Before the code?

The second step "code" list the name of one of the 8 files. "ICAP.hooks.php This file should be able to execute standalone."

According to the instructions,  (or lack of any instruction about what to do with these 8 files) that file is still sitting on my desktop. Where is the "instruction" for where that file is supposed to be on the server?

Further, why is a file name listed under code? It's a file, not code. And of what use is the "stand alone" regarding installation instructions? Am I supposed to do or not do something based on that? Does that information mean anything to my installation or is it just noise?

Finally, the File Operations says:

Move the included file "ICAP.english.php" to "./Themes/default/languages".
Move the included file "ICAP.subs.php" to "./Sources".

How did those get from my desktop to that directory on my server and why were those put there in the first place instead of the two new destinations?

Surely, someone reading this will think I am trolling but I swear I am not. This is one of the most inadequate set of "instructions" I have ever seen in 35 years of dealing with this stuff. I am not that smart, but I'm not stupid either.

Sincerely, I am asking someone to help me figure out how to make this mod work in 2.0.15.

(BTW - how is it a 3rd party can post mods and themes but not offer a link to them so I could ask these questions directly to the source without ranting at the whole world?)

GL700Wing

Save the mod package installation file (it will usually have the suffix '.zip' or '.gz') to your desktop computer and then use the SMF Package Manager to:
1.  Upload the mod package installation file from your desktop computer to your SMF forum; and
2.  Install the mod package.
Life doesn't have to be perfect to be wonderful ...


Sir Osis of Liver

BoardIndex.template.php

At the top -



function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings, $user_info;

// Here's where the "Info Center" starts...
if($user_info['is_admin']){
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">



At the bottom -



// ]]></script>';
}
}
?>



Don't forget the curly brackets.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Pipke

it can easier in /default/BoardIndex.template.php

find aroud line 272

template_info_center();


replace by

if($context['user']['is_admin'])
template_info_center();
else
echo'&nbsp;';


;)
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

wtfwtf

Members > permissions >general permissions >
Regular Members
> View forum statistics > deny

Pipke

Quote from: wtfwtf on April 19, 2018, 06:43:59 AM
Members > permissions >general permissions >
Regular Members
> View forum statistics > deny

That does not hide the info center but denies access to ?action=stats
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Sir Osis of Liver

Quote from: Pipke on April 18, 2018, 05:16:13 PM
it can easier in /default/BoardIndex.template.php

find aroud line 272

template_info_center();


replace by

if($context['user']['is_admin'])
template_info_center();
else
echo'&nbsp;';


;)

Yes, that's simpler.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

joehark

Thanks to all who offered those good solutions. It was making me crey-crey. The IC is now invisible to anyone but Admin.

GigaWatt

"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Kindred

Joe,

Please od learn how to use the package manager instead of trying to manually install mods.
The system will do all the steps for you...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: