Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Depreciated on August 20, 2010, 02:56:44 AM

Title: [Depreciated]
Post by: Depreciated on August 20, 2010, 02:56:44 AM
Link to the mod (https://custom.simplemachines.org/index.php?mod=2692)


Disable 'News Fader' for Guests v1.0
~{By PaulpBaker}~ (http://custom.simplemachines.org/mods/index.php?action=profile;u=259685)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2692) | My Mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=259685) | Support Topic (http://www.simplemachines.org/community/index.php?topic=396704.0)

Compatibility
Version independent so should work on ALL versions of SMF!

Description
Disables the 'News Fader' for guest members.

Have some suggestions to make this mod better? Please let me know in the support topic.

Upcoming Features
Enable/Disable option in admin settings

Notes
You must have 'Show news fader on board index' enabled in 'Administration Center > Configuration > Current Theme' for this to work.

Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.

Install the package on the SMF Default 'Curve' Theme ONLY. Other themes will need manual edits.

Useful Links
SMF Package Parser (http://sleepycode.com/PackageParser/)
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
v1.0 - 8th August 2010: Initial Version
Title: Re: Disable 'News Fader' for Guests
Post by: blow on August 20, 2010, 05:26:54 PM
It's a simple and fine mod. :)
Is there a way to do otherwise? It would be nice if I could show the news fader only for guests and not for members.
Title: Re: Disable 'News Fader' for Guests
Post by: Depreciated on August 20, 2010, 06:47:59 PM
Quote from: blow on August 20, 2010, 05:26:54 PM
It's a simple and fine mod. :)
Is there a way to do otherwise? It would be nice if I could show the news fader only for guests and not for members.

show it only for guests? not sure why you would want to do that but here's how:

in /Themes/default/BoardIndex.template.php

Code (find) Select

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))


Code (replace) Select

// Show the news fader?  (assuming there are things to show...)
if (($context['user']['is_guest']) && ($settings['show_newsfader']) && !empty($context['fader_news_lines']))


hope this helps :o
Title: Re: Disable 'News Fader' for Guests
Post by: @Rokas on November 18, 2010, 10:55:23 AM
Any way to hide from Regular members, and only show to Administrators and other groups ? Becouse i want to add some stuff there, but Regular Registered members will see it..
Title: Re: Disable 'News Fader' for Guests
Post by: Depreciated on November 18, 2010, 01:33:55 PM
Quote from: @Rokas on November 18, 2010, 10:55:23 AM
Any way to hide from Regular members, and only show to Administrators and other groups ? Becouse i want to add some stuff there, but Regular Registered members will see it..

in /Themes/default/BoardIndex.template.php

Code (find) Select

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))


Code (replace) Select

// Show the news fader?  (assuming there are things to show...)
if ((!$context['user']['is_registered']) || ($settings['show_newsfader']) && !empty($context['fader_news_lines']))



?
Title: Re: Disable 'News Fader' for Guests
Post by: @Rokas on November 19, 2010, 02:59:18 PM
Quote from: PaulpBaker on November 18, 2010, 01:33:55 PM
Quote from: @Rokas on November 18, 2010, 10:55:23 AM
Any way to hide from Regular members, and only show to Administrators and other groups ? Becouse i want to add some stuff there, but Regular Registered members will see it..

in /Themes/default/BoardIndex.template.php

Code (find) Select

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))


Code (replace) Select

// Show the news fader?  (assuming there are things to show...)
if ((!$context['user']['is_registered']) || ($settings['show_newsfader']) && !empty($context['fader_news_lines']))



?

Ive got a Member Group who i want to do to see it, and Regular member group that i don't want to see the News FAder
Title: Re: Disable 'News Fader' for Guests
Post by: AMoon on March 17, 2011, 05:02:51 PM
This is exactly what I am looking for however I'm not advanced enough for this part
Quote from: PaulpBaker on August 20, 2010, 02:56:44 AM
Install the package on the SMF Default 'Curve' Theme ONLY. Other themes will need manual edits.

I've looked at the "How Do I Modify Files" thread but I'm still hazy on what exactly I need to edit.  I'm using theme "Brown and Tan"
Title: Re: Disable 'News Fader' for Guests
Post by: Depreciated on March 17, 2011, 07:14:28 PM
send me your 'BoardIndex.template.php' file please