mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Bootstrap support added to email and print news icons.
This commit is contained in:
parent
2fdfdb0813
commit
809e68f1ab
@ -125,7 +125,7 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
$NEWIMAGE = $param['image_nonew_small'];
|
||||
}
|
||||
return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." <a href='".e107::getUrl()->create('news/view/item', $news_item)."'>".$param['commentlink'].intval($news_item['news_comment_total']).'</a>' : vartrue($param['commentoffstring'],'Disabled') );
|
||||
return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." <a title='Comments' href='".e107::getUrl()->create('news/view/item', $news_item)."'>".$param['commentlink'].intval($news_item['news_comment_total']).'</a>' : vartrue($param['commentoffstring'],'Disabled') );
|
||||
}
|
||||
|
||||
function sc_trackback($parm)
|
||||
@ -218,8 +218,11 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
if (ADMIN && getperms('H'))
|
||||
{
|
||||
$adop_icon = (file_exists(THEME."images/newsedit.png") ? THEME_ABS."images/newsedit.png" : e_IMAGE_ABS."admin_images/edit_16.png");
|
||||
return " <a href='".e_ADMIN_ABS."newspost.php?action=create&sub=edit&id=".$this->news_item['news_id']."'><img src='".$adop_icon."' alt='".LAN_NEWS_25."' class='icon' /></a>\n";
|
||||
|
||||
$default = (deftrue('e_BOOTSTRAP')) ? "<i class='icon-edit'></i>" : "<img src='".e_IMAGE_ABS."admin_images/edit_16.png' alt='".LAN_NEWS_25."' class='icon' />";
|
||||
|
||||
$adop_icon = (file_exists(THEME."images/newsedit.png") ? "<img src='".THEME_ABS."images/newsedit.png' alt='".LAN_NEWS_25."' class='icon' />" : $default);
|
||||
return " <a href='".e_ADMIN_ABS."newspost.php?action=create&sub=edit&id=".$this->news_item['news_id']."' title=\"".LAN_NEWS_25."\">".$adop_icon."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -55,18 +55,32 @@ class emailprint
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(deftrue('e_BOOTSTRAP'))
|
||||
{
|
||||
$genericMail = "<i class='icon-envelope'></i>";
|
||||
$genericPrint = "<i class='icon-print'></i>";
|
||||
}
|
||||
else // BC
|
||||
{
|
||||
$genericMail = "<img src='".e_IMAGE_ABS."generic/email.png' alt='".LAN_EMAIL_7."' />";
|
||||
$genericPrint = "<img src='".e_IMAGE_ABS."generic/printer.png' alt='".LAN_PRINT_1."' />";
|
||||
}
|
||||
|
||||
|
||||
if ($look == 0 || $look == 1)
|
||||
{
|
||||
$ico_mail = (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL) ? THEME_ABS."images/".ICONMAIL : e_IMAGE_ABS."generic/email.png");
|
||||
$ico_mail = (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL) ? "<img src='".THEME_ABS."images/".ICONMAIL."' alt='".LAN_EMAIL_7."' />" : $genericMail);
|
||||
//TDOD CSS class
|
||||
$text_emailprint .= "<a href='".e_HTTP."email.php?".$email.".".$id."'><img src='".$ico_mail."' alt='".LAN_EMAIL_7."' title='".LAN_EMAIL_7."' /></a> ";
|
||||
$text_emailprint .= "<a href='".e_HTTP."email.php?".$email.".".$id."' title='".LAN_EMAIL_7."'>".$ico_mail."</a> ";
|
||||
}
|
||||
if ($look == 0 || $look == 2)
|
||||
{
|
||||
$ico_print = (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT) ? THEME_ABS."images/".ICONPRINT : e_IMAGE_ABS."generic/printer.png");
|
||||
$ico_print = (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT) ? "<img src='".THEME_ABS."images/".ICONPRINT."' alt='".LAN_PRINT_1."' />" : $genericPrint);
|
||||
//TODO CSS class
|
||||
$text_emailprint .= "<a href='".e_HTTP."print.php?".$print.".".$id."'><img src='".$ico_print."' alt='".LAN_PRINT_1."' title='".LAN_PRINT_1."' /></a>";
|
||||
$text_emailprint .= "<a href='".e_HTTP."print.php?".$print.".".$id."' title='".LAN_PRINT_1."'>".$ico_print."</a>";
|
||||
}
|
||||
return $text_emailprint;
|
||||
}
|
||||
|
@ -2,11 +2,17 @@
|
||||
|
||||
if (!defined('e107_INIT')) exit;
|
||||
|
||||
global $sc_style;
|
||||
|
||||
|
||||
|
||||
// {---} is replaced with the shortcode data.
|
||||
$SC_WRAPPER['EMAILICON'] = "<small>{---}</small>";
|
||||
$SC_WRAPPER['PRINTICON'] = "<small>{---}</small>";
|
||||
$SC_WRAPPER['PDFICON'] = "<small>{---}</small>";
|
||||
$SC_WRAPPER['ADMINOPTIONS'] = "<small>{---}</small>";
|
||||
|
||||
// XXX As displayed by news.php (no query) or news.php?list.1.1 (ie. regular view of a particular category)
|
||||
$NEWS_TEMPLATE['default']['item'] = '
|
||||
$NEWS_TEMPLATE['default']['item'] = '
|
||||
{SETIMAGE: w=600}
|
||||
<div class="view-item">
|
||||
<h2>{NEWSTITLE}</h2>
|
||||
@ -15,6 +21,10 @@ global $sc_style;
|
||||
<small><i class="icon-user"></i>{NEWSAUTHOR}</small>
|
||||
<small><i class="icon-comment"></i>{NEWSCOMMENTS}</small>
|
||||
<small><i class="icon-tag"></i>{NEWSTAGS}</small>
|
||||
{EMAILICON}
|
||||
{PRINTICON}
|
||||
{PDFICON}
|
||||
{ADMINOPTIONS}
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
@ -22,12 +32,12 @@ global $sc_style;
|
||||
{NEWSBODY}
|
||||
<div class="text-right">{EXTENDED}</div>
|
||||
</div>
|
||||
<div class="options">
|
||||
{EMAILICON} {PRINTICON} {PDFICON} {ADMINOPTIONS}
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
|
||||
|
||||
// XXX The ListStyle template offers a listed summary of items with a minimum of 10 items per page.
|
||||
// As displayed by news.php?cat.1 OR news.php?all
|
||||
$NEWS_TEMPLATE['list']['item'] = '
|
||||
@ -63,6 +73,10 @@ $NEWS_TEMPLATE['view']['item'] = '
|
||||
<small><i class="icon-user"></i>{NEWSAUTHOR}</small>
|
||||
<small><i class="icon-comment"></i>{NEWSCOMMENTS}</small>
|
||||
<small><i class="icon-tag"></i>{NEWSTAGS}</small>
|
||||
{EMAILICON}
|
||||
{PRINTICON}
|
||||
{PDFICON}
|
||||
{ADMINOPTIONS}
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
@ -70,9 +84,6 @@ $NEWS_TEMPLATE['view']['item'] = '
|
||||
{NEWSBODY}
|
||||
{EXTENDED}
|
||||
</div>
|
||||
<div class="options">
|
||||
{EMAILICON} {PRINTICON} {PDFICON} {ADMINOPTIONS}
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user