Submenu Icons ('iconsweets')
Tagged: child themes, iconsweets, submenus
- This topic has 9 replies, 3 voices, and was last updated 12 years, 4 months ago by
Phil_P.
-
AuthorPosts
-
July 2, 2013 at 1:28 pm #3058
Phil_PParticipantGreetings 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_PParticipantWorkaround – 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 #3068Scott Voth
KeymasterHi 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_PParticipantThanks 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 #3097Christian 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’ thatparse_url()returns is:
/cbox/wp-content/themesAs 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 #3098Christian Wach
ParticipantA 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-captionSo 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_PParticipantFantastic 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 #3101July 6, 2013 at 7:52 am #3102Christian 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 -
AuthorPosts
- You must be logged in to reply to this topic.