mirror of
https://github.com/e107inc/e107.git
synced 2025-08-30 01:30:32 +02:00
Issue #2795 Support multiple news 'view' layouts (requires database update)
This commit is contained in:
@@ -131,7 +131,9 @@ $NEWS_TEMPLATE['category']['start'] = '<!-- Category News Template -->';
|
||||
|
||||
// As displayed by news.php?extend.1
|
||||
|
||||
//@XXX SEE news_view_template.php
|
||||
|
||||
/*
|
||||
$NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-main pull-left col-xs-12 col-sm-6 col-md-6">{---}</span>';
|
||||
|
||||
$NEWS_TEMPLATE['view']['item'] = '
|
||||
@@ -197,7 +199,7 @@ $NEWS_TEMPLATE['view']['item'] = '
|
||||
{NEWSNAVLINK}
|
||||
|
||||
';
|
||||
|
||||
*/
|
||||
/*
|
||||
* <hr />
|
||||
<h3>About the Author</h3>
|
||||
|
96
e107_plugins/news/templates/news_view_template.php
Normal file
96
e107_plugins/news/templates/news_view_template.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2017 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
$NEWS_VIEW_INFO = array(
|
||||
|
||||
'default' => array('title' => LAN_DEFAULT, 'description' => 'unused'),
|
||||
'videos' => array('title' => "Videos (experimental)", 'description' => 'unused'),
|
||||
);
|
||||
|
||||
|
||||
// Default
|
||||
$NEWS_VIEW_WRAPPER['default']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-main pull-left col-xs-12 col-sm-6 col-md-6">{---}</span>';
|
||||
|
||||
$NEWS_VIEW_TEMPLATE['default']['item'] = '
|
||||
{SETIMAGE: w=900&h=600}
|
||||
<div class="view-item">
|
||||
<h2 class="news-title">{NEWS_TITLE: link=1}</h2>
|
||||
|
||||
<hr class="news-heading-sep">
|
||||
<div class="row">
|
||||
<div class="col-md-6"><small>{GLYPH=user} {NEWSAUTHOR} {GLYPH=time} {NEWSDATE=short} </small></div>
|
||||
<div class="col-md-6 text-right options"><small>{GLYPH=tags} {NEWSTAGS} {GLYPH=folder-open} {NEWSCATEGORY} </small></div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="body">
|
||||
{NEWSIMAGE: item=1}
|
||||
<p class="lead">{NEWS_SUMMARY}</p>
|
||||
<div class="text-justify">
|
||||
{NEWS_BODY=body}
|
||||
</div>
|
||||
<div class="news-videos-1">
|
||||
{NEWSVIDEO: item=1}
|
||||
{NEWSVIDEO: item=2}
|
||||
{NEWSVIDEO: item=3}
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
{SETIMAGE: w=400&h=400}
|
||||
|
||||
<div class="row news-images-1">
|
||||
<div class="col-md-6">{NEWSIMAGE: item=2}</div>
|
||||
<div class="col-md-6">{NEWSIMAGE: item=3}</div>
|
||||
</div>
|
||||
<div class="row news-images-2">
|
||||
<div class="col-md-6">{NEWSIMAGE: item=4}</div>
|
||||
<div class="col-md-6">{NEWSIMAGE: item=5}</div>
|
||||
</div>
|
||||
|
||||
{NEWSVIDEO: item=4}
|
||||
{NEWSVIDEO: item=5}
|
||||
|
||||
<div class="body-extended text-justify">
|
||||
{NEWS_BODY=extended}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="options hidden-print ">
|
||||
<div class="btn-group">{NEWSCOMMENTLINK: glyph=comments&class=btn btn-default}{PRINTICON: class=btn btn-default}{ADMINOPTIONS: class=btn btn-default}{SOCIALSHARE}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
{NEWSRELATED}
|
||||
<hr>
|
||||
{NEWSNAVLINK}
|
||||
|
||||
';
|
||||
|
||||
|
||||
// @todo add more templates. eg. 'videos' , 'slideshow images', 'full width image' - help and ideas always appreciated.
|
||||
|
||||
|
||||
// Videos
|
||||
$NEWS_VIEW_TEMPLATE['videos']['item'] = '<div class="view-item"><div class="alert alert-warning">Empty news_view_template.php (videos) - have ideas? let us know.</div></div>';
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user