Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Extend and Customise "Mobile" Style Options Details »»
Extend and Customise "Mobile" Style Options
Version: 0.0.10b, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.7.2 Rating:
Released: 06-16-2008 Last Update: 02-24-2009 Installs: 410
Supported Uses Plugins
Is in Beta Stage  

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 07-12-2008, 10:53 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #23  
Old 07-15-2008, 02:00 PM
Nevets2329 Nevets2329 is offline
 
Join Date: Jul 2007
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not marking installed because does not work
Reply With Quote
  #24  
Old 07-15-2008, 03:35 PM
dommo_g dommo_g is offline
 
Join Date: May 2007
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I seem to be getting a lot of page timeouts when accessing the mobile style. :dunno:
Reply With Quote
  #25  
Old 07-17-2008, 02:44 AM
Patrick Melton Patrick Melton is offline
 
Join Date: Jun 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to use this with a mobile style I've already developed?
Reply With Quote
  #26  
Old 07-17-2008, 04:20 AM
talkinweb talkinweb is offline
 
Join Date: Jan 2008
Location: KSA
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #27  
Old 07-17-2008, 06:33 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Patrick Melton View Post
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

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.
Reply With Quote
  #28  
Old 07-17-2008, 01:27 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #29  
Old 07-18-2008, 01:35 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #30  
Old 07-18-2008, 03:36 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*** 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.
Reply With Quote
  #31  
Old 07-18-2008, 01:44 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
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!!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05828 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete