vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - Extend and Customise "Mobile" Style Options (https://vborg.vbsupport.ru/showthread.php?t=182692)

dartho 06-16-2008 10:00 PM

Extend and Customise "Mobile" Style Options
 
This is an add-on for (and thus requires) the Mobile, Cell, Phone, PDA, iPhone Style.

It adds options to your vBulletin Options for customizing:
  • Optionally adds links to default style (in footer or navbar)
  • Optionally add 'Posted Via Mobile' message to new posts/threads (message can be customised)
  • Optionally display "What's Going On" box in forum home
  • Optionally display Style Chooser in footer
  • Set 'Home' link URL (rather than editing templates)
  • Can hide mobile style from Style Chooser
  • More as suggested ....

Install the latest Mobile style (should have same version number as this addon, but may have a different alpha char on end of version number)

Install this add-on and set your options

Version History
0.0.1
Initial Release
0.0.2
Can't remember what change I made
0.0.3
Added ability to Hide mobile style from style chooser
Fixed bug in display 'Posted by..' message
0.0.10
Synchonised the version number to be the same as the Mobile style version
Added ability to customise link names
Added option to append USERAGENT string to new posts
YOU WILL NEED TO UPDATE TO VERSION 0.0.10 OF THE MOBILE STYLE
0.0.10a
Added section where you can input PHP code to disable some add-ons which you do not wish to run under the mobile style.
0.0.10b
Fixed possibly HTML injection vulnerability.

*This will not work with other styles - it requires Mobile, Cell, Phone, PDA, iPhone Style to be installed!

AliMadkour 06-17-2008 01:50 AM

Thanks ,
But I want Hide Mobile Style , I meant if the member login from PC he can't use mobile style and Contrarily

dartho 06-17-2008 02:26 AM

You can already do that.

Install your mobile style of choice and make sure that it is checked as user selectable.
Set your vbulletin options so that the user can not change styles.
Install and configure the Mobile Autodetect add-on which forces detected mobile users to the mobile style specified .

This however will not work if you have multiple styles which you allow your users to select - its all or nothing

AliMadkour 06-17-2008 02:47 AM

Quote:

Originally Posted by dartho (Post 1551287)
You can already do that.

Install your mobile style of choice and make sure that it is checked as user selectable.
Set your vbulletin options so that the user can not change styles.
Install and configure the Mobile Autodetect add-on which forces detected mobile users to the mobile style specified .

This however will not work if you have multiple styles which you allow your users to select - its all or nothing

Thanks I 'll try that ,
but if i have more that style !!

dartho 06-17-2008 02:49 AM

I'll look into a way to hide a style form the style chooser, but can't promise anything

tekguru 06-17-2008 04:23 PM

Installed!

Hornstar 06-17-2008 08:14 PM

Thanks, this is great now!

Amiga Harrison 06-17-2008 09:10 PM

Thank you for this. This adds most of the bits I wanted to change about the mobile style. :)

A couple of additional things I would like to see added are:

* Ability to change the title of the style from "*** Forum Mobile" to something else. For example I am not using the mobile skin for use on mobile devices, but instead as a lightweight skin for users accessing the forum on old Commodore Amiga computers.

* Ability to change the name of the default skin link "PC Link" that can be added to the mobile skin via this mod. I would like the ability to change this to something such as "Back to full forum" or something similar.

* The ability to add additional links in the footer of the skin. For example, as I'm using the auto redirect mod for the mobile skin I would like to add a link in the footer that links back to the other domain for the main forum style.

callumbush 06-17-2008 10:50 PM

Hi Dartho

Haven't installed this yet, will soon :)
Does it provide an option to remove the vBulletin branding from the style template? ..Would make updating the style a much more enjoyable experience ;)

dartho 06-17-2008 11:02 PM

No sorry, it doesn't - yet.

Fireproof 06-17-2008 11:17 PM

Awesome work as always, dartho! :)

Hornstar 06-18-2008 07:37 AM

I was just thinking, maybe if you included a spot to enter in around 10 extra links to the navbar, it would be great. thanks.

Jase2 06-18-2008 10:52 AM

Wow -- thanks! :)

Venturing 06-22-2008 08:07 AM

Very handy. Thanks!

dartho 06-24-2008 07:28 AM

Updated:
0.0.3
Added ability to Hide mobile style from style chooser
Fixed bug in display 'Posted via Mobile Device' message

BeerLuver 06-24-2008 06:41 PM

Thanks on this one as well for the updates :). Much appreciated dartho.

dommo_g 06-26-2008 08:00 PM

Is there any way to have an option to allow images in threads?

dartho 06-26-2008 09:08 PM

You can enable images by removing all the 'Replacement Variables' defined in this style...

I'll look into making it an option.

Roxie 07-08-2008 11:19 AM

The ability for images would be nice. :)

Hornstar 07-12-2008 12:51 AM

I am using a donation hack and it shows the donation bar status on the forum home: www.gamerzneeds.net/forums

However I dont want this showing on the mobile style. I am assuming it is auto adding it to the template, however it would be good if this style did not have these hooks, and if you wanted the modification you would need to do it either with an option or manually.

Are there any ways I can easily just remove this from showing on my mobile style tho?

dartho 07-12-2008 10:53 AM

There in lays the pitfalls of addins that perform automatic template edits. It may not be hooks doing them, it could be appending data to a template which can not be controlled by this style. What you will need to do is modify the plugin that is doing the template edit and wrap it in conditionals so it doesn;t perform the edits for the mobile style.

If it's an add-on here at vb.org. point me towards it and I'll try and let you know what you need to do...

Nevets2329 07-15-2008 02:00 PM

Not marking installed because does not work

dommo_g 07-15-2008 03:35 PM

I seem to be getting a lot of page timeouts when accessing the mobile style. :dunno:

Patrick Melton 07-17-2008 02:44 AM

Is there a way to use this with a mobile style I've already developed?

talkinweb 07-17-2008 04:20 AM

Thanks!

dartho 07-17-2008 06:33 AM

Quote:

Originally Posted by Patrick Melton (Post 1577379)
Is there a way to use this with a mobile style I've already developed?

I spotted your request over here: https://vborg.vbsupport.ru/showthrea...95#post1501495, then visited you site, and thought you were dead so didn't reply :o

You're looking just for the "Posted via Mobile" portion? I can wrap this up as a standalone plugin if you like. Actually, I think you could probably use this as is to add that functionality. Other options such as Home link, Style title, What's going on won't work, but the 'Posted via Mobile' type footers should work with any style.


The next release of this will allow a generic message such as
"Posted via Mobile" or simply adding the UserAgent string to the footer of the post.

MissKalunji 07-17-2008 01:27 PM

how can i add a second style to the options?

to the posted via mobile device / iphone

cause i have a second skin only for iphone/ipod.....

Thanks

dartho 07-18-2008 01:35 AM

Most of the options would not be compatible with other styles as my Mobile style is coded with this in mind. Which aspects did you wish to apply to your other mobile style?

Edit: Sorry - I jest re-read your post. You could do this by manually editing 2 plugins newreply_post_start and newthread_post_start

Change the code from
Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}

to

Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}
if ($styleid==XX) {
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n". "Posted via iPhone" ."\n";
}

Change the XX to be the style ID of your iPhone style and "Posted via iPhone" to what ever message you want, or $vbulletin->options['mo37_post_text'] if you want the same message applied as from other mobile devices

dartho 07-18-2008 03:36 AM

*** UPDATED with many suggestions. Be sure to update tehj mobile style also if installing a newer version of this. Both the style and this add-on have the same version numbers as of 0.0.10.

MissKalunji 07-18-2008 01:44 PM

Quote:

Originally Posted by dartho (Post 1578113)
Most of the options would not be compatible with other styles as my Mobile style is coded with this in mind. Which aspects did you wish to apply to your other mobile style?

Edit: Sorry - I jest re-read your post. You could do this by manually editing 2 plugins newreply_post_start and newthread_post_start

Change the code from
Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}

to

Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}
if ($styleid==XX) {
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n". "Posted via iPhone" ."\n";
}

Change the XX to be the style ID of your iPhone style and "Posted via iPhone" to what ever message you want, or $vbulletin->options['mo37_post_text'] if you want the same message applied as from other mobile devices

Thanks :) i did it.

but i wanted the UA too so here's what i did for those who'll be asking in the future

Quote:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
if ($vbulletin->options['mo37_post_text']=="UA") $vbulletin->options['mo37_post_text'] = $_SERVER['HTTP_USER_AGENT'];
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n". "____________________
Wirelessly Posted (" . $vbulletin->options['mo37_post_text']. ")
" . "\n";
}
if (($styleid==152) && ($vbulletin->options['mo37_post_text'] != '')){
if ($vbulletin->options['mo37_post_text']=="UA") $vbulletin->options['mo37_post_text'] = $_SERVER['HTTP_USER_AGENT'];
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n". "____________________
Wirelessly Posted (" . $vbulletin->options['mo37_post_text']. ")
" . "\n";
}
Thanks for this perfect mod!!

Tralala 07-22-2008 06:37 PM

Right now the UserCP -> Edit Options for "Number of Posts to Show Per Page" applies to all styles.

I would like to see some customization, so for example, when a user has chosen the desktop style, they can choose to load 50 posts per page. But when they are using the mobile style, users default to loading / seeing 20 posts per page. This makes sense as they are on the go with a slower connection.

Could this mod help with that?


EDIT: nevermind, found this...

Dartho, you rock!

Fireproof 07-26-2008 03:09 PM

Getting a weird error at the bottom navbar and there's no link to switch to default style, even though I have that enabled.

It shows:

Log Out Search Array['mo37_default_link']

can you help?

dartho 07-26-2008 10:23 PM

Fireproof, could you try editing the footer template and replace $vbulletin->options['mo37_default_link'] with {$vbulletin->options['mo37_default_link']}

Thanks!

Fireproof 07-27-2008 02:34 PM

Quote:

Originally Posted by dartho (Post 1584874)
Fireproof, could you try editing the footer template and replace $vbulletin->options['mo37_default_link'] with {$vbulletin->options['mo37_default_link']}

Thanks!

Okay, that fixed it - my link now shows correctly. However, clicking on it appears to just refresh the index page, it doesn't switch styles. Am i the only one with this problem?


Also - Feature Request - Do you think it would be easy (or useful) to add in the Mobile Style Options the ability to append signatures when people post via mobile device?

dartho 07-27-2008 09:39 PM

Are you using the autodetect add-on? If so, links to the default style will not work as the autodetect addon overrides any user choice

Fireproof 07-28-2008 01:18 AM

Quote:

Originally Posted by dartho (Post 1585507)
Are you using the autodetect add-on? If so, links to the default style will not work as the autodetect addon overrides any user choice

Oh, yes, that makes perfect sense. Duh.

Thank you. :)

dartho 07-28-2008 02:43 AM

Thanks, Fireproof - Mobile Style updated to version 0.0.10a to fix bug you found.

I'll look at the signature thing - signatures should be in there anyway even if not displayed with in the mobile style...

dartho 08-01-2008 04:38 AM

Updated - added a new option where you can enter in PHP code to disable certain addons with in the mobile style.

Included sample code to disable MCG CHatbox and Cyb Chatbox by default. This won;t be useful for ALL addons, but will hopefully nelp with some and remove the need for manually editing plugins. If you have an addon which you want disabled in the mobile style, post a link here and I'll see if I can help.

**I have however only tested with Cybernetec Paypal Donate - works with that OK.

cygy2k 08-01-2008 06:34 PM

Would it be something that could prevent vBAdvanced modules from showing up when integrated using vBA's integration settings?

dartho 08-01-2008 10:33 PM

Possibly. Integrating the forums with vBadvanced in the manner you have is not standard vbadvanced (that I know of) - if you point me in the direction of the instructions you followed to do it or PM me admincp access details as I suggested a couple weeks ago, I could look into this for you. It would likely only require some template edits.


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