Hi Team,

Love the module; however would like to request a feature to use Font Awesome icons instead of the inbuilt images - I think it would allow users more customisation with theming, and really make it an ever better module!

Comments

chipcleary’s picture

Assigned: Unassigned » chipcleary

Ah, great timing. I am just working on improved theming for answers. Just released a first version. I like the idea ... thanks! Will include this in a revision to that.

Note, I'm putting it in a submodule called "answers_theme" to not interfere with people who have already used the answers module in their sites.

  • chipcleary committed 046c52b on 7.x-4.x
    Issue #2435601 by chipcleary: Font Awesome Icons instead of Images
    
chipcleary’s picture

Status: Active » Needs review
StatusFileSize
new759.07 KB

Patch attached and committed to 7.x-4.x-dev.

JacksonBison’s picture

I'm a bit of a hack, so admittingly don't exactly know what I'm doing... I tried the patch on an existing installation of Answers, which caused all kinds of issues sitewide, but I assume that's why you said you're putting it in a theme sub-module.

Should the patch work if I delete all the answers content I have on the site? There's only test content currently...

chipcleary’s picture

Hmmm ... you shouldn't have to delete any content.

A couple of questions:

  • Did you try clearing the cache?
  • Was the installation a 7.x-4.x version of the module? If it was 7.x-3.x that would cause a problem ... they are not compatible.
  • Also, are the problems limited to the pages where you view a questions (which is the only page that should be impacted) or did it cause problems on other pages?
JacksonBison’s picture

I tried again, applying the patch to answers.module in 7.x-4.0-rc1.

Cron run and Cache flush results in WSOD

Patch results in:

1. Some strange changes to the width of the site (sort of hard to explain, but it's sort of shrunk)
2. Existing font awesome icons either being replaced, or shifted vertically
3. Vertical shift in site content - eveything's dropped by about 3cm, leaving a blank area across the screen
4. The following error messages

Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
Warning: Cannot modify header information - headers already sent by (output started at K:\xampp\htdocs\mysite\sites\all\modules\answers\answers.module:566) in drupal_send_headers() (line 1237 of K:\xampp\htdocs\mysite\includes\bootstrap.inc).
chipcleary’s picture

Hmmm ... not sure what is happening. Is there a way you can share what else you are doing with your site so I could try to replicate? Not sure whether you've developed a module you could share.

If not, I could focus on two ideas ... but I'm not confident in either of them:
- You are using Font Awesome Icons separately. My css defines a "FontAwesome" ... I wonder if that somehow contradicts what your code already does
- I *think* I've created all "answers-specific" css which shouldn't affect anything else on the site ... but I can check whether every css definition is prefaced by a class that is "answers-specific"

Just to check. If you disable Answers, does the error go away?

  • chipcleary committed 8d9ed33 on 7.x-4.x
    Issue #2435601 by chipcleary: Avoid naming conflicts for Font Awesome...
chipcleary’s picture

Here's a patch that addresses the two hypotheses I list above. I've also updated 7.x-4.x-dev with these changes, as they're good ideas in any case even if the bug lies elsewhere.

JacksonBison’s picture

In response to #7, yes I do have FontAwesome icons already in my theme, so this would have been part of the problem. Disabling the Answers module fixed the issue. I couldn't find any other CSS that may have conflicted with what you put together (although that doesn't mean there isn't any - I just couldn't find it...)

With reference to #9, for whatever reason, I could not apply the patch (I tried on top of the other patch). That being said, the new dev release seems to work fine without effecting anything else on the site.

chipcleary’s picture

Status: Needs review » Reviewed & tested by the community

Good news

JacksonBison’s picture

Just an FYI - I'm using the Answers_Theme (sub) module with this release (7.x-4.0-rc1) rather than the dev release, and it works fine so far...

bluegeek9’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.