Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 4 months ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Submenu Icons ('iconsweets')

Tagged: child themes, iconsweets, submenus

  • This topic has 9 replies, 3 voices, and was last updated 11 years, 10 months ago by Phil_P.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • July 2, 2013 at 1:28 pm #3058
    Phil_P
    Participant

    Greetings all.

    Liking this community driven initiative very much – CBOX has a great future without a doubt. Struggling however with a few things…. my subsites will not display the mini logos on the buddypress sub-menu buttons, as seen on the link/buttons – on the left sidebar on this very page. I get random Times Roman characters instead. Solutions have been mentioned in the past but I’ve tried them all to no avail. I’ve tracked the issue down to my subsite not accessing the iconsweet fonts that the wee logos are based on. I’ve copied the fonts folders into my child theme folder hoping that would do the trick, but no. It seems the dynamic code generated by the infinity engine (this is where I get lost) does not address the fonts correctly.

    Any help appreciated.. a deadline is approaching

    Phil

    July 3, 2013 at 2:46 pm #3064
    Phil_P
    Participant

    Workaround – I’ve found you can make the unwanted characters invisible (list-item-tabs etc) … opacity: 0.0;  … gets me out of trouble, but still interested in a better solution . Phil

    July 3, 2013 at 6:22 pm #3068
    Scott Voth
    Keymaster

    Hi Phil –

    There are a couple threads about those troublesome icons.  The best, I think is https://commonsinabox.org/groups/help-support/forum/topic/adding-icons-to-group-navigation/

    Another can be found here: https://commonsinabox.org/groups/help-support/forum/topic/help-menu-icons-in-profile-sidebar/

    Let us know if this helps or not.

    July 4, 2013 at 7:01 am #3076
    Phil_P
    Participant

    Thanks Scott – I don’t believe mine’s a plug-in issue

    … but the second method looks interesting. I’ll give it a try soon, although I’m trying to avoid doing too much in the Customise Options panels as I’ve found you can’t simply export all your options settings (unless I’ve missed something).

    July 5, 2013 at 6:37 am #3097
    Christian Wach
    Participant

    @phil This appears a bug in the way that Infinity generates the urls in dynamic.css for subsites. Essentially, it assumes that the theme root directory contains the ‘part’ element of the URL – which on subsites (when subsites are defined as subfolders not subdomains) is not true. I’ll explain here for future reference, so forgive the techy bits and skip to the end for a solution.

    For example, on my test subfolder subsite, my theme root path is:
    /path/to/httpdocs/wp-content/themes
    but the ‘path’ that parse_url() returns is:
    /cbox/wp-content/themes

    As you can see, the ‘/cbox’ bit is in the latter and not the former, so when dynamic.css is generated for the subsite, Infinity includes that many characters at the front of the font URL in ‘dynamic.css’:
    src: url('pdocs/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot');

    There is a simple fix, however. The ironically-named function fix_url_path() will ignore URL references that are absolute URLs. So all you need to do is copy ‘fonts.css’ from the ‘cbox-theme/assets/fonts’ folder into your child theme’s ‘assets/fonts’ folder, then edit it so that it has the actual URL to the font in it. For example:

    @font-face {
    font-family: 'iconSweetsRegular';
    src: url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot');
    src: url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot?#iefix') format('embedded-opentype'),
    url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.woff') format('woff'),
    url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.ttf') format('truetype'),
    url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.svg#iconSweetsRegular') format('svg');
    font-weight: normal;
    font-style: normal;
    }

    Voila!

    July 5, 2013 at 8:08 am #3098
    Christian Wach
    Participant

    A follow up to issue is that (on my default install) there are a whole bunch of other URL references which are broken in my child theme’s dynamic.css. If you look at your dynamic.css I presume you’ll also see these broken urls for any selector that uses them. By default, these are:

    body, 
    .main-menu ul a:hover
    .base-menu ul li.current-cat a,
    .base-menu ul li.current_page_item a,
    .base-menu ul li.current-menu-item a
    #sidebar .item-list-tabs li.loading a
    .flex-caption

    So you’ll also have to locate the cbox-theme design.css file and follow the same approach as above for each of these selectors.

    Cheers,

    Christian

    July 6, 2013 at 4:13 am #3100
    Phil_P
    Participant

    Fantastic sleuthing @christian (Sherlock Holmes school?)… I’ll try some of your code suggestions today and report back… may be worth letting @bowefrankema know about the findings – to address the issues at the infinity core level.

    NB I’ve always followed advice to use subdirectories instead of subdomains for multisites, although I’ve seen some large cbox projects successfully using subdomains. Do you think I should do the same?

    July 6, 2013 at 4:33 am #3101
    Phil_P
    Participant

    (sorry) – that post was addressed to @haystack

    July 6, 2013 at 7:52 am #3102
    Christian Wach
    Participant

    @phil I’ve raised an issue on Github and Marshall is on the case:

    https://github.com/cuny-academic-commons/cbox-theme/issues/159

    BTW, hi Phil, we should grab a pint again sometime soon!

    July 6, 2013 at 8:50 am #3103
    Phil_P
    Participant

    Hi @haystack . Good ideas (both) – a tankard of foaming ale would go down well!I can verify your solutions  by the way – excellent. Cheers – P

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 287
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register