TinyPortal

Development => Support => Topic started by: iain.sherriff on March 28, 2015, 08:49:48 AM

Title: can I use one optio theme without TP
Post by: iain.sherriff on March 28, 2015, 08:49:48 AM
Link to my forum: http://www.dsdglobalsupport.com/forum/
SMF version: SMF ver. 2.0.9
TP version: TP ver. 1.107
Default Forum Language: English

Hi
Is there a way to deselect TP with a specific theme ?
Title: Re: can I use one optio theme without TP
Post by: WillyP on March 28, 2015, 03:37:54 PM
Are you asking how to uninstall TP? Perhaps it would help if you gave more details of what you are trying to accomplish.
Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 28, 2015, 04:15:58 PM
no...............wanting to set one specific theme on my forum that does not use TP while the main theme does use it
Title: Re: can I use one optio theme without TP
Post by: ZarPrime on March 28, 2015, 07:39:06 PM
Quote from: iain.sherriff on March 28, 2015, 04:15:58 PM
no...............wanting to set one specific theme on my forum that does not use TP while the main theme does use it

Hello iain.sherriff,

Strictly speaking, there is no way to do this at this time, with the current version of Tinyportal. Just like a theme works within SMF, Tinyportal is a modification that works to modify or change the functions of SMF to make it look and act differently.

However, as WillyP mentioned in his post above, if you can tell us exactly what you are trying to do, we may be able to give you some tips that will let you accomplish your goal or at least appear to. For instance, if you have a TP Article, you can certainly set that article to show only with a particular theme, and you can turn off all of the TP blocks for that article, making it appear to not actually use any TP functions.

So, tell us what you are trying to to do, and one of us can tell you how we would try to make it work.
Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 29, 2015, 11:16:31 AM
 :)
Thanks.
Turning off the blocks will work.
I want to use the the iOS.MF theme and mod for people who are glued to apple devices  ::)
I tried it but the layout (blocks mainly) looks horrible on a 'phone sized screen.
Title: Re: can I use one optio theme without TP
Post by: bloc on March 29, 2015, 02:35:49 PM
TP 1.0 is not really suited for use on mobile phones so making it work require a lot of changes.

But, if all you need is a way to NOT show blocks on a specific (mobile)theme, all you need to do is locate the theme's "index.template.php" file, and open it. Inside you need to locate the "function template_init()" and then insert this line under the other "$settings[..." lines there:


$_GET['noblocks'] = 1;


This will make TP not render any blocks at all in this theme, but articles and frontpage will still work. Note that if you use "frontblocks" they too will not work then.


Title: Re: can I use one optio theme without TP
Post by: IchBin on March 29, 2015, 05:42:52 PM
I believe you have to be an admin for the noblocks parameter to work Bloc. It might be better to just unset() the template layers or something?
Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 29, 2015, 07:20:11 PM
Thanks both........I am admin. Do you mean only Admin can change it

or it will only work for an Admin ?
Title: Re: can I use one optio theme without TP
Post by: bloc on March 29, 2015, 08:10:25 PM
ah, I forgot lol. Of course it will only work for admins..but not everyone else. Try logging out and you see the blocks come back. :P

Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 29, 2015, 11:02:34 PM
ah...............

i don't understand Ichbin's post  :-[
Title: Re: can I use one optio theme without TP
Post by: bloc on March 30, 2015, 04:10:43 PM
:) I'll whip up the code to remove the layers, when I get back.
Title: Re: can I use one optio theme without TP
Post by: bloc on March 30, 2015, 04:44:04 PM
Hm, that will not work as the layers aren't defined yet, when accessing them before the theme - or within template_init().

But put the attched template file into the "mobile" theme - it should hide the blocks there.
Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 30, 2015, 04:49:10 PM
Thanks........I'll have a go later and report back  :)
Title: Re: can I use one optio theme without TP
Post by: iain.sherriff on March 31, 2015, 11:53:28 AM
works 100%   :)

thanks guys  O0