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)

Azum 09-14-2014 10:07 PM

Great style, anyone added tabs to the member.php (view profile) yet?

Azum 09-14-2014 10:41 PM

Question, if you allow style choices, will this override the choice with the default style every time the user logs in on a non-mobile device?

Quote:

Originally Posted by dartho (Post 2412492)
vBulletin messed things up for this style when the seperated mobile and standard styles.

If you want to use VB detection and simply apply one style to advanced mobile devices, one style to basic mobile devices and a default style to everyone and allow people to select their own style (assuming they are already allowed to do this on your site) and still allow admin to pick any style they want, the following should do it.

Create a plugin on style_fetch with the following code being sure to enter in teh styleids you want for mobile, advanced mobile and default styles:

PHP Code:

//VB has already check and set cookies if the user can skip the style, so just read what they wrote
$vbulletin->input->clean_array_gpc('c', array(
    
COOKIE_PREFIX 'userstyleid'     => TYPE_INT,
    
COOKIE_PREFIX 'skipmobilestyle' => TYPE_BOOL,
));
$skip $vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'];
//Admin can have any style they want, so check if they're an admin and have specificed a styleid
if ($vbulletin->userinfo['permissions']['adminpermissions'])
{
$vbulletin->input->clean_gpc('r''styleid'TYPE_INT);
$styleid $vbulletin->GPC['styleid'];
}
else if (
$skip)
//if the user is not an admin has chosen to skip the mobile style (if allowed) give them default
$styleid=$vbulletin->GPC[COOKIE_PREFIX 'userstyleid'];
else if (
$vbulletin->mobile_browser_advanced
$styleid=20;  //Advanced mobile style ID
else if ($vbulletin->mobile_browser)
$styleid=7;   //Basic mobile style ID
else 
$styleid=1;  //everyone else gets default style default style 



dartho 09-17-2014 01:53 PM

i think it will give them whatever they have chosen

Azum 09-17-2014 02:12 PM

I found that just using the below by itself along with built in VB mobile detection works fine. There was no need for the plugin.

Quote:

Originally Posted by dartho (Post 2412496)
If you wanted to make this simpler, and don;t mind going into debug mode on your site, you could edit the Option Code for Mobile Style boxes in AdminCP so that all styles (both mobile and standard) show up and then you could replace the styleid numbers in the plugin above with $vbulletin->options['mobilestyleid_basic'], $vbulletin->options['mobilestyleid_advanced'] and $vbulletin->options['styleid'] then if you changed styles down the track you wouldn;t need to edit the plugin by hand. You would still need the above plugin to make it work.

To do this change the Option Code to:
PHP Code:

select:eval
//options = fetch_style_title_options_array('', false, 'mobile');
$options fetch_style_title_options_array();
$options = array('0' => $vbphrase['none']) + $options



Azum 09-17-2014 10:00 PM

Small contribution for deleting PMs. The code provided almost works, but need to change it to:

Code:

<div class="titlebg">{vb:raw pm.title}</div>
{vb:raw postbit}
<form action="private.php?do=managepm&amp;dowhat=delete&amp;pmid={vb:raw pm.pmid}" method="post" class="block">
<div class="titlebg">{vb:rawphrase delete_this_message}</div>
                <div class="windowbg">
{vb:rawphrase delete_message_click_button}
<input type="submit" class="button" value="{vb:rawphrase delete_this_message}" />
<br /><label for="deletepm"><input id="deletepm" name="pm[{vb:raw pm.pmid}]" type="checkbox" value="true" /> {vb:rawphrase delete_this_message}</label>
                </div>
                <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <input type="hidden" name="do" value="managepm" />
                <input type="hidden" name="dowhat" value="delete" />
                <input type="hidden" name="folderid" value="{vb:raw pm.folderid}" />               
        </form>

Quote:

Originally Posted by dartho (Post 2507029)
Adding something like:
HTML Code:

<form action="private.php?do=managepm&amp;dowhat=delete&amp;pmid={vb:raw pm.pmid}" method="post" class="block">
<div class="titlebg">{vb:rawphrase delete_this_message}</div>
                <div class="windowbg">
{vb:rawphrase delete_message_click_button}
<input type="submit" class="button" value="{vb:rawphrase delete_this_message}" />
<br /><label for="deletepm"><input id="deletepm" name="pm[{vb:raw pm.pmid}]" type="checkbox" value="true" /> {vb:rawphrase delete_this_message}</label>
                </div>
                <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <input type="hidden" name="do" value="managepm" />
                <input type="hidden" name="dowhat" value="deleteonepm" />
                <input type="hidden" name="folderid" value="{vb:raw pm.folderid}" />               
        </form>

to the bottom of the pm_showpm template should do it, I think ...


Azum 09-23-2014 03:25 AM

How do you get preview reply to work? I'm failing so far.

Edit: Nevermind, not really sure how, but I got it to work copying bits and pieces of other style templates.

duniabebas 09-30-2014 04:13 AM

anyone have this style support 4.2.2?

Azum 10-04-2014 02:54 PM

Quote:

Originally Posted by duniabebas (Post 2517011)
anyone have this style support 4.2.2?

Works fine with 4.2.2.

Azum 10-18-2014 02:18 PM

One thing I haven't been able to figure out is how to insert inline image attachments with this style.

dartho 10-20-2014 01:56 AM

Do you mean "inline" as in inserting an image, such as https://vborg.vbsupport.ru/images/ed...nsertimage.gif, in the middle of of a post ?


All times are GMT. The time now is 09:44 PM.

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.02147 seconds
  • Memory Usage 1,769KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_php_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