News:

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

Main Menu

Hide Info Center From Your Guests

Started by Deprecated, August 13, 2008, 04:57:13 PM

Previous topic - Next topic

Deprecated

Link to Mod

Obsolete

mashby

Most excellent. Simple and effective. Thank you for this one!
Always be a little kinder than necessary.
- James M. Barrie

Deprecated

You're welcome! Like many forums, my own sprung up out of discontentment with another forum (or with all forums in that subject area) so we're the new kid on the block, and I didn't want our competitors to see how we were gaining. Not even a month old we already have 40 members! :D

I just don't like giving away too much information to anonymous visitors. I have our main category configured for guest viewing, and anybody who wants to know more has to join.

Sabre™

Very good Deprecated.

I did this manually awhile ago, but hit a couple snags.
Just about to install your mod now. Well, manually add the line anyway lol
Thanks for knocking out the kinks for me  ;D

I kept using if user is logged, then they can see hehe
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Hoochie Coochie Man

İnadına SMF 1.1.X

foxcave


Deprecated

You guys are welcome! :) I think I can speak for most if not all mod authors, that we write this stuff for ourselves because we just gotta have it, but it's nice to share with others once its done, and certainly costs the author nothing to share it.

This is my first dual version mod that actually had to do something different for 1.1.5 and 2.0 since in 2.0 the BoardIndex.templat.php file got changed, having put the Info Center stuff in function template_info_center(). I was a bit startled when I first saw there was no function template_info_center() in 1.1.5, but as I looked at it I realized it was practically the same old code inline instead of being stuck in a function like 2.0b3.1. It was easy after that.

On a difficulty scale of 0-10 this was about 0.1 on that scale. The only reason it's there is because I didn't want to share this information with anonymous guests, and I guess I'm not the only one who feels that way.

It would be nice if it was a checkbox option on the coming 2.0 release.

justy_

i just want to give this mod a * bump * !  i've been waiting for a mod like this :)  thank you.

Sabre™

Since you signed up 5 days ago, I'd say your wait was well worth it! lol
;)

Im glad I found this mod, as Im not really a code monkey, seeing and working with this line has given me more options to play with.
See... who needs to go n study, when you can learn right here!??  ;)

Thanks Deprecated :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Deprecated

You're welcome! I learned the same way, disassembling other peoples mod packages.

Bobn

Hi,

I tried to install this mod but got errors. I dont have any other mods installed. My board is converted from phpbb however:

QuoteError in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Sabre™

Hi :)
Did/does it show you what template(s) failed?
Can you post which one(s) here please
Thanks :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Bobn

Quote from: Sabre™ on September 13, 2008, 10:26:08 AM
Hi :)
Did/does it show you what template(s) failed?
Can you post which one(s) here please
Thanks :)

I used it on the default template:

Quote57fbc404db71b521fbe5d4c5a485cc1c 
http://www.jamestownceilidhband.com/forum/index.php?action=packages;sa=install;package=hide_info_center_from_guests_1.0.zip 
8: Undefined index: package_readme
File: /home/jamestownceilidhband.com/httpdocs/forum/Sources/Packages.php
Line: 294

babjusi

Try to install it manually.

The file you need is BoardIndex.template.php in the /Themes/default/ directory.

find:

// Here's where the "Info Center" starts...

add after:

if ($context['user']['is_guest']) return;

Be sure to backup first the file before editing it :)

Bobn

Quote from: babjusi on September 13, 2008, 10:37:38 AM
Try to install it manually.

The file you need is BoardIndex.template.php in the /Themes/default/ directory.

find:

// Here's where the "Info Center" starts...

add after:

if ($context['user']['is_guest']) return;

Be sure to backup first the file before editing it :)

Just that one change to install it manually? Do I need to upload the files in the zip anywhere?

babjusi

Quote from: Bobn on September 13, 2008, 10:39:36 AM
Quote from: babjusi on September 13, 2008, 10:37:38 AM
Try to install it manually.

The file you need is BoardIndex.template.php in the /Themes/default/ directory.

find:

// Here's where the "Info Center" starts...

add after:

if ($context['user']['is_guest']) return;

Be sure to backup first the file before editing it :)

Just that one change to install it manually? Do I need to upload the files in the zip anywhere?

Yes, that one change only according to the mod parser :)

You can make the changes through the ftp or the File Manager at the acp of your host. But if you are uncomfortable with making the edit yourself, then attach here the file in question and I will make the edit for you :)


Bobn

Quote from: babjusi on September 13, 2008, 10:51:26 AM
Quote from: Bobn on September 13, 2008, 10:39:36 AM
Quote from: babjusi on September 13, 2008, 10:37:38 AM
Try to install it manually.

The file you need is BoardIndex.template.php in the /Themes/default/ directory.

find:

// Here's where the "Info Center" starts...

add after:

if ($context['user']['is_guest']) return;

Be sure to backup first the file before editing it :)

Just that one change to install it manually? Do I need to upload the files in the zip anywhere?

Yes, that one change only according to the mod parser :)

You can make the changes through the ftp or the File Manager at the acp of your host. But if you are uncomfortable with making the edit yourself, then attach here the file in question and I will make the edit for you :)

Thanks you,

I can make that minor change buy seriously,, I dont need any of the files in the zip? And I dont have to install the mod it will just work? Sorry to be a pain

babjusi

Quote from: Bobn on September 13, 2008, 10:54:25 AM
Quote from: babjusi on September 13, 2008, 10:51:26 AM
Quote from: Bobn on September 13, 2008, 10:39:36 AM
Quote from: babjusi on September 13, 2008, 10:37:38 AM
Try to install it manually.

The file you need is BoardIndex.template.php in the /Themes/default/ directory.

find:

// Here's where the "Info Center" starts...

add after:

if ($context['user']['is_guest']) return;

Be sure to backup first the file before editing it :)

Just that one change to install it manually? Do I need to upload the files in the zip anywhere?

Yes, that one change only according to the mod parser :)

You can make the changes through the ftp or the File Manager at the acp of your host. But if you are uncomfortable with making the edit yourself, then attach here the file in question and I will make the edit for you :)

Thanks you,

I can make that minor change buy seriously,, I dont need any of the files in the zip? And I dont have to install the mod it will just work? Sorry to be a pain

Ah, you meant the files in the zip mod package? In that case, you won''t need to install the mod through the package manager if you make the above edit manually :)

Bobn

Ok,, One last time ,, Sorry to be a dump A$$

1. Make the changes you suggested
2. Don't use the mod installer
3. Upload the files from this zip to the mods dir?? Make its own folder?

babjusi

Quote from: Bobn on September 13, 2008, 11:09:22 AM
Ok,, One last time ,, Sorry to be a dump A$$

1. Make the changes you suggested
2. Don't use the mod installer
3. Upload the files from this zip to the mods dir?? Make its own folder?

Just make that one edit and that is all you have to do, nothing else :)

Advertisement: