TinyPortal

Development => Support => Topic started by: sibling chris on June 02, 2009, 10:05:41 AM

Title: mobile/wap front page issue
Post by: sibling chris on June 02, 2009, 10:05:41 AM
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
Title: Re: mobile/wap front page issue
Post by: sibling chris on June 02, 2009, 10:19:26 AM
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

Title: Re: mobile/wap front page issue
Post by: 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...?
Title: Re: mobile/wap front page issue
Post by: bloc on June 02, 2009, 12:28:58 PM
Do you have a link?

Missing navigation might just be a setting in TP, although the main buttons should stay on all pages.
Title: Re: mobile/wap front page issue
Post by: 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.
Title: Re: mobile/wap front page issue
Post by: sibling chris on June 02, 2009, 01:57:52 PM
bloc

I have PM'ed you a link

thanks
sc
Title: Re: mobile/wap front page issue
Post by: sibling chris on June 02, 2009, 08:02:39 PM
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! ;) :)
Title: Re: mobile/wap front page issue
Post by: sibling chris on June 05, 2009, 12:29:46 AM
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
Title: Re: mobile/wap front page issue
Post by: sibling chris on June 05, 2009, 04:38:02 PM
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




Title: Re: mobile/wap front page issue
Post by: sibling chris on June 05, 2009, 06:01:10 PM
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