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)
-   -   Board Optimization - Digital Point Better CSS (https://vborg.vbsupport.ru/showthread.php?t=263393)

digitalpoint 05-09-2011 10:00 PM

Digital Point Better CSS
 
1 Attachment(s)
About
This is something we use on digitalpoint.com to make the CSS better and more efficient.

Installation
  • Upload the contents of the upload folder to your installation
  • Install the product-digitalpoint_css.xml product under AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product
You can see a live version in action here (on any page really): http://forums.digitalpoint.com/

Details
Rounded Corners
vBulletin 4 only supports rounded corners for Firefox, Chrome and Safari. This plug-in makes rounded corners also work in Opera and Internet Explorer.

Gradients
It appends some CSS markup to your primary CSS file that makes use of CSS3 gradients (gradients defined right in the CSS file itself). vBulletin uses 5-7 gradient images per page view normally, and this eliminates the need for the browser to download those images. CSS3 gradients are supported in Safari, Firefox, Opera and Chrome. For browsers that don't support CSS3 gradients, they will simply fall back to the normal image-based CSS gradients that vBulletin uses by default.

Notes
This plug-in is useful for sites that use vBulletin 4 default styles, or at least styles that utilize the same classes and methods for doing things within the CSS files.

This plug-in does NOT add any extra CSS files, nor does it edit your existing ones. Instead it appends some new info to the end of your main CSS file that comes from it's own template. It also adds an attribution link.

You can find more info here: http://products.digitalpoint.com/vbulletin-css.php

Changes
1.0.2
  • CSS3 Gradient support for IE10 (early, I know... but it's there)
  • Handles gradients in vB Suite Blog and CMS
  • Works properly for CSS stored as files

Uninstallation: Automatic uninstallation is a bit of a catch 22... you need to compile templates to uninstall it, but vBulletin has no function built in to compile a group of templates. So uninstalling it removes the code needed to uninstall before the uninstall code is executed. So in order to uninstall this, disable just the one plug-in that is part of this product at the template_compile location, and then run Compile CSS Templates option under AdminCP -> Maintenance -> Update Counters. Once you do that, you can uninstall the whole product without any problems.

Taurus1 05-10-2011 05:31 AM

Really want to check this out. However I get this when installing:

Fatal error: Maximum execution time of 60 seconds exceeded in /home/windows/public_html/includes/vb_template.php on line 51

Edit:

Tried it again, overwriting, but got this now:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 161575271 bytes) in /home/windows/public_html/includes/vb_template.php on line 51

Kolbi 05-10-2011 05:57 AM

Will definitly have a look on it ;)

digitalpoint 05-10-2011 06:01 AM

Quote:

Originally Posted by Taurus1 (Post 2193906)
Really want to check this out. However I get this when installing:

Fatal error: Maximum execution time of 60 seconds exceeded in /home/windows/public_html/includes/vb_template.php on line 51

Edit:

Tried it again, overwriting, but got this now:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 161575271 bytes) in /home/windows/public_html/includes/vb_template.php on line 51

How many styles do you have installed? Curing installation, it does go through your *.css templates and recompiles them, but it should be fairly quick unless you have just a ton of styles I would think.

giorgino 05-10-2011 06:03 AM

I installed this, but non rounded corners in IE7
Thank you

digitalpoint 05-10-2011 06:12 AM

Only IE9 supports border-radius CSS, sorry.

Kolbi 05-10-2011 06:29 AM

Shawn, a little question on your product site you tell us something about traffic which is produced by the original css.

Do you know with possitive effect your modification can have in regarding loading times?

30-40kb can be saved on each page? Are you sure that it is so much?

digitalpoint 05-10-2011 07:00 AM

It certainly will make load times slightly faster on the front-end since there's less files to load, but it's not going to be a huge amount. If you are having speed issues, you should be looking more at backend stuff I would suspect.

It's not 30-40kb saved per page, but it's the equivalent of a 30-40kb document since a document can be compressed, and HTTP headers can't, so there is about 500% more network traffic for HTTP headers vs. the document itself.

CK 05-10-2011 07:03 AM

Hey DP,

This is great, I'm using HTC border radius to get the rounded corners. In your mind which would be better to use, your method of the one I'm using at the moment?

digitalpoint 05-10-2011 07:09 AM

HTC border raidus will work for some older versions of IE... personally I opt for not supporting old browsers and adding overhead of the HTC file itself. The newest version of IE supports border-radius, so if a user wants to use an outdated browser, I let them (they just won't get any of the new stuff that newer versions support)... {shrug}

But entirely up to you... but I don't personally cater to outdated browsers. :)

CK 05-10-2011 07:11 AM

I'll give this a go and see what happens. Thanks!

Taurus1 05-10-2011 08:09 AM

Quote:

Originally Posted by digitalpoint (Post 2193914)
How many styles do you have installed? Curing installation, it does go through your *.css templates and recompiles them, but it should be fairly quick unless you have just a ton of styles I would think.

Yes, I have many styles installed. Is there something else I can do here?

digitalpoint 05-10-2011 08:35 AM

How many styles do you have installed? I suppose you could up your PHP execution time and memory limit temporarily since it only needs to go through them all once.

CK 05-10-2011 10:13 AM

Hey DP,

Sorry to rain on your parade but I just noticed this adds a link to the footer, can I have permission to remove that please?

billstelling 05-10-2011 11:55 AM

did not work, and what the hell is with the ++++ing footer links. I get rid of any mod that has them. if not there would be 20 links in my footer.. you all need to quit with the frickin links. We will tell everyone if your stuff is good. this mod did zip.. nada.. home page still squared in explorer.. had high hopes for this one, but even if it worked, I would still be uninstalling it..

Eric 05-10-2011 12:48 PM

Quote:

Originally Posted by billstelling (Post 2194006)
did not work, and what the hell is with the ++++ing footer links. I get rid of any mod that has them. if not there would be 20 links in my footer.. you all need to quit with the frickin links. We will tell everyone if your stuff is good. this mod did zip.. nada.. home page still squared in explorer.. had high hopes for this one, but even if it worked, I would still be uninstalling it..

Which IE version? He's already stated it will only do rounded corners in IE9. From what I can tell, this mod is not *just* about the rounded corners either.

These mods on the 'org are released for free, some authors choose to add a link, some don't. If you don't like it, don't use it, simple as that - no point getting "irate".

djbaxter 05-10-2011 02:50 PM

I can see the effect at DigitalPoint with IE9.

But on my forum, using styles with limited departure from the default, no rounded corners. I don't even get them in the vBulletin default style.

Any known conflicts?

Taurus1 05-10-2011 02:51 PM

Quote:

Originally Posted by digitalpoint (Post 2193967)
How many styles do you have installed? I suppose you could up your PHP execution time and memory limit temporarily since it only needs to go through them all once.

Apologies for my stupidity, but how would I do that?

djbaxter 05-10-2011 02:57 PM

Quote:

Originally Posted by billstelling (Post 2194006)
did not work, and what the hell is with the ++++ing footer links. I get rid of any mod that has them. if not there would be 20 links in my footer.. you all need to quit with the frickin links. We will tell everyone if your stuff is good. this mod did zip.. nada.. home page still squared in explorer.. had high hopes for this one, but even if it worked, I would still be uninstalling it..

Uh, thanks for sharing. Still worrying about PageRank bleed, are you?

CK 05-10-2011 03:03 PM

Quote:

Originally Posted by djbaxter (Post 2194058)
Uh, thanks for sharing. Still worrying about PageRank bleed, are you?

His tone is completely wrong but don't be so quick to jump to conclusions, maybe like me he has paid to remove the copyright. The last thing you'd want to do is add something to the footer again. :)

djbaxter 05-10-2011 03:17 PM

Quote:

Originally Posted by ChemicalKicks (Post 2194063)
His tone is completely wrong but don't be so quick to jump to conclusions, maybe like me he has paid to remove the copyright. The last thing you'd want to do is add something to the footer again. :)

I find these little self-righteous explosions ("How DARE you include a footer link!") to be very tedious. The solution is easy and obvious:

Don't want the footer?

(1) Contact the author and see if you can make an arrangement to remove it, perhaps for a fee as you do with an unbranded vBulletin license.

(2) Uninstall the add-on.

What NOT to do?

(3) Post some self-righteous rant in the coder's thread making an utter fool of yourself by telling everyone how outraged you are.

djbaxter 05-10-2011 03:58 PM

1 Attachment(s)
Quote:

Originally Posted by djbaxter (Post 2194049)
I can see the effect at DigitalPoint with IE9.

But on my forum, using styles with limited departure from the default, no rounded corners. I don't even get them in the vBulletin default style.

Any known conflicts?

Solution:

Admin CP >> Settings >> Options >> Cookies and HTTP Header Options

Set Disable IE8 Compatibility Mode = No

Then rounded corners work. Partially. On the home page but not on all pages.

See attachments.

djbaxter 05-10-2011 04:16 PM

Error on uninstall:

Quote:

Compiling CSS templates...

Warning: mysql_query(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 414

Warning: mysql_error(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 1025

Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 1043

Warning: mysql_query(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 414

Warning: mysql_error(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 1025

Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in [path]/includes/class_core.php on line 1043
Quote:

Database error in vBulletin 4.1.3:

Invalid SQL:

UPDATE vbadminutil SET
text = UNIX_TIMESTAMP()
WHERE title = 'datastorelock' AND text < UNIX_TIMESTAMP() - 15;

djbaxter 05-10-2011 04:45 PM

Quote:

Originally Posted by djbaxter (Post 2194085)
Solution:

Admin CP >> Settings >> Options >> Cookies and HTTP Header Options

Then rounded corners work. Partially. On the home page but not on all pages.

See attachments.

Actually, on checking further I see the same thing on the DigitalPoint forum: Only partially rounding corners.

CK 05-10-2011 05:22 PM

Quote:

Originally Posted by djbaxter (Post 2194066)
I find these little self-righteous explosions ("How DARE you include a footer link!") to be very tedious. The solution is easy and obvious:

Don't want the footer?

(1) Contact the author and see if you can make an arrangement to remove it, perhaps for a fee as you do with an unbranded vBulletin license.

(2) Uninstall the add-on.

What NOT to do?

(3) Post some self-righteous rant in the coder's thread making an utter fool of yourself by telling everyone how outraged you are.

I fully agree with you, you'll notice just above his post what I asked ;)

billstelling 05-10-2011 06:13 PM

if your going to add a footer link in a mod then it should be included in the product details. It gets old in a hurry when they get snuck in like that. And they serve no purpose to the forum members at all. Just a way to try and make money by forcing us to pay to get rid of them. If its good i will donate all on my own and don't need some lame ass link in the footer to get me to do it.
oh and it was IE9 to the question above.

digitalpoint 05-10-2011 06:23 PM

Regarding the rounding corners... it doesn't round every corner, only corners that vBulletin rounds normally in Firefox, Safari and Chrome.

For the install issues... had to do some obnoxiously roundabout things to get it to be able to (properly) compile templates on installation/uninstallation. But I think I'm going to change it so there is a separate process to do it that the install gets redirected to. It should solve the installation screwiness for some people.

For the attribution link... we don't have a paid/attribution free version (too much work to set up something like that), but people are of course free to not use it of course. The add-on description was changed to mention it.

billstelling 05-10-2011 06:45 PM

I do hope you get this one working as it will be a good add on. What is the deal with IE that it doesn't support rounded corners or shadowing?

djbaxter 05-10-2011 07:58 PM

Quote:

Originally Posted by billstelling (Post 2194155)
I do hope you get this one working as it will be a good add on. What is the deal with IE that it doesn't support rounded corners or shadowing?

IE9 does support that. But current versions of vBulletin do workarounds with the CSS for IE because earlier versions did not. vBulletin has not yet caught up with IE9.

digitalpoint 05-10-2011 09:05 PM

For those having issues installing or uninstalling... I simplified it and instead of trying to get "tricky" and making the whole process automatic (which was causing problems for some people), I instead made a function to compile CSS functions that will show up under the "Update Counters" area of the AdminCP. When you install, the system will automatically redirect you there and do it automatically.

Uninstallation is a bit obnoxious though since when you uninstall, you also lose the Compile CSS Templates option, so you can't really automate it. See update in original post for a note on how to (properly) uninstall manually.

Doing it this way should eliminate the SQL errors some people were getting as well as PHP memory limits and execution time (since it will process 25 at a time and then start a new batch of 25... resetting PHP execution time and memory in the process).

djbaxter 05-11-2011 12:17 AM

^^^ Thanks.

I still got the error messages about /includes/class_core.php when uninstalling the old version (after disabling that plugin as instructed) but it didn't seem to affect anything and the reinstall worked as advertised.

digitalpoint 05-11-2011 12:30 AM

Yeah, the instructions wouldn't really apply to the old version since well... you can't go in and undo the uninstallation code that was in place with that first version. So just applies going forward with the new version.

Taurus1 05-11-2011 01:04 AM

Can I just update (With overwrite) to the new version?

digitalpoint 05-11-2011 01:16 AM

Yep... that should be fine.

BTW - if someone has it running on their site, gimme the URL and I'll skim through your site and see if there are any gradient definitions I missed (possible since there are a ton and we don't use all functions on digitalpoint.com... so things like the sidebar I wouldn't have tested against).

Taurus1 05-11-2011 01:29 AM

OK, I installed it now without any problems on my new site. I have 8 custom skins installed here.

http://windows8theme.org/forum/

I will PM you a test account if you want to check it out. I will also install this on my main site, where I have about 25 custom skins installed. And report back on how that installation went.

Thanks again for this!

Special Pages 05-11-2011 02:27 AM

Quote:

Originally Posted by billstelling (Post 2194006)
did not work, and what the hell is with the ++++ing footer links. I get rid of any mod that has them. if not there would be 20 links in my footer.. you all need to quit with the frickin links. We will tell everyone if your stuff is good. this mod did zip.. nada.. home page still squared in explorer.. had high hopes for this one, but even if it worked, I would still be uninstalling it..

I totally agree with you. LOL I hate it when it says
Code:

{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}
{Mod Name} by {Mod Author}


zelnik 05-11-2011 06:11 AM

Quote:

Originally Posted by digitalpoint (Post 2194264)
Yeah, the instructions wouldn't really apply to the old version since well... you can't go in and undo the uninstallation code that was in place with that first version. So just applies going forward with the new version.

Hi DP,

Just to triple check! :)

I have the first version you released installed.. If I upgrade to the latest build and followed the instructions I would have no issues uninstalling it if I were ever decide I needed to? Say if IB get their finger out and implement it themselves for example.

No SQL errors etc?

Boofo 05-11-2011 06:27 AM

Quote:

Originally Posted by ChemicalKicks (Post 2194063)
His tone is completely wrong but don't be so quick to jump to conclusions, maybe like me he has paid to remove the copyright. The last thing you'd want to do is add something to the footer again. :)

I think a footer link is a very small price to pay for a free mod.

digitalpoint 05-11-2011 07:12 AM

zelnik - correct.

CK 05-11-2011 10:06 AM

I've installed this then disabled it, I gather the disable function doesn't really work, running the first version. I notice now though that the footer link is gone :D


All times are GMT. The time now is 03:22 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.01565 seconds
  • Memory Usage 1,843KB
  • 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
  • (16)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