TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 867
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 518
  • Total: 518

TP and SMF4Mobile

Started by webby, August 27, 2012, 08:12:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

webby

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?

Maxx1

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
But Mama, That's Where all the fun is!

IchBin

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.

Skhilled

@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.

webby

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.

webby

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.

Skhilled

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.

IchBin

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.

Skhilled

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.

bloc

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..

This website is proudly hosted on Crocweb Cloud Website Hosting.