vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Lightweight Style Options for "Lightweight Style" (https://vborg.vbsupport.ru/showthread.php?t=249339)

dartho 08-25-2010 10:00 PM

Lightweight Style Options for "Lightweight Style"
 
1 Attachment(s)
Firstly - this is only of use if you have installed the Lightweight Style

Secondly - make sure you read the notes if you use the Mobile Style and the Mobile Style Options addon.

OK, now that the formalities are over, this is an add-on to the Lightweight Style It allows you to customise a few common parts of the style without needing to edit templates.

It also adds in options to disable some products when the Lightweight style is being used and optionally adds "Posted by Mobile Device" type text into posts created using the mobile style.

* Optionally adds links to default style (in footer or header)
* 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 optionally hide mobile style from Style Chooser

Version Control:
1.0.0 - 26 AUG 2010 - Initial Release

Notes:
If you have installed "Mobile Style Options" (vb4) and make use of the 'Posted via Mobile Device' option, uninstalling Mobile Style Options will remove all records of posts made using the Mobile Style. The posts will of course remain, just the message will be gone. If this is not an issue for you - uninstall it BEFORE installing this addon. If you wish to keep those records, rather than uninstall it, disable it OR edit the product via Product Manager and remove all the uninstall code, save and then uninstall (this last option is the cleanest)

Running them both is OK, but you will need to disable the "Add Posted By Mobile Message to Post" plugin on the Mobile Style Options product. Uninstalling one of them will affect the other and cause errors as they share database columns. If you uninstall one without making the uninstall code changes, you shjould uninstall both and then re-install the one you are staying with.

dartho 08-26-2010 02:19 AM

F.a.q.

sulasno 08-26-2010 03:37 AM

tagged and thanks

lovelypk 08-26-2010 04:36 AM

Does it auto detect Mobile device and change the style to lightweight?

dartho 08-26-2010 04:51 AM

No, it does not. There is an addon for 3.8 which also runs under 4.0 that can do that, however I do hope to update that one of these days and re-release

fly 08-26-2010 11:00 AM

dartho, the mobile master!

Alecsmith 08-26-2010 12:22 PM

tagged install great work :)

omanmoon.net 08-26-2010 12:36 PM

Thanks
Good work :)

fly 08-26-2010 02:24 PM

Uhhh, so after installing this, I uninstalled the Mobile Style Options. Now it appears that I can't post on the forum without a database error! Sweet

fly 08-26-2010 03:51 PM

I readded Mobile Style options and the database error went away. My users can now post. However, I'd really like to be able to remove Mobile Style options.

I don't know if the problem is related to having both installed or its just Mobile Style options. Should I post in that thread?

edit: BTW, the error was

MySQL Error : Unknown column 'ua' in 'field list'

russag 08-26-2010 05:34 PM

Quote:

Originally Posted by flypaper (Post 2089891)
I readded Mobile Style options and the database error went away. My users can now post. However, I'd really like to be able to remove Mobile Style options.

I don't know if the problem is related to having both installed or its just Mobile Style options. Should I post in that thread?

edit: BTW, the error was

MySQL Error : Unknown column 'ua' in 'field list'

Same here I removed Mobile Style options and received the same error.

Great style though man and good options :)

cherylferraro 08-26-2010 07:14 PM

Error when importing the xml file.

Code:

Database error in vBulletin 4.0.6:

Invalid SQL:

                INSERT INTO vb_product
                        (productid, title, description, version, active, url, versioncheckurl)
                VALUES
                        ('lsoptions',
                        'Lightweight Style Options',
                        'A collection of options to customise the Lightweight style',
                        '1.0.0',
                        1,
                        'http://vbdev.org/forum.php',
                        'http://vbdev.org/forum.php');

MySQL Error  : Duplicate entry 'lsoptions' for key 'PRIMARY'
Error Number  : 1062
Request Date  : Thursday, August 26th 2010 @ 01:08:28 PM
Error Date    : Thursday, August 26th 2010 @ 01:11:40 PM
Script        : http://www.mysite.com/forum/admincp/plugin.php?do=productimport
Referrer      : http://www.mysite.com/forum/admincp/plugin.php?do=productadd
Classname    : vB_Database
MySQL Version : 5.1.48-log

addendum:
Please note, the error was my fault. I had 2 vb admin panels open and had already installed it on this one...

dartho 08-26-2010 09:13 PM

Quote:

Originally Posted by flypaper (Post 2089865)
Uhhh, so after installing this, I uninstalled the Mobile Style Options. Now it appears that I can't post on the forum without a database error! Sweet

Quote:

Originally Posted by russag (Post 2089936)
Same here I removed Mobile Style options and received the same error.

Great style though man and good options :)

Sounds like neither of you read my notes in the first post in regards to mobile style options and this one. [edit: or perhaps you did but my lack of detail didn't help - sorry] Both share database entries, by uninstalling Mobile, you deleted the database columns which this one needs. To clean things up, you'll need to uninstall both, then reinstall this one.

dartho 08-26-2010 09:15 PM

Quote:

Originally Posted by cherylferraro (Post 2089996)
Error when importing the xml file.

Code:

Database error in vBulletin 4.0.6:

Invalid SQL:

                INSERT INTO vb_product
                        (productid, title, description, version, active, url, versioncheckurl)
                VALUES
                        ('lsoptions',
                        'Lightweight Style Options',
                        'A collection of options to customise the Lightweight style',
                        '1.0.0',
                        1,
                        'http://vbdev.org/forum.php',
                        'http://vbdev.org/forum.php');

MySQL Error  : Duplicate entry 'lsoptions' for key 'PRIMARY'
Error Number  : 1062
Request Date  : Thursday, August 26th 2010 @ 01:08:28 PM
Error Date    : Thursday, August 26th 2010 @ 01:11:40 PM
Script        : http://www.mysite.com/forum/admincp/plugin.php?do=productimport
Referrer      : http://www.mysite.com/forum/admincp/plugin.php?do=productadd
Classname    : vB_Database
MySQL Version : 5.1.48-log


I would guess hat means you either have another product with the same productid installed (I though vBulletin would track this?) or you have tried to install it twice without the ovewrite option

fly 08-26-2010 09:53 PM

Quote:

Originally Posted by dartho (Post 2090053)
Sounds like neither of you read my notes in the first post in regards to mobile style options and this one. Both share database entries, by uninstalling Mobile, you deleted the database columns which this one needs. To clean things up, you'll need to uninstall both, then reinstall this one.

I read it, but didn't think I qualified. Hopefully we're the only idiots, but it does read more complex that it may need to...

Thanks for the fix tho.

edit: I'm no genius coder, but isn't it generally a good idea for each product/hack to have unique DB entries?

dartho 08-26-2010 10:04 PM

I re-read it and saw it wasn't real clear either - I've edited the notes to be a little more clear.

You're right - I thought about creating unique column names, but then thought many would want to retain the data so kept them the same. I'm no genius coder either - if I was, I'd proibably have the install file check and throw up warnings etc during installation

flyerndiver 08-26-2010 10:19 PM

Damn. I misread it too and now I can't uninstall them both because the uninstaller stops at the two DROP calls. Could you tell me what the attributes need to be so that I can recreate these two columns?

Thanks; great mod! I hope it will one day support blogs and CMS.

edit: nevermind, I edited the uninstall code and now only have the lightweight style options running. Thanks again!

Mopar Rob 08-28-2010 12:39 PM

Ok here is a real NEWB question.. Not sure where to find this basic install info on the forums. I imported/merged this file into the lightweight mobile style. (Assuming that was done correctly) Now I cant find where to access these options??? Again sorry for the newb question but .. IM LOST.

dartho 08-28-2010 01:33 PM

In AdminCP, Go into teh Settings, Options menu and then Lightweight Styl;e Options (Should be near end) and you can change settings there.

Mopar Rob 08-28-2010 02:42 PM

Quote:

Originally Posted by dartho (Post 2090714)
In AdminCP, Go into teh Settings, Options menu and then Lightweight Styl;e Options (Should be near end) and you can change settings there.

I do not see it?? Ok here were my steps:

- I went to Styles /upload and merged the product-lsoptions.xml file to the Mobile style

Now when I goto Settings/Options I do not see the Lightweight Style Options listed in the menu.

Do I need to update tables or run any maint??? Sorry again for the Newb Questions..

dartho 08-28-2010 09:53 PM

Install this via Product Manager, not Style Manager!

burntire 08-29-2010 07:30 PM

Quote:

Originally Posted by flyerndiver (Post 2090084)
Damn. I misread it too and now I can't uninstall them both because the uninstaller stops at the two DROP calls. Could you tell me what the attributes need to be so that I can recreate these two columns?

Thanks; great mod! I hope it will one day support blogs and CMS.

edit: nevermind, I edited the uninstall code and now only have the lightweight style options running. Thanks again!


Here is how I fixed the issue with double installation.

With both products installed you only have to work with the old product moboptions40.

Download the old product
https://vborg.vbsupport.ru/showthread.php?t=229044
product-moboptions40-1.0.4

Open the product in an HTML editor and find the uninstall code
Code:

<uninstallcode><![CDATA[$db->query_write("ALTER TABLE `".TABLE_PREFIX."post` DROP `mobile`");
$db->query_write("ALTER TABLE `".TABLE_PREFIX."thread` DROP `mobile`");
$db->query_write("ALTER TABLE `".TABLE_PREFIX."post` DROP `ua`");
$db->query_write("ALTER TABLE `".TABLE_PREFIX."thread` DROP `ua`");]]></uninstallcode>

Replace the uninstall code with
Code:

<uninstallcode></uninstallcode>

Now import the moboptions40 product again allowing over wright. This will install the product without the conflicting un-install code.

Now un-install the old product moboptions40.

The new Lightweight product should now work correctly.

fly 08-30-2010 01:49 PM

Okay, when I enable the 'posted by mobile device', the pipe character | doesn't line up with the rest of the post box. Is that because I'm running 4.0.4, something I've done, or is it like that for everyone?

dartho 08-30-2010 09:37 PM

Not sure. I think I wrote it pre 4.0.4, although I could be wrong. It's lining up on my test site. Do you have a link I could look at?

fly 08-30-2010 10:34 PM

Quote:

Originally Posted by dartho (Post 2091763)
Not sure. I think I wrote it pre 4.0.4, although I could be wrong. It's lining up on my test site. Do you have a link I could look at?

If its lining up for you, its likely edits I've done. Just in case...

http://uselessforums.com/showthread....370#post729370

Mopar Rob 08-30-2010 11:40 PM

Quote:

Originally Posted by dartho (Post 2090854)
Install this via Product Manager, not Style Manager!

Thanks Man.. Told ya it was a newb Question.. WORKS GREAT!!!!!!!!!!!!!!!!!!
Will be sending you a donation your way 4sure.

My only 1 request would be to have an option to show the name of the forum the post is in. I have certain posts that are in Private sections and when i use the NEW POSTS feature it doesnt alert me what section of the forum its in. Other than that.. KILLER MOD!!!

LuisManson 09-02-2010 02:05 PM

is it me or this wont redirect users to the theme if they are coming from a mobile?

dartho 09-03-2010 12:34 AM

No, this addon does not do the mobile detect thing. This one (https://vborg.vbsupport.ru/showthread.php?t=226946) does (and yes, it is compatible with vb4)

LuisManson 09-03-2010 10:29 PM

Quote:

Originally Posted by dartho (Post 2093056)
No, this addon does not do the mobile detect thing. This one (https://vborg.vbsupport.ru/showthread.php?t=226946) does (and yes, it is compatible with vb4)

thankyou very much

CvP 09-04-2010 11:44 PM

hey dartho.

i have both mobile and lightweight skins and options addons installed.
it's now showing double "posted via mobile device" below posts :S

dartho 09-05-2010 02:30 AM

Did you read the 1st post?

Quote:

Secondly - make sure you read the notes if you use the Mobile Style and the Mobile Style Options addon.
and the Notes section contains:

Quote:

Running them both is OK, but you will need to disable the "Add Posted By Mobile Message to Post" plugin on the Mobile Style Options product.

CvP 09-05-2010 12:24 PM

thanks

neoacro 09-09-2010 08:01 AM

how do I disable my sidebar blocks for my mobile version? It's showing uglily at the bottom of right corner of my mobile browser

dartho 09-10-2010 10:42 PM

the vBulletin side bar should not show, or are you using a 3rd party add-on?

struff 09-12-2010 05:31 PM

"Posted via Mobile Device" is not showing up on posts we make. Is that not working yet?

dartho 09-12-2010 09:38 PM

That should be working - can you kink me to a post?

struff 09-12-2010 11:48 PM

Quote:

Originally Posted by dartho (Post 2097306)
That should be working - can you kink me to a post?

Check your PM.

Thanks.

Yurified 09-18-2010 12:57 PM

Quote:

Originally Posted by struff (Post 2097223)
"Posted via Mobile Device" is not showing up on posts we make. Is that not working yet?

I have same problem :/ But overall its awesome :up: Thank you so much for this :D

Rebecca217 09-19-2010 02:50 PM

Thanks very much! :)

JayCat 09-21-2010 11:52 PM

Quote:

Originally Posted by struff (Post 2097223)
"Posted via Mobile Device" is not showing up on posts we make. Is that not working yet?

Doesn't work for me either, but I'm using DBTech's tagging mod as well so I think that's whats interfering with it.


All times are GMT. The time now is 02:05 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.01481 seconds
  • Memory Usage 1,839KB
  • 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
  • (15)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