Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: JayBachatero on July 19, 2006, 01:39:51 AM

Title: Enable/Disable Themes
Post by: JayBachatero on July 19, 2006, 01:39:51 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=391)
Review this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=391)

This mod will give you the option to disable certain themes.  Once you disable a theme you can give certain membergroups the ability to see disabled themes.  Admins can see disabled themes by default.

! In order to work properly you need to allow users to "Allow members to select their own themes." and "Allow members to select the "Default" theme".
! You CAN'T disable the default theme. 
Title: Re: Enable/Disable Themes
Post by: qtime on July 19, 2006, 11:39:38 AM
excellent mod for using different themes according to membergroup
like donators: no banners
normal members: banners.
Title: Re: Enable/Disable Themes
Post by: JayBachatero on July 19, 2006, 12:31:45 PM
You can accomplish the ad stuff with the Ad management mod.
Title: Re: Enable/Disable Themes
Post by: Deaks on August 01, 2006, 04:52:46 PM
im getting error when I go to install

./Sources/ManagePermissions.php
Title: Re: Enable/Disable Themes
Post by: JayBachatero on August 01, 2006, 10:32:06 PM
Umm it seems like you have another mod installed and it's not finding the search spot.  You can manually make the change.
Title: Re: Enable/Disable Themes
Post by: guppy on September 22, 2006, 11:21:14 PM
Hi,

I installed on SMF1.1 RC3 without errors. But where do I enable / disable the themes?  :-\
Title: Re: Enable/Disable Themes
Post by: JayBachatero on September 23, 2006, 12:07:10 AM
Admin > Current Theme. At the bottom.
Title: Re: Enable/Disable Themes
Post by: guppy on September 24, 2006, 04:22:59 AM
I've uninstalled and reinstalled but it's still not showing up. The last option on Current Theme is "Hide post group titles for grouped members?".

This is what I had when installing:

Quote1. Execute Modification ./Sources/Load.php Test successful
2. Execute Modification ./Sources/ManagePermissions.php Test successful
3. Execute Modification ./Sources/Themes.php Test successful
4. Execute Modification ./Themes/default/languages/ManagePermissions.english.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
6. Execute Code install.php
Title: Re: Enable/Disable Themes
Post by: codenaught on September 24, 2006, 11:00:23 AM
Are you by any chance using a custom theme that also uses its own Modifications.english.php file? If that is the case you will need to add the text strings the mod adds to Themes/default/Modifications.english.php to Themes/your_theme/Modifications.english.php. I know some themes include their own Modifications.english.php file.
Title: Re: Enable/Disable Themes
Post by: guppy on September 26, 2006, 12:38:55 AM
Actually I did a fresh installation of SMF1.1 RC3 on my PC so that I can do testing offline so I'm still on the default theme. I'll go take a peek at the mod manual instructions to see if something was missed out in the mod installation. :)
Title: Re: Enable/Disable Themes
Post by: Gobo on November 04, 2006, 11:32:35 PM
Hi Jay

I wanted to ask, if I used this mod to disallow everyone to use a certain theme - and then set it as the default of a certain board - would they switch over to it? Or not?

I ask because I use Bloc's Wiki theme for a certain board - but I dont wish this theme to be selectable by users - but they should be able to see it as the default when they enter that specific board.

Also the mod says it is only compatible with RC2 - but I see here mentioned that someone installed it on RC3, would you recommend using it for RC3 or are there changes that may cause generation of errors in the logs?

Thanks
Aku
Title: Re: Enable/Disable Themes
Post by: JayBachatero on November 05, 2006, 03:18:37 AM
This mod show work for RC3 with out a problem.

Also if I'm correct the boad specific theme should work fine.
Title: Re: Enable/Disable Themes
Post by: Gobo on November 05, 2006, 08:16:04 AM
This is weird - I downloaded the package and when uploading it gave me a corruption message

So I tried unzipping on my PC and it says:

"This archive is corrupt"
"Unexpected end of archive"
Title: Re: Enable/Disable Themes
Post by: Laibeus Lord on December 13, 2006, 05:15:15 AM
you have a typo in your DB install file.


array_flip($avaiableColumns);


Missing letter "L"


array_flip($availableColumns);


^^



Quote from: JayBachatero on September 23, 2006, 12:07:10 AM
Admin > Current Theme. At the bottom.

If I understood it correctly, the Admin must switch to each theme to enable/disable it?

Any chance of creating an admin page instead wherein we can check/uncheck which themes to disable?

Thanks!!


Title: Re: Enable/Disable Themes
Post by: JayBachatero on December 13, 2006, 08:35:14 AM
Thanks for pointing that out.  I'll get it fixed.  Also that is the only way to disable themes right now.  Maybe in the future I'll change this.
Title: Re: Enable/Disable Themes
Post by: RoarinRow on December 19, 2006, 04:11:11 PM
Anyone try this on SMF 1.1.1.   ???
Title: Re: Enable/Disable Themes
Post by: Laibeus Lord on December 20, 2006, 03:18:16 AM
Yep, it works.
Title: Re: Enable/Disable Themes
Post by: RoarinRow on December 20, 2006, 05:54:33 AM
Quote from: Laibeus Lord on December 20, 2006, 03:18:16 AM
Yep, it works.


cool, thanks   8)
Title: Re: Enable/Disable Themes
Post by: Snape on January 01, 2007, 02:28:27 PM
Quote from: Laibeus Lord on December 20, 2006, 03:18:16 AM
Yep, it works.

It's not working for me...even after I added the modifications to custom theme's Modifications.english.php file.
Title: Re: Enable/Disable Themes
Post by: Snape on January 01, 2007, 02:33:10 PM
Another minor problem- when the package is installed, it inserts the code to Modifications.english.php AFTER the ?> which requires a manual edit to correct (otherwise the $txt['disable_theme'] = 'Disable this theme?'; code displays at the top of every page).
Title: Re: Enable/Disable Themes
Post by: xtremecruiser on March 17, 2007, 09:33:21 PM
I can't get it to install on 1.1.2

"1.     Execute Modification     ./Sources/Load.php     Test failed"
Title: Re: Enable/Disable Themes
Post by: JayBachatero on March 19, 2007, 10:42:52 AM
You need to make the changes manually.
Title: Re: Enable/Disable Themes
Post by: Jade Elizabeth on October 13, 2007, 02:26:27 AM
will this work on 1.1.4?
Title: Re: Enable/Disable Themes
Post by: TrueSatan on October 13, 2007, 04:14:30 AM
Yes, the mod isn't version specific so it will work on all SMF 1.1.x BTW do remember that the admin has to switch to a theme that they want to be disabled before they can disable it.
Title: Re: Enable/Disable Themes
Post by: Jade Elizabeth on October 13, 2007, 11:42:20 AM
okay thankyou :D
Title: Re: Enable/Disable Themes
Post by: Aleksi "Lex" Kilpinen on January 22, 2008, 03:25:27 AM
Got 2 errors trying to install this to test.

I uninstalled, and can do this manually, so no problem there - but just to point out if others have same issues:

/index.php?action=packages;sa=install2;package=Enable-Disable_Themes_11.0.1.zip 
2: array_flip() [<a href='function.array-flip'>function.array-flip</a>]: The argument should be an array
Tiedosto: ***/temp/install.php
Rivi: 13

/index.php?action=packages;sa=install2;package=Enable-Disable_Themes_11.0.1.zip 
8: Undefined variable: avaiableColumns
Tiedosto: ***/temp/install.php
Rivi: 13
Title: Re: Enable/Disable Themes
Post by: JayBachatero on January 24, 2008, 03:35:52 AM
Ok updated the mod.  Download it again.
Title: Re: Enable/Disable Themes
Post by: Aleksi "Lex" Kilpinen on January 24, 2008, 08:54:43 AM
Will do, I'll let you know if it works ok. :)


EDIT: This time no problems. Thanks!
Title: Re: Enable/Disable Themes
Post by: perro88 on January 26, 2008, 10:23:48 AM
thanks for the mod. working at 100% here
Title: Re: Enable/Disable Themes
Post by: Aleksi "Lex" Kilpinen on January 28, 2008, 01:25:14 AM
Something's really wrong with this download...  again.
The download link for Enable-Disable_Themes_1.0.2.tar.gz
gives a file Enable-Disable_Themes_1[1].0.2.tar.gz
and package parser gives this:

Package ID: Niko:Arcade
Package name: SMF Arcade
Package version: 2.0.12
Package type: modification

:D

I didn't install this luckily, I was just going to run the real package through the parser to see what I'd have to do to get it working in a finnish theme.
I do have the working copy at home, but I'm not there at the moment.

Edit: Oh, and I just realised I have the 1.0.1 installed on the board, ant the download for that works fine.
Title: Re: Enable/Disable Themes
Post by: TrueSatan on January 28, 2008, 07:42:21 AM
The package parsers can have cache issues showing the last mod they were able to work on no matter what new mod you try to parse with them...there are a number of package parser installations so please just use a different one when this occurs.
Title: Re: Enable/Disable Themes
Post by: Antechinus on February 16, 2008, 07:08:32 PM
This is good, apart from one detail.
I specifically want the default theme to be one of the disabled ones.
Has anyone done a mod that allows this?
Title: Re: Enable/Disable Themes
Post by: Jade Elizabeth on February 16, 2008, 11:26:12 PM
The forum default?
Admin > Themes and settings > Allow members to select the "Default" theme (uncheck).

or the core theme? For core you're going to have to do some coding...
Title: Re: Enable/Disable Themes
Post by: Antechinus on February 17, 2008, 12:11:19 AM
Eh?

Hang on: SMF comes with default, classic and babylon. AFAIK default and core are the same thing, yes?

So you can disable selection of default/core in admin, but not when running this mod.<<<Yep, that check box disables selection of SMF Default-Core, doesn't it? It says "Default" theme, as opposed to "overall forum default". Different critters.
I'd like to keep the option of disabling default/core but still run a mod like this one.
Make sense?
Title: Re: Enable/Disable Themes
Post by: Jade Elizabeth on February 17, 2008, 01:00:01 AM
Quote from: antechinus on February 17, 2008, 12:11:19 AM
Eh?

Hang on: SMF comes with default, classic and babylon. AFAIK default and core are the same thing, yes?

So you can disable selection of default/core in admin, but not when running this mod.<<<Yep, that check box disables selection of SMF Default-Core, doesn't it? It says "Default" theme, as opposed to "overall forum default". Different critters.
I'd like to keep the option of disabling default/core but still run a mod like this one.
Make sense?

You can do it. Post a new topic in the coding discussion board and someone who has better knowledge will see it and help :) Cause I don't know how, and I can't guarantee someone will see it here :) (don't forget to search first, I'm sure someone has asked for this before).
Title: Re: Enable/Disable Themes
Post by: Antechinus on February 17, 2008, 01:32:43 AM
Actually I had another idea which might be simpler and is definitely more fun.
What I'll do is disable selection of the Core theme, then alter the css on classic and babylon to emulate Runic's 2Horrible theme. That way nobody will want to use them but the templates will still be available if any theme needs to call on them.
The added bonus is that the horrible themes can be imposed on our "caged troll" membergroup for added punishment.  8)

If I decide to go for a mod instead I'll do what you suggested. Thanks anyway.
Title: Re: Enable/Disable Themes
Post by: qtime on September 13, 2009, 10:45:55 AM
Quote from: JayBachatero on July 19, 2006, 12:31:45 PM
You can accomplish the ad stuff with the Ad management mod.
yes but that mod will not make any difference between different membergroups, it can only be disalbed or enabled...
and themes can be setup to specific membergroups
Title: Re: Enable/Disable Themes
Post by: AmaZulu on December 21, 2009, 03:42:07 AM
I'm having a problem with this mod on 1.1.8.

I am able to disable the themes, set the permissions, etc, but even after assigning the permissions to a member group allowing them to see disabled themes they still can't see them.

Anyone else have this or can suggest what the problem might be?
Title: Re: Enable/Disable Themes
Post by: AmaZulu on December 21, 2009, 05:45:39 AM
I thought I had this fixed after checking the install line for line manually, but it seems I still have a problem. Here's what's going on:

1) All members are able to see the disabled theme in the list of available themes on their look and layout preferences, regardless of their permissions.

2) When a user who has permission to view a disabled theme selects it, nothing happens. The system shows them as using the disabled theme, but they're actually using the default.

I have ticked the theme as being disabled on the admin user ID.

Very confused...
Title: Re: Enable/Disable Themes
Post by: AmaZulu on December 21, 2009, 06:11:47 AM
Correction to previous post point 2) users who don't have permission to see this theme are able to select it and use it.

EDIT: Have manually checked and rechecked the parsed instructions for 1.1.8 and some lines of code appear in a different position now. Currently no members other than admin can see disabled themes, regardless of their primary member group permissions.

It almost seems as if the script is ignoring the permission for this mod. I really need this to work. Can anyone help with this?
Title: Re: Enable/Disable Themes
Post by: AmaZulu on December 21, 2009, 10:32:54 AM
Upgraded the forum to 1.1.11 and still having no luck. Also tried it on a test install and cannot see the option to disable the current theme there. Have updated the language files for english-utf8 too. :(

Can anyone confirm if this is working on anything above 1.1.6?
Title: Re: Enable/Disable Themes
Post by: AmaZulu on December 27, 2009, 11:41:09 PM
Bump. Is anyone supporting this mod? I really need some assistance here and am willing to pay to get it to work on my board.