vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=195)
-   -   Mobile/Cell Phone Style (https://vborg.vbsupport.ru/showthread.php?t=151186)

swissbob 03-06-2008 05:31 PM

This may sound a bit stupid, but if you select the mobile style in a normal PC web browser how do you unselect it? There doesn't appear to be a style choice in the style...?

Am I going to end up with lots of users selecting it to see what it looks like then getting stuck with it?

voter 03-06-2008 06:38 PM

Sorry Dartho I post in wrong place, as of I installed only the lite style and not the pluging that detects the Mobile phones.

The situation is that mobile emulators checkers show only the main page of forum http://viparmenia.com/vb/index.php?styleid=17 but when I am trying to open a forum say http://viparmenia.com/vb/forumdispla...=41&styleid=17 or a topic it says the page is too big.

Is there a way to limit the number of topicsper page for this style?

dartho 03-06-2008 08:01 PM

@Voter: That's a limitation of the emulator and is unlikely to actually affect your site but I will look at limiting topics/page. It may have to be hard coded into the style

@Swissbob: If you allow users to change styles, I'd suggest adding the following at the very end of the footer template (replace x with the styleid number of your preferred style):
Code:

<div class="navbar">
<a href="/index.php?$session[sessionurl]styleid=x>Full Version</a>
</div>


swissbob 03-06-2008 08:05 PM

Quote:

Originally Posted by dartho (Post 1458766)
@Swissbob: If you allow users to change styles, I'd suggest adding the following at the very end of the footer template (replace x with the styleid number of your preferred style):
Code:

<div class="navbar">
<a href="/index.php?$session[sessionurl]styleid=x>Full Version</a>
</div>


That's great, thank you.

It didn't seem to work without allowing users to change styles.

dartho 03-07-2008 12:02 AM

It will work if you use this style in conjunction with the Mobile AUtodetect add-on. You need to have the style ticked as user selectable in your Style Manager, but set teh options to not allow users to change styles in vBulletin options.

dartho 03-07-2008 12:24 AM

Quote:

Originally Posted by voter (Post 1458689)
Sorry Dartho I post in wrong place, as of I installed only the lite style and not the pluging that detects the Mobile phones.

The situation is that mobile emulators checkers show only the main page of forum http://viparmenia.com/vb/index.php?styleid=17 but when I am trying to open a forum say http://viparmenia.com/vb/forumdispla...=41&styleid=17 or a topic it says the page is too big.

Is there a way to limit the number of topicsper page for this style?

It will require adding a plugin. Edit the following code and change the "XX" for the styleid number of your mobile style and also change teh maxposts and maxthreads values to what you need, copy and save it as a file called maxposts-plugin.xml and then import the plugin in your AdminCP "Plugins & Products", Download / Upload Plugins" GO to the end of the page and browse for the file you just saved then click Import.
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
        <plugin active="1" executionorder="5" product="vbulletin">
                <title>Set Max Posts per Thread</title>
                <hookname>style_fetch</hookname>
                <phpcode><![CDATA[if ($styleid == xx){
    $vbulletin->options['maxposts'] = 5;
    $vbulletin->options['maxthreads'] = 5;
}]]></phpcode>
        </plugin>
</plugins>

I've also attached the plugin file so you can save and then edit.

Thanks to Kirk Y for the help.

voter 03-07-2008 02:09 PM

Quote:

Originally Posted by dartho (Post 1458941)
It will require adding a plugin. Edit the following code and change the "XX" for the styleid number of your mobile style and also change teh maxposts and maxthreads values to what you need, copy and save it as a file called maxposts-plugin.xml and then import the plugin in your AdminCP "Plugins & Products", Download / Upload Plugins" GO to the end of the page and browse for the file you just saved then click Import.
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
        <plugin active="1" executionorder="5" product="vbulletin">
                <title>Set Max Posts per Thread</title>
                <hookname>style_fetch</hookname>
                <phpcode><![CDATA[if ($styleid == xx){
    $vbulletin->options['maxposts'] = 5;
    $vbulletin->options['maxthreads'] = 5;
}]]></phpcode>
        </plugin>
</plugins>

I've also attached the plugin file so you can save and then edit.

Thanks to Kirk Y for the help.

Great job, simple and working. From BAD I could have FAIR for all my pages even having the HEAVY unicode character set like Armenian.

I would suggest you to releas this as a mod "Limiting Number of threads and posts per Stlye"

dartho 03-07-2008 10:13 PM

I wouldn;t be too concerned with the http://ready.mobi ratings - simply changing your DOC TYPE can take you up 2 full points!

This style has been tested by many people on many devices and seems to do its job well. If you actually have a mobi domain name and require compliance, let me know - I think the tweaks are in this thread somewhere on how to get a 5/5 on ready.mobi

mariocaz 03-08-2008 07:56 PM

Very nice style

mariocaz 03-09-2008 07:23 PM

Dartho, if you need here I put your great style translated in spanish ok.

Only please help me to put the top Tittle of my forum centered and with bold, maybe will take a nice look with this little modification.

Thank you again!


All times are GMT. The time now is 09:59 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.01484 seconds
  • Memory Usage 1,750KB
  • 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_code_printable
  • (3)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