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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 324
  • Total: 325
  • @rjen

mobile/wap front page issue

Started by sibling chris, June 02, 2009, 10:05:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sibling chris

hi

I'm using TP 1.0 beta 4, SMF 1.1.9 and phobos theme

in the main all works well on mobile phones

when accesing front page though I do not get any menu so cannot navigate to forums/gallery etc.

also the bb code is shown in clear text in the front page article


is there any way to correct this?

thanks in advance
sc

sibling chris

ps: testing with my blackberry pearl 8120
I have no option of installing an alternative browser (locked by company BES) so am using basic default blackberry browser


sibling chris

#2

thanks for moving topic, but is this phobos specific?

I tried with default theme and same things happen

I wouldn;t expect theme to impact rendtion of wap/wap2 pages...?

bloc

Do you have a link?

Missing navigation might just be a setting in TP, although the main buttons should stay on all pages.

Zetan

Quote from: sibling chris on June 02, 2009, 11:45:00 AM

thanks for moving topic, but is this phobos specific?

I tried with default theme and same things happen

I wouldn;t expect theme to impact rendtion of wap/wap2 pages...?

Well, you said Phobos and didn't mention the default theme in your opening post.

Moved back to Support.

sibling chris

bloc

I have PM'ed you a link

thanks
sc

sibling chris

Quote from: Zetan on June 02, 2009, 12:33:40 PM
Quote from: sibling chris on June 02, 2009, 11:45:00 AM

thanks for moving topic, but is this phobos specific?

I tried with default theme and same things happen

I wouldn;t expect theme to impact rendtion of wap/wap2 pages...?

Well, you said Phobos and didn't mention the default theme in your opening post.

Moved back to Support.

I was just trying to supply as much info as possible
sorry if I implied it was a theme problem, thansk for moving stuff about...again! ;) :)

sibling chris

#7
Anyone else got any ideas about this?

Can someone point me in the direction of the wap code please? Perhaps I could then debug it...

Thanks

sibling chris

#8
I have just discovered TPwireless.template.php

Please forgive if I have misunderstood how this should work, however on the surface of things I think there are some problems with it and probably more than I've listed below in terms of functionality to wap/wap2 users it provides

Please accept my apologies if wap/wap2 support is a work in progress for TP!  ;)


Articles with bbcode

I don't see how BB code will ever work for anyone with base code as it stands
If you look through the functions template_wap_tp, template_wap2_tp and template_imode_tp

You will quite easily spot where the body of articles is output, with lines such as this for wap

echo strip_tags($story['body'],'<b><br><p>');


or this for wap 2

echo $story['body'],'<b><br><p>';


In order to get bbcode dealt with correctly all I have done is work my way through the  the file and where non-php 'introtext' and article 'body' are output I have wrapped them with the parse_bbc function  :up:

therefore I have ended up with lines along the lines of

echo strip_tags(parse_bbc($story['body']),'<b><br><p>');



Display of Frontpage with menu buttons

My frontpage settings are set as "Featured article with frontpanel"

What actually appears to happen when brwosing to my default frontpage is that all I see via wap/wap2 is the featured article and nothing else

Look at the logic at the start of the template_wap2_tp function for example

function template_wap2_tp()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

// do not show frontblocks, just the link to boardindex
if($context['TPortal']['front_type']=='frontblock' && $context['TPortal']['frontpanel']){
echo '
<p class="catbg"><b><a href="', $scripturl, '?action=forum;wap2">', $txt['wireless_error_home'], '</a></b></p>';
}
else{
if(isset($context['TPortal']['show_catlist']) && $context['TPortal']['show_catlist']){
// etc......


It appears like that first condition is saying "if viewing the frontpage and frontpanel switched on then display a link to the forum index and then don't do anything else"

Strange, because given my settings I would expect it to do this.
However, I checked the values used in that condition and for my frontpage I get $context['TPortal']['front_type'] set to "single_page" and $context['TPortal']['frontpanel'] set to false (0)

How does that happen?
But even if these values were correct, it will still only ever just display a link to the forum instead of the front_page content


As a temporary measure therefore I have added some extra code at the end of each single aritcle display. The only downside is that a forum link will be there for every article display, not just my frontpage which is what I would prefer

so right at the very end of template_wap2_tp function for eaxmple I added this line


        echo '
<card id="links" title="', $context['forum_name'], ' ', $txt['tp-forum'], '">
<p><b><a href="', $scripturl, '?action=forum;wap">', $context['forum_name'], ' - ', $txt['tp-forum'], '</a></b></p>
</card>';


:up: this works for me for now because I only have two articles which are my frontpage "welcome" message and the "about us" page





sibling chris

After making these tweaks I saved my customised TPwireless.template.php to Themes/phobos114 and restored the original  version of the file to Themes/default

phobos is used as my default theme and did not already contain a TPwireless.template.php file

This website is proudly hosted on Crocweb Cloud Website Hosting.