vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=230)
-   -   Mobile, Cell, Phone, PDA, iPhone Style (https://vborg.vbsupport.ru/showthread.php?t=174375)

dartho 06-12-2008 09:49 PM

I haven't included a style chooser by default as I don't need or want it for my implementation of this style - I don't allow my members to choose their own styles.

Does shoutbox work from your device with the default vBulletin style? If there are any automatic template edits being made by the shoutbox addon, these will quite likely fail - you'll need to make template edits manually

callumbush 06-15-2008 01:13 PM

Hi Dartho,

1)
The attachments display so much better :) but is there any way to have a space between the titles of the attachments? In threads where there are more than one attachment it looks very messy

2)
Also, I tried to post a test thread using the opera mini simulator. It will not let me post my message above the "Posted via Mobile Device"? The only solution I can find to make it work is to delete that text.

Out of interest, why did you include "Posted via mobile device"?

3)
I guess the user should also be given the option to subscribe to the thread when they post it.
I (personally) would find that useful.

4)
Can you tell me where I find the style folder for this on my ftp?
I wanted to see if these worked with it :)

https://vborg.vbsupport.ru/showthread.php?t=122944
https://vborg.vbsupport.ru/showthrea...171014&page=66

dartho 06-16-2008 02:36 PM

@Callumbush:
1) Next version
2) Next version will have a companion which will do this differently and allow you to customise this message via admincp
3) Too hard - user should set things up to subscribe to all threads they post in, or use a PC when they wanna do such things :)
4) There is no style folder

I hope to have the next version released with a companion product for customising stuff tomorrow(otherwise not many changes) - although it's simple, existing users should find this pretty cool - and I look forward to more suggestions :)

dartho 06-17-2008 12:54 AM

This has now been updated to version 0.0.8

Quote:

Originally Posted by Update Mail Out

This has been updated and you can also install an addon product to customise it!

Only real changes are to integrate with add-on product - see https://vborg.vbsupport.ru/showthread.php?t=182692 for more information


mariocaz 06-17-2008 02:33 AM

Dartho I have a question, the add-on comes in this product or also I have to download and install the add-on ?

thank you.

dartho 06-17-2008 02:41 AM

This is the style only - products and styles can;t be released in same package. If you'd like to use the features in the add-on you will need to download and install that in addition to updating the style to 0.0.8.

The add-on is not required for this style to work - it just ads a few options to save people having to change templates by hand

nike.stars 06-17-2008 05:04 AM

thanks for including my "what's going on" modification, but i think you should include proper credits for me either in source code / the option :)

Darat 06-17-2008 09:09 AM

Excellent work - been promising my users for a couple of years we'd have a good mobile style and you've delivered it. Thanks

Keyser Soze 06-17-2008 03:31 PM

@dartho:
Please insert the following remaining phrases as soon as possible into the templates because it is very time consuming to replace words like "Today's Posts", "UserCP" etc. in your templates again and again after every single update (my forum's main language is not english but german).

@dartho: please make the following changes in the official templates of this style:

navbar:
  • replace "New Posts" with "$vbphrase[new_posts]"
  • replace "Today's Posts" with "$vbphrase[todays_posts]"
footer:
  • replace "Search" with "$vbphrase[search]"
  • replace "Logout" with "$vbphrase[log_out]"
  • replace "?" with "©"
FORUMHOME:
  • replace "Mark Forums Read" with "$vbphrase[mark_forums_read]"
search_results:
  • replace "Mark Forums Read" with "$vbphrase[mark_forums_read]"
USERCP:
  • replace "USER CONTROL PANEL" with "$vbphrase[user_cp]"
  • replace "Subscribed Threads" with "$vbphrase[subscribed_threads]"
postbit_legacy:
  • replace "[Rep]" with "[$vbphrase[reply]]"
  • replace "[Ed]" with "[$vbphrase[edit]]"
  • replace
    <a href=member.php?userid=$post[userid]>
    with
    <a href="member.php?userid=$post[userid]">
pm_newpm:
  • replace "New PM" with "$vbphrase[send_new_message]"
MEMBERINFO:
  • replace "Member Information" with "$vbphrase[view_profile]: $userinfo[username]"
  • replace "Member:" with "$vbphrase[username]:"
  • replace "Title:" with "$vbphrase[user_title]:"
threadbit:
  • remove "pg:" (everyone should know the numbers behind the thread titles)
  • replace "by" with "$vbphrase[posted_by]" (twice!!)
threadbit_announcement:
  • replace "by" with "$vbphrase[posted_by]"
threadbit_deleted:
  • replace "by" with "$vbphrase[posted_by]"
forumdisplay:
  • replace "Threads" with "$vbphrase[threads]"
  • replace "New" with "$vbphrase[new]"
SHOWTHREAD:
  • replace "Post Reply" with "$vbphrase[submit_reply]"
  • replace
    $foruminfo[title_clean]</a>>$thread[title]
    with
    $foruminfo[title_clean]</a> &gt; $thread[title]
EVERY TEMPLATE THAT CONTAINS A <HTML>-TAG:
  • replace
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    with
    <html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
Thanks in advance! :)

tekguru 06-17-2008 04:24 PM

Loaded - good suggestions on those changes!

dartho 06-17-2008 10:06 PM

Thanks for that Keyser Soze - I've been wanting to (but putting off) doing that for a long time. Your list should make it much easier for me...

jazz_aaf 06-18-2008 02:19 AM

Thanks for the style.
You may want to check all those hardly-coded phrases in the style. There are alot of them that do not use vbulletin's phrases system.

nike.stars 06-18-2008 06:59 PM

@dartho
could you explain why after i post message / PM in opera mini the screen go white? It makes the feeling that the data is failed to sent for most of my member so it increase the chance of double / triple post :(

dartho 06-18-2008 10:00 PM

I don;t have that problem with Opera Mini on my site. Try testing via the OperaMini emulator (which I assume is using the latest version) and see of you get the same results

http://www.operamini.com/demo/?url=www.yourdomain.com (change the yourdomain bit on the end)

BeerLuver 06-20-2008 10:59 AM

Quote:

Originally Posted by Crimm (Post 1502304)
Dartho I hope you don't mind this. I HAD to get this working, so I thought I would offer everyone a bandaid until Dartho gets back. I thought I would share in case anyone is stuck after moving to 3.7 today.

Okay I had to get this working, since I have already moved to 3.7 and I have mobile users ;)

According to this post: https://vborg.vbsupport.ru/showthread.php?t=177013

If you are getting this error:

Find the following templates:

Add this just before the submit button:
Code:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
That should at least get you by in a pinch until Dartho puts a new version up.

;)

Umm... bit confused. What's the submit button code we should look for? In some templates, seems to be multiple instances where I see submit; or is it sbutton?

dartho 06-20-2008 11:10 AM

It's already been done in this release - no need to worry about this

dartho 06-21-2008 10:28 PM

I've just put up the template edits need to hide a style form the style chooser so users can;t select it.. see here: How to hide a style from style chooser

I may be able to make this into a mini-product and/or integrate it into the add-on which can customise this style

Venturing 06-22-2008 08:08 AM

Installed and looks good. Some fonts are a little large on the BlackBerry Curve, but I'm sure we'll get used to it, or end up tweaking the CSS a bit.

dartho 06-22-2008 09:02 AM

Someone else on a blackberry mentioned the same thing - edit the CSS and remove all the size declarations....

BeerLuver 06-24-2008 02:57 AM

Installed... tested on my MotoRAZR V3... looks/worked great in the built-in browser + in Opera Mini. Thanks for this excellent skin dartho :D. Got this setup for mobile devices, and the iPhone/Touch skin for those users. Very cool.

Nevets2329 06-26-2008 01:30 PM

Help! Downloaded fine, works on my phone fine, but I cannot post on my own site via phone as the password keeps getting wiped. What am I doing wrong?

Also, have one user that gets this hack as 'default' on his PC. I have had to turn it off to stop this, can anyone help?

Fireproof 06-26-2008 07:25 PM

Quote:

Originally Posted by dartho (Post 1555908)
Someone else on a blackberry mentioned the same thing - edit the CSS and remove all the size declarations....

I did and removed the size declarations as you suggested and now it works great. Nice and small, but very readable. :up:

Howell 06-26-2008 07:48 PM

Is there anyway to remove the template notice in the AdminCP??

It's showing I need to update 10 templates which obviously have been customized for this style.

I'm using Vbulletin 3.7.2

FIXED

**EDIT**

I opened the XML and did a find and replace for every instance of 3.7.1 and replaced it with 3.7.2 then re-uploaded the style overwriting the original.

**/ EDIT**

dartho 06-27-2008 07:40 AM

Quote:

Originally Posted by Nevets2329 (Post 1559561)
Help! Downloaded fine, works on my phone fine, but I cannot post on my own site via phone as the password keeps getting wiped. What am I doing wrong?

Also, have one user that gets this hack as 'default' on his PC. I have had to turn it off to stop this, can anyone help?

For a user to get this on their PC, they would have to select it as their style. In the add-on I released to go along with this, you can add a link back to the default style so users can get back to that if they select by accident/curiosity

If you have the mobile detect hack installed and this is what is forcing the user to teh mobile style, check the users useragent string and post here so I can see if it is conflicting with anything. Also if you are using the autodetect hack, it may be worth hiding the MObile style from PC users so they can;t select it by accident - this addon will help

nike.stars 06-29-2008 11:13 AM

dartho, do you have any intention in the future to add the moderation tools in this style? I have a couple of my mod asking about this feature as most of my moderator prefer to access my forum via the phone :)

dartho 06-29-2008 12:30 PM

Mods can delete threads and posts. What other sorts of moderation would you want form a mobile phone?

rockylinux 06-29-2008 12:41 PM

Quote:

Originally Posted by dartho (Post 1562004)
Mods can delete threads and posts. What other sorts of moderation would you want form a mobile phone?

edit e Banned (mod CP & Admin CP)... :) thanks

EmpireZ 06-30-2008 07:01 AM

Is there a easy way to add a link to this style?
I have a tab forum like here on .org, but can't see those forums on this style, just the main page. What would be easiet or you suggest I do to view these other tab forums ?

dartho 06-30-2008 07:50 AM

You just need to create a link to "index.php?styleid=xx" where xx is the styleid number. However, if you are using this style in conjunction with the auto-detect add-on, mobile uses will be force to use this style anyway.

THere is also an add-on to this style here: https://vborg.vbsupport.ru/showthread.php?t=182692 which allows to to customise a few things in addition to including a link back to your default style and hiding the mobile style form the style chooser for your PC users.

matt wood 07-01-2008 08:36 AM

Hi, great mod, will there be a version for 3.7.2? I'm getting this error.

This file was created using a different version of vBulletin from the one you are running.

Your version: 3.7.2
File version: 3.7.1

Any quick fixes?

matt wood 07-01-2008 09:44 AM

Ignore me, all working, installed, nominated and rated 5! :) Many Thanks.

Nevets2329 07-03-2008 08:33 AM

I have had to delete as it caused too many problems.

dartho 07-03-2008 09:40 AM

That's one way to resolve things :)

TheWhite 07-04-2008 07:06 AM

Quote:

Originally Posted by dartho (Post 1531419)
OK - I think I have working properly now. Code for plugin below. Ads don;t show up all teh time and after a bunch of refreshes they go a way for a while. This is a google thing and I guess it depends on your sites content and who is advertising? Anyway - the following seems to work for me. It is set for showing ads just before the quick reply, but you can change the ad_location in the code to show them after first post by searching and replacing ad_showthread_beforeqr for ad_showthread_firstpost in the plugin code...



Get your mobile adsense PHP code - here's the code Google game me (DO NOT USE THIS - GET YOUR OWN)
PHP Code:

<?php

$GLOBALS
['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt time();
google_set_screen_res();

function 
google_append_url(&$url$param$value) {
  
$url .= '&' $param '=' urlencode($value);
}

function 
google_append_globals(&$url$param) {
  
google_append_url($url$param$GLOBALS['google'][$param]);
}

function 
google_append_color(&$url$param) {
  global 
$google_dt;
  
$color_array split(','$GLOBALS['google'][$param]);
  
google_append_url($url$param,
                    
$color_array[$google_dt sizeof($color_array)]);
}

function 
google_set_screen_res() {
  
$screen_res $_SERVER['HTTP_UA_PIXELS'];
  
$delimiter 'x';
  if (
$screen_res == '') {
    
$screen_res $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
    
$delimiter ',';
  }
  
$res_array explode($delimiter$screen_res);
  if (
sizeof($res_array) == 2) {
    
$GLOBALS['google']['u_w'] = $res_array[0];
    
$GLOBALS['google']['u_h'] = $res_array[1];
  }
}

function 
google_get_ad_url() {
  
$google_ad_url 'http://pagead2.googlesyndication.com/pagead/ads?';
  
$google_scheme = ($GLOBALS['google']['https'] == 'on')
      ? 
'https://' 'http://';
  foreach (
$GLOBALS['google'] as $param => $value) {
    if (
$param == 'client') {
      
google_append_url($google_ad_url$param,
                        
'ca-mb-' $GLOBALS['google'][$param]);
    } else if (
strpos($param'color_') === 0) {
      
google_append_color($google_ad_url$param);
    } else if ((
strpos($param'host') === 0)
               || (
strpos($param'url') === 0)) {
      
google_append_url($google_ad_url$param,
                        
$google_scheme $GLOBALS['google'][$param]);
    } else {
      
google_append_globals($google_ad_url$param);
    }
  }
  
google_append_url($google_ad_url'dt',
               
round(1000 array_sum(explode(' 'microtime()))));
  return 
$google_ad_url;
}

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if (
$google_ad_handle) {
  while (!
feof($google_ad_handle)) {
    echo 
fread($google_ad_handle8192);
  }
  
fclose($google_ad_handle);
}

?>

I had to move al the functions to the top of the code block for it to work in a plug in I created a called "Google Adsense Mobile" on the showthread_start hook. Here is the working plugin code:
PHP Code:

if ($styleid == xx) {
function 
google_append_url(&$url$param$value) {
  
$url .= '&' $param '=' urlencode($value);
}

function 
google_append_globals(&$url$param) {
  
google_append_url($url$param$GLOBALS['google'][$param]);
}

function 
google_append_color(&$url$param) {
  global 
$google_dt;
  
$color_array split(','$GLOBALS['google'][$param]);
  
google_append_url($url$param,
                    
$color_array[$google_dt sizeof($color_array)]);
}

function 
google_set_screen_res() {
  
$screen_res $_SERVER['HTTP_UA_PIXELS'];
  
$delimiter 'x';
  if (
$screen_res == '') {
    
$screen_res $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
    
$delimiter ',';
  }
  
$res_array explode($delimiter$screen_res);
  if (
sizeof($res_array) == 2) {
    
$GLOBALS['google']['u_w'] = $res_array[0];
    
$GLOBALS['google']['u_h'] = $res_array[1];
  }
}

function 
google_get_ad_url() {
  
$google_ad_url 'http://pagead2.googlesyndication.com/pagead/ads?';
  
$google_scheme = ($GLOBALS['google']['https'] == 'on')
      ? 
'https://' 'http://';
  foreach (
$GLOBALS['google'] as $param => $value) {
    if (
$param == 'client') {
      
google_append_url($google_ad_url$param,
                        
'ca-mb-' $GLOBALS['google'][$param]);
    } else if (
strpos($param'color_') === 0) {
      
google_append_color($google_ad_url$param);
    } else if ((
strpos($param'host') === 0)
               || (
strpos($param'url') === 0)) {
      
google_append_url($google_ad_url$param,
                        
$google_scheme $GLOBALS['google'][$param]);
    } else {
      
google_append_globals($google_ad_url$param);
    }
  }
  
google_append_url($google_ad_url'dt',
               
round(1000 array_sum(explode(' 'microtime()))));
  return 
$google_ad_url;
}

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad '';

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if (
$google_ad_handle) {
  while (!
feof($google_ad_handle)) {
    
$googlemad .= fread($google_ad_handle8192);
  }
  
fclose($google_ad_handle);
}
$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);



You'll see I wrapped the google code in a conditional if ($styleid == xx) { ... } where xx is the styleid of my mobile style - you will need to change this and removed the opening and closing php tags.

The other changes (after moving the functions to the top) were:
1. replace
PHP Code:

$google_dt time();
google_set_screen_res(); 

with
PHP Code:

$google_dt time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad ''

2. replace
PHP Code:

    echo fread($google_ad_handle8192);
  }
  
fclose($google_ad_handle);


with
PHP Code:

    $googlemad .= fread($google_ad_handle8192);
  }
  
fclose($google_ad_handle);
}

$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad); 

That's about it. You could modify and or duplicate this to work with other ad_locations. Current defined ad_locations in vBulletin 3.7 (and this style) and the likely best hook location for these ads are (i'm not so sure about the ones in blue - they should work there, but there may be a more efficient place to put them. Feedback welcomed!):

ad_footer_start - global_start
ad_footer_end - global_start
ad_forumdisplay_afterthreads - forum_display_start
ad_forumhome_afterforums - forum_home_start
ad_header_end - global_start
ad_header_logo - global_start
ad_navbar_below - global_start
ad_showthread_beforeqr - showthread_start
ad_showthread_firstpost - showthread_start

Hope this helps!

i really don't understand what to do after getting my adsense code, i'm totally lost can you please ad a 4Dummies guide?

Regards

dartho 07-04-2008 07:52 AM

@The WHite - PM me your google mobile adsense code, the styleid number of your mobile style, where you want the ads to show (you can choose from one of these: ad_forumdisplay_afterthreads, ad_forumhome_afterforums, ad_showthread_beforeqr, ad_showthread_firstpost) and over the weekend if/when I get a bit of time I'll turn it into a plugin and send it back to you.

HOWEVER - no warranties, guaranties, support or any such thing comes with the code I send back to you.

TheWhite 07-04-2008 07:57 AM

pm sent!!

PS. I'd like to place it where it should have the most possibilities of getting clicked maybe after the first thread or where you think it's better.

God Bless

TheWhite 07-05-2008 06:00 AM

I found a little bug, when replying if you type in too many words you won't be able to see the text anymore because it will no longer scroll down in the window and another thing since the admins and mods are unable to edit,ban or anything else is it possibile to remove the cancel button [X]?

Thanks for all of the help

Note to all: The coder dartho is a very helpful person =)

Artangel 07-05-2008 01:18 PM

Quote:

Originally Posted by nike.stars (Post 1543255)
is there a way just to show up the smiley?

yes.. just look at the Replace varialble.. and change the codes.. :)

i made some changes in my mobile style.. put an icons and smiley..


btw, thanks to the author for this mobile style.. :)

TheWhite 07-05-2008 02:57 PM

Quote:

Originally Posted by Artangel (Post 1567356)
yes.. just look at the Replace varialble.. and change the codes.. :)

i made some changes in my mobile style.. put an icons and smiley..


btw, thanks to the author for this mobile style.. :)

can you be more specific?

dartho 07-05-2008 09:24 PM

Quote:

Originally Posted by TheWhite (Post 1567144)
I found a little bug, when replying if you type in too many words you won't be able to see the text anymore because it will no longer scroll down in the window

Not sure what you mean here? Is this quick reply or reply - both use a textarea anyway so it could be your browser limitations...
Quote:

Originally Posted by TheWhite (Post 1567144)
and another thing since the admins and mods are unable to edit,ban or anything else is it possibile to remove the cancel button [X]?

Moderators (or users/groups with the correct permissions) can edit posts, delete posts and delete threads. You can edit the postbit template to remove the delete thread link ([X]) if you don't require it


All times are GMT. The time now is 01:23 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.02113 seconds
  • Memory Usage 1,963KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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