TinyPortal

Development => Support => Topic started by: webby on August 27, 2012, 08:12:12 AM

Title: TP and SMF4Mobile
Post by: webby on August 27, 2012, 08:12:12 AM
As part of my experiment with TP I've set up SMF4Mobile for those accessing from mobile devices. I've worked out how to disable blocks in TP so they don't show in SMF4Mobile but everything from TP in SMF4Mobile is showing with no styling. How do I force it to adopt the SMF4Mobile styling?
Title: Re: TP and SMF4Mobile
Post by: Maxx1 on August 27, 2012, 02:28:28 PM
I think that Brad had hinted this before... but I have checked my site with the Android ( small) Phone and collapsing side panels and the site look good and was not all that bad to view and read the content of the forms>

Now there are a few things you could do to save allot of trouble, one of them is if you check at the SMF mod site you can search for a mobile mod that will allow you to pre -set a theme to come up when it detects a mobile device being used..and along with this, you can set up your TP to use the SIte map and Navigation block on the front page, so they may select to articles and or forums/s they want to view when going to the forum page/s.

Many things can be place on the front page , using Tinyporal to guide your visitors to the area of the commity they want to go, that is if you organize the forum properly>not using side panels in the forum section. fit all relevant navigation and  information in center panels on the Front page...

The front page can be set up like on my main site, like a jute box, with button like links to all music related video I have, and with page navigation from page 1 through what ever 10, 20 etc > up to you... the TP is so versatile you can do many things if you spend some time investigating the possibilities there!

from the front page you may call up any category you wish, narrow the page width to fit most any window! if done right! And the front page can also be set to pull up another theme from the article set section of TP!

hope this helps!

regards,
Maxx
Title: Re: TP and SMF4Mobile
Post by: IchBin on August 27, 2012, 04:37:31 PM
Quote from: webby on August 27, 2012, 08:12:12 AM
As part of my experiment with TP I've set up SMF4Mobile for those accessing from mobile devices. I've worked out how to disable blocks in TP so they don't show in SMF4Mobile but everything from TP in SMF4Mobile is showing with no styling. How do I force it to adopt the SMF4Mobile styling?

Basically if you want different styling you need to copy the tp-styles.css file into your mobile theme and modify it to look the way you want. TP even relies on some SMF CSS so you may have to do that file as well.
Title: Re: TP and SMF4Mobile
Post by: Skhilled on September 01, 2012, 02:45:53 AM
@Webby - How did you disable the blocks?

@IchBin - Ah! I do know that SMF4Mobile does not work well with portals because of the blocks. Thanks brad for that info.
Title: Re: TP and SMF4Mobile
Post by: webby on September 02, 2012, 10:45:07 PM
Quote from: Skhilled on September 01, 2012, 02:45:53 AM
@Webby - How did you disable the blocks?

in index.template.php of smf4mobile, after global $context, $settings, $options, $scripturl, $txt, $modSettings;

add

// TinyPortal
if (function_exists('tp_hidebars'))
tp_hidebars('left');
tp_hidebars('right');


I found this hides left and right panels in smf4mobile. I guess the same format would work for other panels; upper, lower etc,. I guess you could list them as a comma separated list but I couldn't get that to work.
Title: Re: TP and SMF4Mobile
Post by: webby on September 02, 2012, 10:47:11 PM
Quote from: IchBin™ on August 27, 2012, 04:37:31 PM
Quote from: webby on August 27, 2012, 08:12:12 AM
As part of my experiment with TP I've set up SMF4Mobile for those accessing from mobile devices. I've worked out how to disable blocks in TP so they don't show in SMF4Mobile but everything from TP in SMF4Mobile is showing with no styling. How do I force it to adopt the SMF4Mobile styling?

Basically if you want different styling you need to copy the tp-styles.css file into your mobile theme and modify it to look the way you want. TP even relies on some SMF CSS so you may have to do that file as well.

Thanks. I'd discovered the tp-styles.css. Didn't realise it also used some SMF styles as well.
Title: Re: TP and SMF4Mobile
Post by: Skhilled on September 03, 2012, 01:50:02 AM
Thank you very much! I'll give this a shot. I like the mobile theme but have not been able to get it to work with TP.
Title: Re: TP and SMF4Mobile
Post by: IchBin on September 04, 2012, 06:14:22 PM
tp_hidebars() by default will hide all panels if you do not specify the panel you want hidden. If you want a specific panel hidden then you provide the parameter like shown above.
Title: Re: TP and SMF4Mobile
Post by: Skhilled on September 05, 2012, 02:14:39 PM
I remember the tp_hidebars() function but was not sure how to implement it. Been too busy to even think about until I read this.
Title: Re: TP and SMF4Mobile
Post by: bloc on September 05, 2012, 04:25:19 PM
Another useful way could simply be to change TPortal.template and change the panel function, so that instead of a table with 3 columns(that won't work on mobile, too wide) it renders the bars after the main content - or in any order you prefer. You would need to change the width settings on left/right bars..and the page might get a bit long lol, but at least you can also see the bars then.

Ideally everything should be in separate "mobile" templates" but that might be too big a task, and its also a bit tied to SMF templates in general, so you would rather change everyone there too. But, thats a seriously major task..
Title: Re: TP and SMF4Mobile
Post by: Maxx1 on September 07, 2012, 01:36:52 PM
Mobile Device Detect    0.2.2
I am testing this mod and it so far seems to closes the side panels, when the module device is detected..

It works with my tiny Android, however, I am still testing it, so  this may be a good thing for theme makers for SMF and TP at least that I have tested on so far. Installed with out errors and you may chose the Themes you want it installed on as should be...more info as I move forward on this! :)

regards,
Maxx