Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: [SiNaN] on September 28, 2008, 02:31:49 AM

Title: Theme Permissions
Post by: [SiNaN] on September 28, 2008, 02:31:49 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1422)

Theme Permissions

This modification allows you to set group based permissions for your every theme.

You can set from:

Admin Control Panel >> Themes and Layout >> Themes Settings

Based on the mod request by Jade (http://www.simplemachines.org/community/index.php?action=profile;u=119433).

-[SiNaN]
Title: Re: Theme Permissions
Post by: Apllicmz on September 28, 2008, 03:23:30 AM
Good work
nice mod
update that linguage

<file name="$languagedir/Modifications.portuguese.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permissões';
$txt['alundra_theme_permissions_guest'] = 'Você não pode configurar permissões de fórum tema default. Deve ser utilizável por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Você não pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permissões';
$txt['alundra_theme_permissions_guest'] = 'Você não pode configurar permissões de fórum tema default. Deve ser utilizável por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Você não pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.brazilian.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permissões';
$txt['alundra_theme_permissions_guest'] = 'Você não pode configurar permissões de fórum tema default. Deve ser utilizável por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Você não pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>


<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.brazilian-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode escolher este tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>
Title: Re: Theme Permissions
Post by: Marcus Forsberg on September 28, 2008, 03:34:29 AM
Another great mod from a great mod author. Good work :)

Swedish translation:

    <file name="$languagedir/Modifications.swedish.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema Rättigheter';
$txt['alundra_theme_permissions_guest'] = 'Du kan inte ange rättigheter till forumets standard tema. Det måste vara tillgängligt för alla användare.';
$txt['alundra_select_not_allow'] = 'Du kan inte välja detta tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>


    <file name="$languagedir/Modifications.swedish-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// !!! Alundra
$txt['alundra_theme_permissions_title'] = 'Tema R&auml;ttigheter';
$txt['alundra_theme_permissions_guest'] = 'Du kan inte ange r&auml;ttigheter till forumets standard tema. Det m&aring;ste vara tillg&auml;ngligt f&ouml;r alla anv&auml;ndare.';
$txt['alundra_select_not_allow'] = 'Du kan inte v&auml;lja detta tema!';
// !!! Alundra
]]></add>
        </operation>
    </file>


Title: Re: Theme Permissions
Post by: Nibogo on September 28, 2008, 10:09:03 PM
Really useful for my forum thanks
Title: Re: Theme Permissions
Post by: [SiNaN] on September 29, 2008, 09:35:08 AM
Thanks for the translations. But I would recommend starting a topic in your language boards and including the translations there. I can include a link to that topic on the mod page too.
Title: Re: Theme Permissions
Post by: willerby on November 16, 2008, 06:03:06 PM
Great Mod...  worked perfectly.

A question though...

How can I set a theme that guests get by default but registered members get as a matter of course without admin having to reset their Theme?

I think its possible but can't find a way. I have a Default-Lite theme that has less clutter than the standard Default most of my members use but can't find a way to make it the default for guests only...

Sorry. probably being dumb.
Title: Re: Theme Permissions
Post by: gamerxgirl on November 28, 2008, 09:32:05 AM
This is a great mod, too bad it's not for the 1.1.x version.
Title: Re: Theme Permissions
Post by: lax.slash on December 09, 2008, 09:34:03 PM
lol... posted a feature request back in March for this. Glad to finally see it! Great work! :)

Just a couple questions/suggestions:

1) Are you ever going to make it compatible with 1.1.x?

2) Why not make it so that they can't see the theme if they don't have access to it, as opposed to letting people see it, but not access it?
Title: Re: Theme Permissions
Post by: [SiNaN] on December 10, 2008, 07:31:08 AM
willerby:

Set it as default by only setting the "Overall forum default:" option. For guests and user only who selected the "Forum or Board Default" theme will see the forum with that theme. But other users, who selected a theme will see with their own theme.

gamerxgirl:

Thanks. Unfortunately I don't think I'll backport this.

lax.slash:

1) Don't think so.
2) It is already like that. Users without permission can't see the *anywhere*.
Title: Re: Theme Permissions
Post by: candidosa2 on July 05, 2009, 01:02:33 PM
when Update please dont forget
Linguage portuguese and brazilian

Quote<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
// !!! Alundra translate candidosa2 Suporte smfpt.net
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Ele deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode selecionar o tema!';
// !!! Alundra
]]></add>
      </operation>
   </file>
   <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
// !!! Alundra translate candidosa2 Suporte smfpt.net
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Ele deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode selecionar o tema!';
// !!! Alundra
]]></add>
      </operation>
   </file>
   <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
// !!! Alundra translate candidosa2 Suporte smfpt.net
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Ele deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode selecionar o tema!';
// !!! Alundra
]]></add>
      </operation>
   </file>
   <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
      <operation>
         <search position="end" />
         <add><![CDATA[
// !!! Alundra translate candidosa2 Suporte smfpt.net
$txt['alundra_theme_permissions_title'] = 'Tema Permiss&otilde;es';
$txt['alundra_theme_permissions_guest'] = 'Voc&ecirc; n&atilde;o pode configurar permiss&otilde;es de f&oacute;rum tema default. Ele deve ser utiliz&aacute;vel por todos os utilizadores.';
$txt['alundra_select_not_allow'] = 'Voc&ecirc; n&atilde;o pode selecionar o tema!';
// !!! Alundra
]]></add>
      </operation>
   </file>
Title: Re: Theme Permissions
Post by: Sakae on July 13, 2009, 11:12:46 AM
Late but... Thank you!
Title: Re: Theme Permissions
Post by: shumilica on December 04, 2009, 11:08:26 PM
Is this mod compatible with 2.0 RC2?

Sinan, do you consider updating the mod?
Title: Re: Theme Permissions
Post by: Sakae on February 02, 2010, 12:16:01 AM
Quote from: shumilica on December 04, 2009, 11:08:26 PM
Is this mod compatible with 2.0 RC2?

Sinan, do you consider updating the mod?

I would love that!
Title: Re: Theme Permissions
Post by: Arantor on February 02, 2010, 02:11:50 AM
I'm not sure this does work on RC2 :(
Title: Re: Theme Permissions
Post by: Sakae on February 02, 2010, 06:25:16 PM
Quote from: Arantor on February 02, 2010, 02:11:50 AM
I'm not sure this does work on RC2 :(

Sure it doesn't :(
Title: Re: Theme Permissions
Post by: Arantor on February 03, 2010, 02:42:57 AM
No... that's not what I meant. Some mods, particularly ones that don't change the interface much, work just fine on RC2 if they come from RC1.

This mod appears to not work correctly when we tried it on an RC2 build.
Title: Re: Theme Permissions
Post by: [SiNaN] on February 03, 2010, 05:53:38 AM
I have bumped the version to 1.0.1 adding support for SMF 2.0 RC2. Only template edit required recoding.
Title: Re: Theme Permissions
Post by: Arantor on February 03, 2010, 06:10:05 AM
We tried this on SimpleDesk a few days back and the permissions didn't seem to be enforced properly.
Title: Re: Theme Permissions
Post by: [SiNaN] on February 03, 2010, 06:13:31 AM
I have tested it before uploading as well. How did you test it?
Title: Re: Theme Permissions
Post by: Arantor on February 03, 2010, 06:44:01 AM
I didn't have anything to do with it, to be honest. Just I know it was tried over on SD and it didn't work out. Nas and Trekkie, I think, know more about it.
Title: Re: Theme Permissions
Post by: [SiNaN] on February 03, 2010, 06:54:08 AM
Well, then it might be something related to how template edit was updated. As I said, I have tested it myself before uploading. If anyone has an issue, I'll look into it.
Title: Re: Theme Permissions
Post by: Sakae on February 03, 2010, 01:47:52 PM
Howdy Sinan! Thanks for updating, first of all.

I can't find the settings for your mod. I searched at Admin Control Panel >> Themes and Layout >> Themes Settings, as instructed, but there's no "Themes Settings"!

So I added the languages strings on my portuguese_brazilian-utf8 (and cleared the Cache), but still nothing happens.

What am I missing?
Title: Re: Theme Permissions
Post by: Sakae on February 03, 2010, 01:53:12 PM
Oh-wow, I think something it's wrong here. I managed to find the "Theme Permissions" located one menu above Themes and Layout (don't know the exactly translation, but it's something about 'the Actual Theme').

But that motivates a error message: You cannot set permissions for forum default theme. It must be usable by all users.
Title: Re: Theme Permissions
Post by: Sakae on February 03, 2010, 01:59:55 PM
Oh-double-wow! :P

I managed to setup it correctly!! Sorry, I had misunderstood the (VERY SIMPLE, BTW) instructions... LOL

Now it's working great! Thanks a lot, mate!! Now I managed to work it on some VIP accounts for my forum! :)
Title: Re: Theme Permissions
Post by: [SiNaN] on February 03, 2010, 05:42:02 PM
Yeah, you just needed to click on the name of the theme in the Theme Settings page. Glad that you could find it. ;)
Title: Re: Theme Permissions
Post by: [SiNaN] on December 03, 2010, 07:05:10 AM
Mod is now updated for SMF 2.0 RC4!
Title: Re: Theme Permissions
Post by: Sakae on December 03, 2010, 03:44:40 PM
Any hard changes?

I installed on my SMF 2.0 RC4 yesterday, is working great already.
Title: Re: Theme Permissions
Post by: Biology Forums on August 09, 2011, 06:07:41 PM
Any chance of making this for 1.x
Title: Re: Theme Permissions
Post by: MDL on September 16, 2011, 06:17:11 PM
I've got a problem with this mod. For example, if I allow to moderators select a theme a user who is moderator can select it. All it's right but when this user cease to be moderator he can continue using it, not selecting it, but he continues having the theme. I want that when user stops being moderator has the default theme automatically.

The mod is very old, but it's very necesary to me use it

I hope you unserstand me 
Thanks!
Title: Re: Theme Permissions
Post by: NekoJonez on October 31, 2014, 09:42:58 AM
So... This mod lets you pick which usergroups can use that theme?
Title: Re: Theme Permissions
Post by: Shades. on January 26, 2022, 07:57:05 PM
Need this for 2.1! O:)