vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=247)
-   -   Forum Style - Lightweight Style for Small Screen Devices (cell phone, iphone, mobile, android) (https://vborg.vbsupport.ru/showthread.php?t=249277)

dartho 02-02-2012 09:52 AM

I think vBulletin will be fixing it in 4.1.11 ?

F&R 02-04-2012 11:29 AM

Quote:

Originally Posted by dartho (Post 2153534)
@Daffy - The logo is defined in the CSS so you can change there or overwrite the existing image file "images/misc/mobilelogo.png"

If you can;t see it being rendered, it could be that your brower doesn't support it, or if you have the options addon for this style you have enetered in text for the header which replaces the logo.

Aha!! That's why I don't see the logo.

I was wondering if it would be possible to add back a "mobile" adsense type thing Adsense Mobile Ad types here

I was also wondering if it was possible to put the option to go the Lite style at the top of the page on the standard layout so it is possible to switch between full and lite without having to fish in the styles drop down at the bottom.

The reason I ask this is because there are times when I use this style on my laptop/computer. Having a low bandwidth version is brilliant if you are stuck on dial up or using an overcrowded WiFi network.

Wonderful work thank you:)

Hippy 02-04-2012 10:53 PM

dartho

I test most everything with this site http://validator.w3.org
can you review and confirm the changes made are good
thanks dartho
if all checks out, could you please add to your nexted version if you release one

when I ran this skin through that site
there was 14 Errors, 3 warning(s)
you can run your site as well .. need to make sure changing to the style you use that address with the Example-->"?styleid=6" at the end of the url so it does not read the default style

with the fixes I did to these 2 template

This document was successfully checked as XHTML 1.0 Transitional! Passed
header template
1st the changes I made here where
Code:

(){a&&a();b()}}
to
Code:

(){<();b()}}
and changed
Code:

(var i = 0; i < a.length; i++)
to
Code:

(var i in a)
Code:

<vb:if condition="$vboptions['ls_page_title']!=''">
        <div align="right">
                <vb:if condition="$vboptions['ls_default_style_link']==1">
                        <a class="toplinks" href="{vb:raw vboptions.ls_navbar_home}?{vb:raw session.sessionurl}styleid={vb:raw vboptions.ls_default_style}">{vb:raw vboptions.ls_default_link}</a>
                </vb:if>
        <vb:if condition="$show['member']">
                <a class="toplinks" href="login.php?do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}">{vb:rawphrase log_out}</a>
        </vb:if>
        </div>
        <div class="header" align="left">{vb:raw vboptions.ls_page_title}</div>
<vb:else />
        <div class="logo" style="text-align:right;">
                <vb:if condition="$vboptions['ls_default_style_link']=='1'">
                        <a class="toplinks" href="{vb:raw vboptions.ls_navbar_home}?{vb:raw session.sessionurl}styleid={vb:raw vboptions.ls_default_style}">{vb:raw vboptions.ls_default_link}</a>
                </vb:if>
                <vb:if condition="$show['member']">
                        <a class="toplinks" href="login.php?do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}">{vb:rawphrase log_out}</a>
                </vb:if>
        </div>

</vb:if>

<vb:if condition="$ad_location['ad_header_logo']">
        {vb:raw ad_location.ad_header_logo}
</vb:if>
<script type="text/javascript">
function fixImgs(b){var a=document.getElementsByTagName("img");for(var i in a)if(w=a[i].width,h=a[i].height,w>b)f=1-(w-b)/w,a[i].width=w*f,a[i].height=h*f}function addLoadEvent(b){var a=window.onload;window.onload=typeof window.onload!="function"?b:function(){&lt;();b()}}addLoadEvent(function(){fixImgs(200)});</script>

also in the navbar template
all the
Code:

<input
I added a / at the end

changed template
Code:

<div class="navbar">
<vb:if condition="$vbulletin->options['ls_navbar_home']!=''">
<a href="{vb:raw $vbulletin->options['ls_navbar_home']}{vb:raw session.sessionurl_q}">{vb:raw vboptions.ls_home_link_text}</a>
<vb:else />
<a href="forum.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a>
</vb:if>
<vb:if condition="$show['member']">
<a href="search.php?{vb:raw session.sessionurl}do=getnew">{vb:rawphrase new_posts_nav}</a> <a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase user_cp}</a>
  <vb:if condition="$vbulletin->userinfo[pmunread]>0">
  <a id="newpm" href="private.php?{vb:raw session.sessionurl}">New PM</a>
  </vb:if>
<vb:else />
<a href="search.php?{vb:raw session.sessionurl}do=getdaily">{vb:rawphrase todays_posts}</a>
</vb:if>

<a href="search.php{vb:raw session.sessionurl_q}">{vb:rawphrase search}</a></div>
<vb:if condition="!$show['member']">
{vb:raw ad_location.ad_navbar_below}
<div>
<form class="navbarbelow" action="login.php?do=login" method="post">
<input onclick="this.value='';" name="vb_login_username" class="windowbg" id="navbar_username" accesskey="1" value="Username" size="8" type="text" />
<input onclick="this.value='';" name="vb_login_password" class="windowbg" id="navbar_password" accesskey="2" value="" size="8" type="password" />
<input name="cookieuser" value="1" type="checkbox" />
<input name="securitytoken" value="guest" type="hidden" />
&nbsp;<input id="btn" value="Log in" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="3" type="submit" />
<input name="s" value="" type="hidden" />
<input name="do" value="login" type="hidden" />
<input name="vb_login_md5password" type="hidden" />
<input name="vb_login_md5password_utf" type="hidden" />
</form>
</div>
</vb:if>
<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'"><form action="profile.php?do=dismissnotice" method="post" id="notices">
                <input type="hidden" name="do" value="dismissnotice" />
                <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
                <input type="hidden" name="url" value="{vb:raw return_link}" />
                        {vb:raw notices}
        </form></vb:if>
<div>{vb:raw navbits.breadcrumb}</div>


dartho 02-04-2012 11:05 PM

@F&R - There's nothing to stop you adding Ads in - the ad hooks etc are all there. I'm pretty sure you can just paste in the code you receive from Google

re: Full Site link - if you have a drop box, I assume you have the 'Options' addon installed? IN which case you should be able to select the option to have a link in the footer rather than a dropdown box

dartho 02-04-2012 11:51 PM

@Hippy - Thanks. I closed off those input tags as well as some img tags in other templates. As for the script, rather than change it, I simply added comment codes insode the <script> tags:

Code:

<script type="text/javascript">
<!--
...
-->
</script>

as I wasn;t sure if the code changes would affect functionality.

At one stage in t he distant past, I think the original version of this style was XHTML Strict, but I got lazy over time :o

Hippy 02-05-2012 02:23 AM

welcome
yes I remember some img tag but i forgot where they where ..
that was a different day I was testing and forgot to mention it here since I did forget about them..

I wasn't sure what the a&&a ment all I could come up with was &alt; I i could not come up with anything in a search ..
but I did find this http://stackoverflow.com/questions/7...for-var-i-in-a this is why I change that code..

keep me posted bud and again thanks for the fantastic mobil (better that vb's "IMO") style ;)

if you comment out the script will the image still resize I test what I did and they still do..
if thats what it's for..

dartho 02-05-2012 06:47 AM

Quote:

Originally Posted by Hippy (Post 2296302)
if you comment out the script will the image still resize I test what I did and they still do..
if thats what it's for..

Yep the comment is only meant to stop the bowser trying to render it whilst allowing the script engine to still execute the script - or something like that ...

F&R 02-05-2012 09:30 AM

Quote:

Originally Posted by dartho (Post 2296273)
@F&R - There's nothing to stop you adding Ads in - the ad hooks etc are all there. I'm pretty sure you can just paste in the code you receive from Google

re: Full Site link - if you have a drop box, I assume you have the 'Options' addon installed? IN which case you should be able to select the option to have a link in the footer rather than a dropdown box

Thanks for the reply, yes I have the options add-in installed and it does display "desktop" on the Lightweight style, BUT what I was asking is how I can put the reciprocal button on the desktop style to quickly go to the lightweight style when it is loading the desktop style.

On the ads stuff, ok great, I will have a play.

I do have one more problem. On my windows phone 7 it displays fine and when I change pages, the lightweight style is still in force. However on an iPhone and on a Nokia Xpress Music, when you change page (to go into thread for example) it reverts to the desktop style.

I have uninstalled the style and the options and then reinstalled them, cleared system cache and updated styles. The users have cleared their caches and logged in again, but it still reverts to the desktop style when you change pages. Any ideas? As I said my Windows Phone 7 behaves as expected, iPhones don't.

dartho 02-05-2012 12:13 PM

@F&R - Try editing the headinclude template and removing the line
Code:

<base href="{vb:raw vboptions.bburl}/" />
In regards to link - try editing the header template in your default style, search for:
Code:

<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
and add the following immediately before it:

Code:

<li><a href="forum.php?styleid=1">Lightweight Style</a></li>
that what type of thing you are after?

Hippy 02-05-2012 12:26 PM

Quote:

Originally Posted by dartho (Post 2296281)
@Hippy - Thanks. I closed off those input tags as well as some img tags in other templates. As for the script, rather than change it, I simply added comment codes insode the <script> tags:

Code:

<script type="text/javascript">
<!--
...
-->
</script>

as I wasn;t sure if the code changes would affect functionality.

At one stage in t he distant past, I think the original version of this style was XHTML Strict, but I got lazy over time :o

can you add the edit you did I am not quite sure how you ment to do, this are ..... the code ? and just add the code in replace or the dots there in your example ?


All times are GMT. The time now is 03:48 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02186 seconds
  • Memory Usage 1,796KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete