Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download icons - fix for bootstrap 4 #3865

Closed
Jimmi08 opened this issue Jun 21, 2019 · 2 comments
Closed

download icons - fix for bootstrap 4 #3865

Jimmi08 opened this issue Jun 21, 2019 · 2 comments
Labels
plugin: download type: enhancement An improvement or new feature request
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 21, 2019

Problematic shortcode:
{DOWNLOAD_CAT_NEWDOWNLOAD_TEXT}
and probably there are others too.

it returns glyphicon icon.

FIX:

/* define images */
	if(deftrue('BOOTSTRAP') && BOOTSTRAP === 3)
	{
		define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : 'icon-download.glyph'));
		define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : 'icon-star.glyph'));	
	}
	elseif(deftrue('BOOTSTRAP') && BOOTSTRAP === 4)
	{
		define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : 'fa-download.glyph'));
		define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : 'fa-star.glyph'));	
	}	
	else 
	{
		define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : e_IMAGE."generic/download.png"));
		define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : e_IMAGE."generic/new.png"));
	}
@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Jun 21, 2019

Next one:

{DOWNLOAD_ADMIN_EDIT}

returns:
<i class="glyphicon glyphicon-edit"><!-- --></i>

but there is this code:
$icon = (deftrue('BOOTSTRAP')) ? e107::getParser()->toGlyph('edit') : "<img src='".e_IMAGE_ABS."generic/edit.png' alt='*' style='padding:0px;border:0px' />";

@CaMer0n
Copy link
Member

CaMer0n commented Jun 22, 2019

@Jimmi08 Thanks. Just needs to be changed to toGlyph('fa-edit') instead of toGlyph('edit'). Pull-requests welcome. :-)

@Moc Moc added plugin: download type: enhancement An improvement or new feature request labels Jun 27, 2019
@Moc Moc added this to the e107 2.2.2 milestone Jun 27, 2019
@Moc Moc closed this as completed in 45b073e Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: download type: enhancement An improvement or new feature request
Projects
None yet
Development

No branches or pull requests

3 participants