Academicons not displayed

I want to use academicons in my website but failed. I have gone through all the following posts but no luck:

  • I have searched the browser console and noticed that it is loaded in the header.
  • Php error log does not mention about academicons or any error relevant to it.

I have entered the following two codes to load the css files:

		$this->addStyle(
			'fontawesome',
			'https://fonts.googleapis.com/icon?family=Material+Icons',
			array('baseUrl' => '')
		);
		
		$this->addStyle(
			'academicons',
			'https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css',
			array('baseUrl' => '')
		);

1- fonts.googleapis are loaded successfully and visible in my custome block.
2- academicons are not visible in the same table in the custome block.
Anyone can help me figure out why I am not able to pull the academicons?

Thanks
OJS: 3.1.2.1
Child theme based on default manuscript

Hi @seisense,

In you test installation, I donā€™t see any related code for the icons in the table inside custom block.
If you are using them through <i> tag, make sure that itā€™s allowed in config.inc.php.

Thanks @Vitaliy
in my config.inc.php, I found tag is allowed as below:


Is this ok? please correct me if there is any mistake.

following is what I entered in custom block source code

after I click ok and go back to open the source code window. It shows the code like this:

Although, I entered the tag for googleepis as well yet it replaces with <em tag by itself and produces the cloud icon.

But

For Academicons <i tags are altogether removed so it does not result an icon.
@kawahyu you have once raised this issue here

Were you able to solve it?
Your input is highly appreciated
Thanks

Hello all, @asmecher,

Sorry to bump this old threadā€¦
Unfortunately, I havenā€™t been able to solve my problem.
I need the <span class|style|id> attributes enabled.

I have in config.inc.php:

; Allowed HTML tags for fields that permit restricted HTML.
; For PHP 5.0.5 and greater, allowed attributes must be specified individually
; e.g. <img src|alt> to allow "src" and "alt" attributes. Unspecified
; attributes will be stripped. For PHP below 5.0.5 attributes may not be
; specified in this way.
allowed_html = "span[class|id|style|title|name],a[href|target|class|id|style|title|name],em,strong,cite,code,ul[type|class|id|style],ol[type|class|id|style],li[type|class|id|style],dl[class|id|style],dt[class|id|style],dd[class|id|style],b,i,u,img[src|alt|class|id|style],sup[class|id|style],sub[class|id|style],br,p[class|id|style],table[class|id|style],caption[class|id|style],tbody,theader,tfooter,tr[colspan|rowspan|class|id|style],td[class|id|style],th[class|id|style],div[class|id|style]"

The comment on config.inc.php seems to be updated to match the correct configuration, as the opening and closing of HTML tags <> is apparently from OJS 2 and unnecessary in OJS 3.
I donā€™t know where to add extended_valid_elementsā€¦ I searched here and the web, found the documentation on HTMLPurifier and TinyMCE, but to no help ā€¦

If required, Iā€™ll open a new post.

Our OJS info:

Code version: 3.2.1.1
Database version: 3.2.1.1
Latest version: 3.2.1.1
Your system is up-to-date

1 Like

Hello all, @asmecher,

After a lot of testing, I realized HTMLPurifier is removing the <span> tags that are children of the <sup> tag. Iā€™m using this as a way to create a pop-up on hover for references cited in the content added to the configuration.

While I donā€™t find a way to get around this, Iā€™ll add the at the bottom of the specific content.

1 Like