[DEV] STG-Mobile Device Browser Style

MOD Authors: Discuss and post updates on new MODs in development for phpBB3, Receive feedback and Feature requests for MODs in development.

To submit your MOD or style, go to the STG MOD Manager
Forum rules
go to the STG MOD Manager to post your MOD in development.
Discuss and receive feedback for any MOD in development for phpBB3.
Suggest features for MODs in development.

No Support or MOD Requests
-- exceptions for MODs only posted here as Beta or Alpha.
Support requests for a MOD should be requested in the respective MOD topic.

Re: [DEV] STG-Mobile Device Browser Style

Postby microfud » 26 Nov 2009, 10:06

Hi Sniper,

I am working off an older version of these templates... but I found that I was able to restore the ability to see signatures by editing viewtopic_body. and adding this to the template:
find:
Code: Select all
<div class="postbody">{postrow.MESSAGE}</div>

add below:
Code: Select all
<!-- IF postrow.SIGNATURE -->
<span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
<!-- ENDIF -->


Unfortunately, I still don't see my signature when posting from mobile. (though signatures from posts made on regular style now appear) I'll see about updating my mobile stuff so we're working off the same version.
Last edited by microfud on 26 Nov 2009, 10:11, edited 2 times in total.
Mobile forum or bust...
microfud
Cadet I
Cadet I
 
Posts: 17
Joined: 29 Jun 2009, 10:06
Gender: Male
phpBB Knowledge: 6


Re: [DEV] STG-Mobile Device Browser Style

Postby Hippie459MN » 26 Nov 2009, 10:09

microfud wrote:Hi Sniper,

It actually is in "viewtopic_body" The posting_body template gives lets you allow the user to enable or disable signatures.

To add the sig back to the post from mobile go to viewtopic_body.

find:
Code: Select all
<div class="postbody">{postrow.MESSAGE}</div>


paste this below:
Code: Select all
<!-- IF postrow.SIGNATURE -->
<span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
<!-- ENDIF -->


Please note that my stuff is still based on the templates from June. But I think your working version should be the same. (As noted before, I'll try to update to the latest version soon and then maybe can help you a bit more with this.)


I will give this a go later today and report back. Thanks for this. :D
User avatar
Hippie459MN    
Supporter
Supporter
 
Posts: 148
Joined: 08 Feb 2008, 09:40
Location: Minnesota, USA
Favorite Team: Your moms team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby Sniper_E » 26 Nov 2009, 10:50

No microfud, that is not the problem and that does not need to be added to the mobile's viewtopic template.
The sig section was removed from the viewtopic page of this mobile style because of the huge load of sig images.
Those images in everyone's sig do not need to show in the mobile style. We don't want those to show.

But, posting in the mobile style or even in a full style from a mobile device, we want it to send the sig info.
Then viewing a post in a full style made from a mobile device should show the sig.... in a full style only.

The problem here has to be in the codes in the mobile's posting template or from that edit made in the posting.php.
I really think that edit may be what is breaking the post from sending the sig info.
Removing that edit and then doing the test like I did above would tell you if that is what's causing this problem.

Are you with me here?
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!?
Image
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 5921
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby microfud » 26 Nov 2009, 13:44

Yup. I realized that after I posted. Unfortunately, the poster above yours saw my response before I was able to edit the post. I hope that doesn't confuse anyone. (feel free to delete my post).

I think we're on the same page now. I'll circle back when I can figure this out. (may be able to spend some time on this tonight after dinner).
Mobile forum or bust...
microfud
Cadet I
Cadet I
 
Posts: 17
Joined: 29 Jun 2009, 10:06
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby Hippie459MN » 27 Nov 2009, 07:09

microfud wrote:Yup. I realized that after I posted. Unfortunately, the poster above yours saw my response before I was able to edit the post. I hope that doesn't confuse anyone. (feel free to delete my post).

I think we're on the same page now. I'll circle back when I can figure this out. (may be able to spend some time on this tonight after dinner).


After I posted that I relized what the changes were and I have not done anything. :)
User avatar
Hippie459MN    
Supporter
Supporter
 
Posts: 148
Joined: 08 Feb 2008, 09:40
Location: Minnesota, USA
Favorite Team: Your moms team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby Drakkim » 29 Nov 2009, 11:25

I didn't see an edit button so let me fix my code here... it didn't work in session.php... If a nice moderator could kill the previous post to prevent confusion, that'd be great.

Drakkim wrote:First off, thanks for the great mod!

Some browsers (like the one on the LG Tritan) interpret 50% strangely...

with a 400px screen width, it interprets this:
Code: Select all
<table style="width:100%">
    <tr><td width="50%">col1</td><td width="50%">col1</td></tr>
</table>

by setting each cell to 400px. Not really sure why.... but here's a fix :-)


In functions.php:
Find:
Code: Select all
// application/xhtml+xml not used because of IE
   header('Content-type: text/html; charset=UTF-8');


BEFORE, ADD:
Code: Select all
// Grab the resolution and set a template variable
      $regex = '(\\d{3})x(\\d{3})';
      $res = preg_match ("/".$regex."/", $user_browser, $matches);
      
      if ($res != 0)
      {
         $max_width = ($matches[1] > $matches[2]) ? $matches[1] : $matches[2];
         
         $half_width = floor($max_width / 2);
         
         $template -> assign_var('MAX_WIDTH', $max_width .'px');
         $template -> assign_var('HALF_WIDTH', $half_width . 'px');
      }
      else
      {
         $template -> assign_var('MAX_WIDTH', '100%');
         $template -> assign_var('HALF_WIDTH', '50%');
      }


then in the template files, replace all
Code: Select all
<td width="50%"
with
Code: Select all
<td width="{HALF_WIDTH}"


Now the quirk is that it only seemed to fix the index... viewforum and veiwtopic still break... any ideas?
Drakkim
Crewman
Crewman
 
Posts: 7
Joined: 22 Jul 2007, 08:22
Gender: Male

Re: [DEV] STG-Mobile Device Browser Style

Postby Sniper_E » 29 Nov 2009, 20:09

I don't know about this Drakkim.
If this works only on the index page, I wouldn't suggest anyone to make those edits.

My mobile browser settings:
On my mobile phone I can set Text Size to largest, larger, medium, smaller and smallest.
There is a selection to view One Column, Fit To Screen or Desktop view.
And at the bottom page of my browser settings I can select Full Screen and Show Pictures.

I have medium text selected, Fit To Screen checked, Full Screen checked and Show Pictures checked.
I would suggest that they look at their browser settings on their mobile.
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!?
Image
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 5921
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby yogiiskandar » 04 Dec 2009, 20:45

can you add the capability to detect opera mobile 10, because when i open my site with opera mobile, what i get is my site's default style, it's not directed to stg mobile style.

[ Post made via Mobile Device ] Image
yogiiskandar    
Crewman
Crewman
 
Posts: 4
Joined: 04 Dec 2009, 20:35
Gender: Male
phpBB Knowledge: 1

Re: [DEV] STG-Mobile Device Browser Style

Postby Hippie459MN » 04 Dec 2009, 21:00

Havent tried it yet but this work on 3.0.6?
User avatar
Hippie459MN    
Supporter
Supporter
 
Posts: 148
Joined: 08 Feb 2008, 09:40
Location: Minnesota, USA
Favorite Team: Your moms team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] STG-Mobile Device Browser Style

Postby Sniper_E » 04 Dec 2009, 21:52

@ yogiiskandar, I don't think you can add 'opera mobile' to the array list because it would pick up on the Opera desktop browsers.
Maybe 'mobile10' would do it. Don't just say you have a opera mobile 10.
You really need to get your mobile browser info from the Who's Online page while you are connected.

@ Hippie, for the most part, yes this will work in 3.0.6 but it does need to be updated for that version.
I'll update this to 3.0.6 this weekend. I'd like to work on some of the validation problems also.
It's time for an update. Stay tuned to this channel.
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!?
Image
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 5921
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

PreviousNext

Return to MODs in Development

Who is online

Users browsing this forum: ccBot [Bot] and 2 guests