vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=237)
-   -   Lightweight Style for VB3.8.7 iPhone/Mobile/Cell/PDA (https://vborg.vbsupport.ru/showthread.php?t=263822)

infnity8x3 09-28-2011 06:11 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2200239)
If anyone is running AME 2.5 (automatic media embedder) I have figured out how to have embedded videos made smaller in the mobile style so they can still be watched inside posts.

In the file ame_bbcode.php that came with the AME mod (in your /includes directory)

find:
PHP Code:

    $dimensions         =  "_$ameinfo[zone]";
    
$ameinfo['width']     = $vbulletin->options['automediaembed_width' $dimensions];
    
$ameinfo['height']     = $vbulletin->options['automediaembed_height' $dimensions]; 

and below it Add:
PHP Code:

if ($vbulletin->userinfo['styleid'] == 38)
{
  
$ameinfo['height'] = round($ameinfo['height']/2.3);
  
$ameinfo['width']  = round($ameinfo['width']/2.3);


Change 38 to the styleid of your mobile style.

Yo can set absolute heights and widths if you prefer, I am calculating it as a fraction of my set values which words well for me. You can experiment with the exact numbers to find what works best for you.

How can I do this with out using the styleid conditional? See my mobile site is on mobile.example.com so its a dirrfent url than just example.com. And my members style id user info never changes from 0 / default. Any way to compare the url and if .mobile exists in it then downsize AME videos.

And finally I want to thank all that helped with getting a mobile version of my forum up and ready. I no longer feel left out with vb4 getting all the mobile love.

BirdOPrey5 09-28-2011 06:29 PM

$_SERVER['HTTP_HOST'] should hold the value mobile.example.com when on your mobile theme, you can test for that...

more info: http://roshanbh.com.np/2008/05/usefu...ables-php.html

PHP Code:

if ($_SERVER['HTTP_HOST'] == "mobile.example.com"

  
$ameinfo['height'] = round($ameinfo['height']/2.3); 
  
$ameinfo['width']  = round($ameinfo['width']/2.3); 



infnity8x3 09-28-2011 07:16 PM

That worked fantastically. Thanks. Now I just gotta Find that post I seen earlier about how to stop search engines from indexing the mobile url and penalizing for double content.

This is huge Thanks again guys :D

Got it
PHP Code:

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"


infnity8x3 09-29-2011 06:08 PM

Dartho, members love the style. The only bug that I have found is it doesn't handle posts under the 10 char limit very well.

Under default vb style a popup Displays saying.
Quote:

The message you have entered is too short. Please lengthen your message to at least 10 characters.
But under the mobile style nothing happens leaving the user to believe its broken. The post doesn't go threw and no indication as to why not.

Not trying to sound nit picky just pointing that out.

CrashPush 10-21-2011 01:41 PM

Most of my sub-forums are not showing anyone know why that could be happening?

bestmilan 10-27-2011 03:23 PM

Hi, Dartho!

Would it be possible to somehow edit the existing script to enable the "Posted via Mobile Device" feature?

cronjob78 10-28-2011 05:20 PM

Dartho,

This is a great feature - well done. Happy to donate once I get this sorted:

I want to give the style a red theme. Simple enough usually: just go to admincp -> style manager ->lightweight -> main css

and then change all the colours. Ive put red in everywhere and saved it but its still all blue when I look at the forums. Ive also replaced table widths with huge and tiny values to see if the stylesheet is updating but no movement. Is changing the colours possible?

Edit: Also, only admins seem to be able to use the style in a normal PC browser with styleid=3 (in my case 'lightweight').
I should note that Im running the vBulletin API style albeit it is currently disabled.

dartho 10-28-2011 09:22 PM

Quote:

Is changing the colours possible?
You need to edit the lightweigth.css.php file for CSS changes.

Quote:

Also, only admins seem to be able to use the style in a normal PC browser with styleid=3 (in my case 'lightweight').
If only admins can use the style, that means you have not made it user selectable.

cronjob78 10-28-2011 11:34 PM

Quote:

Originally Posted by dartho (Post 2262448)
You need to edit the lightweigth.css.php file for CSS changes.


If only admins can use the style, that means you have not made it user selectable.

thanks for the quick reply. how do u make it user selectable?

dartho 10-28-2011 11:59 PM

have a little tick in teh box next to it in Style Manager where it lists the styles installed


All times are GMT. The time now is 07:42 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.01516 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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