Ground Control > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Ground Control

wersja drukowalna wersja Microsoft Word wersja HTML

Ground Control

Set custom background images across almost your entire IPS Community!

Default Background (used all areas not customized)
Forum Categories
Forum Forums
(carries over into the topics within!)
Calendars
Pages Database Index Pages
Pages Database Categories
(carries over to the content items within!)
Gallery Categories (carries over into albums and images within)
Commerce Product Groups (carries over to products within)
Downloads Categories (carries over to download items within)
Blogs (each individual blog can have their own)

Clubs Supported!
Club home page and members roster can have their own (shared) custom background.
Each node type added to a club (forum, gallery, files, calendar) can have their own backgrounds too!

 

1) How are these backgrounds set in the theme/HTML?
You have three options currently (available in Ground Control settings):

On Body Element: Will over-ride the background set on the body element in your theme or custom css. If a Ground Control background (default or otherwise) is not present it will fall back to the body background already specified by your theme/custom css (if any).

On HTML element: Will over-ride the background set on the HTML element in your theme or custom css. If a Ground Control background (default or otherwise) is not present it will fall back to the HTML background already specified by your theme/custom css (if any). If you have a body element background you will probably need to remove it otherwise it will display over top the html background.

On a Special Background Element: This is a separate, new, HTML element placed underneath HTML > Body but before the header and remainder of the IPS HTML template code. This element is set to span the entire page with absolute positioning, given a z-index of -10, and a CSS 3D transition call that does nothing itself but will tell your browser to use your video card when rendering this element. Provided as an advanced option for users with more advanced thematic needs and also as a bullet-proof solution that will usually work no matter what your theme is doing.

gc2.thumb.PNG.84b182b790d94a13e886cecf55e9323c.PNG

 

2) Do I have to change anything with my theme?
That depends on your theme. If your theme has a background picker available to members there might be some conflict depending upon how it does its thing. If the picker is setting a cookie that is then read GC should work fine, and the special background element option will 99.9% of the time do the job no matter what if there is somehow a conflict. If the picker is using Javascript to rewrite the element after page load is complete then the special background element is probably your only option unless you can disable the picker. 

 

3) I'd rather have this image used somewhere else...
Ask. Trivial to add in other CSS locations. Just understand that like the HTML, Body, and Special Background locations this would be a global setting - you won't be able to set forums to have the backgrounds on the Body element and the Gallery to have the background on the Header or something like that.

 

4) Where am I adding these backgrounds?
Forum categories/forums: ACP Forum categories/forums add/edit form.
Calendar: ACP Calendar add/edit form.
Pages Database: ACP database add/edit form.
Pages Database Categories: ACP database category add/edit form.
Gallery Categories: ACP Gallery category add/edit form.
Commerce Product Group: ACP Commerce product group add/edit form.
Downloads Categories: ACP Downloads category add/edit form.
Blogs: Front End - Manage Blog -> Manage Background.
Clubs Index/Members: Front End - Manage Club -> Manage Background.
Clubs Topic/Gallery/Blog/Download/Calendar nodes: Front End, after these nodes are created, Manage Club -> Edit this (Topic/Gallery?etc...).

gc3.thumb.PNG.683b874f44cefe528ba60e6d4ecd7351.PNG

 

5) What about profile pages and the streams pages and... 
Nope. Not right now. They will use whatever you have set as the GC default image (if any). 

 

6) So what conditions do they display on?
Application Index Pages and Misc Core Features (Profiles, Leaderboard, etc.): The GC default background will display if you have one set, falls back to whatever you have set in your theme/css settings otherwise.

Application Nodes: These are things like Forum Categories, Forum Forums, Gallery Categories, Calendars, Downloads Categories, Commerce Product Groups, etc. Whatever you set on each of these individual nodes - every Forum category - every Forum Forum - every Commerce Product Group, and so on, can have a GC background of it's own.

Content Items: Things like topics in a forum, images and albums (and album images) in a Gallery category, a product for purchase in a Commerce Product Group, etc. These will inherit the container background. That means if a Forum has a GC custom background, the topics within get that background too. An item for sale will have the page background from the Commerce Product Group it is in. And so on... If the container has no GC background applied, the content item will use the GC default background, and if that isn't there it falls back to whatever you have set in your theme/css.

 

7) So what happens when I have a category and then categories inside that category?
If the parent category has a GC background, and the categories inside it do not have a GC background, those children categories will fall back to the GC default (if set) or the theme/css background (if set). I might look into parent/child fallback for application nodes later on but the solution to this is stunningly simple: just add backgrounds to those children categories - that is what this mod is for after all!

 

8) Anything quirky?
Two exceptions, kind of. Pages and Clubs.

Pages: Right now, a plain custom page of some sort is not supported. This is a page that just has whatever on it, no database attached to it. If you have a page that has a database attached to it then that database index page can have its own background. If that database has categories, those categories get their own backgrounds (and will not inherit the database background - they get their own or fallback) and items within a pages database category will inherit the category background. Non-database page support is something I'll have to look into later on. Keep in mind that all Pages pages can have custom css applied to them so this isn't really a problem for these custom non-database pages - just add what you need there.

Clubs: Although it seems a little different, it really isn't all that much. Individual clubs themselves can have custom GC backgrounds set for the club index page and the member roster (same background). Then, since the club features such as topics, images, files, calendar, etc. are all just specially segregated versions of those IPS applications, the same Ground Control options apply to them as well. For each of those you can specify a custom GC background. Have 3 topics tabs and two files tabs? No problem! Every one can have their own GC background. Clubs is brand new and a little rough around the edges (also uses PHP Traits which isn't exactly hookable in IPS...) so I'm supporting Clubs with this but also treading really carefully. The only real quirk is I'm only allowing the add/edit of GC backgrounds AFTER a club node (topic, gallery, etc.) is created, not during.


NOTES:

1) For the initial release of Ground Control, backgrounds are set to display in cover mode, fixed, centered. 

2) A good practice for all background images is trying to keep the file size down. 500kb or less is a good idea. Giant 1-3 MB files will only further slow down your user's browsing speed. Even when user browsers cache these images they are still large and need time to draw in.

3) Adding GC background images to the Club or Club nodes (topics, images, etc.) is available after the club and/or club node is created. Once created, just edit/manage the club/club node and the GC background image option will display.

4) For this initial release of GC the fall back for Club nodes if you do not set a background on them is your the GC default (if set), then theme/css default (if set), not the club default. Solve this by setting custom backgrounds on those nodes!

 

NOTES FOR ADVANCED USERS:

1) Images are stored with each individual node, not in a separate db, and so are available with the requisite $node->gcbgimage nomenclature (inspect database table structure for exact variable to call)

2) Every node background image has its own File Extension.


FUTURE:
Possible efficiency improvements. 
Manage the Ground Control background-image css.
Possibly allow you to specify application top-level backgrounds. So the forum index page would have a background, the gallery index page would have its own, and so on.

This is the initial release, it's just getting started, expect Ground Control to get more options as we go along. 

 

Compatible: 4.2 - Not sure if this will work on 4.19 or lower given the Clubs stuff. Untested but I'll take a look in a day or two.

License: One buy, one live site (dev/test sites are fine). 
support available for the time being in the IPS Marketplace topic. You are allowed to use this, after purchasing a license and downloading this from the IPS Marketplace, on one live site and any test/dev sites you have. Additional live sites require additional license purchases. Renewals (per purchase) entitle you to updated versions and ongoing support. All rights reserved.

czw, 20 lipiec 2017