-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_item_block.inc.php
298 lines (263 loc) · 10.4 KB
/
_item_block.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<?php
/**
* This is the template that displays the item block: title, author, content (sub-template), tags, comments (sub-template)
*
* This file is not meant to be called directly.
* It is meant to be called by an include in the main.page.php template (or other templates)
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
* @copyright (c)2003-2016 by Francois Planque - {@link http://fplanque.com/}
*
* @package evoskins
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
global $Item, $Skin;
// Default params:
$params = array_merge( array(
'feature_block' => false,
'item_class' => 'evo_post evo_content_block',
'item_type_class' => 'evo_post__ptyp_',
'item_status_class' => 'evo_post__',
'content_mode' => 'full', // We want regular "full" content, even in category browsing: i-e no excerpt or thumbnail
'image_size' => '', // Do not display images in content block - Image is handled separately
'url_link_text_template' => '', // link will be displayed (except player if podcast)
'image_class' => '',
'before_images' => '<div class="evo_post_images">',
'before_image' => '<figure class="evo_image_block">',
'before_image_legend' => '<figcaption class="evo_image_legend">',
'after_image_legend' => '</figcaption>',
'after_image' => '</figure>',
'after_images' => '</div>',
'image_class' => 'img-responsive',
'image_size' => 'fit-1280x720',
'image_limit' => 1000,
'image_link_to' => 'original', // Can be 'original', 'single' or empty
'excerpt_image_class' => '',
'excerpt_image_size' => 'fit-80x80',
'excerpt_image_limit' => 0,
'excerpt_image_link_to' => 'single',
'include_cover_images' => false, // Set to true if you want cover images to appear with teaser images.
'before_gallery' => '<div class="evo_post_gallery">',
'after_gallery' => '</div>',
'gallery_table_start' => '',
'gallery_table_end' => '',
'gallery_row_start' => '',
'gallery_row_end' => '',
'gallery_cell_start' => '<div class="evo_post_gallery__image">',
'gallery_cell_end' => '</div>',
'gallery_image_size' => 'crop-80x80',
'gallery_image_limit' => 1000,
'gallery_colls' => 5,
'gallery_order' => '', // Can be 'ASC', 'DESC', 'RAND' or empty
), $params );
?>
<article id="<?php $Item->anchor_id() ?>" class="<?php $Item->div_classes( $params ) ?>" lang="<?php $Item->lang() ?>">
<?php
$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
?>
<?php
if ( $disp != 'single' || $disp != 'page' )
{
// Display images that are linked to this post:
$Item->images( array(
'before' => '<div class="evo_post_images">',
'before_image' => '<figure class="evo_image_block center">',
'before_image_legend' => '<figcaption class="evo_image_legend">',
'after_image_legend' => '</figcaption>',
'after_image' => '</figure>',
'after' => '</div>',
'image_size' => 'fit-720x500',
/* Comment the above line to use the default image size
* (fit-720x500). Possible values for the image_size
* parameter are:
* fit-720x500, fit-640x480, fit-520x390, fit-400x320,
* fit-320x320, fit-160x160, fit-160x120, fit-80x80,
* crop-80x80, crop-64x64, crop-48x48, crop-32x32,
* crop-15x15
* See also the $thumbnail_sizes array in conf/_advanced.php.
*/
// Optionally restrict to files/images linked to specific position: 'teaser'|'teaserperm'|'teaserlink'|'aftermore'|'inline'|'cover'
'restrict_to_image_position' => 'cover,teaser,teaserperm,teaserlink',
'before_gallery' => '<div class="evo_post_gallery">',
'after_gallery' => '</div>',
'gallery_table_start' => '',
'gallery_table_end' => '',
'gallery_row_start' => '',
'gallery_row_end' => '',
'gallery_cell_start' => '<div class="evo_post_gallery__image">',
'gallery_cell_end' => '</div>',
'gallery_image_size' => 'crop-80x80',
'gallery_image_limit' => 1000,
'gallery_colls' => 5,
'gallery_order' => '', // Can be 'ASC', 'DESC', 'RAND' or empty
) );
} else {
$Item->images( array(
'before' => $params['before_images'],
'before_image' => $params['before_image'],
'before_image_legend' => $params['before_image_legend'],
'after_image_legend' => $params['after_image_legend'],
'after_image' => $params['after_image'],
'after' => $params['after_images'],
'image_class' => $params['image_class'],
'image_size' => $params['image_size'],
'limit' => $params['image_limit'],
'image_link_to' => $params['image_link_to'],
'before_gallery' => $params['before_gallery'],
'after_gallery' => $params['after_gallery'],
'gallery_table_start' => $params['gallery_table_start'],
'gallery_table_end' => $params['gallery_table_end'],
'gallery_row_start' => $params['gallery_row_start'],
'gallery_row_end' => $params['gallery_row_end'],
'gallery_cell_start' => $params['gallery_cell_start'],
'gallery_cell_end' => $params['gallery_cell_end'],
'gallery_image_size' => $params['gallery_image_size'],
'gallery_image_limit' => $params['gallery_image_limit'],
'gallery_colls' => $params['gallery_colls'],
'gallery_order' => $params['gallery_order'],
// Optionally restrict to files/images linked to specific position: 'teaser'|'teaserperm'|'teaserlink'|'aftermore'|'inline'|'cover'
'restrict_to_image_position' => 'aftermore',
) );
}
?>
<div class="evo_post_details panel-body">
<div class="evo_post_details_header">
<?php
if( $Item->status != 'published' )
{
$Item->format_status( array(
'template' => '<div class="floatright"><span class="note status_$status$"><span>$status_title$</span></span></div>',
) );
}
echo '<div class="action_right">';
// Link for editing
$Item->edit_link( array(
'before' => '',
'after' => '',
'title' => T_('Edit title/description...'),
) );
if( ! $Item->is_intro() ) {
// Permalink:
$Item->permanent_link( array(
'before' => '',
'after' => '',
'text' => '<i class="fa fa-external-link"></i> '.T_('Permalink'),
) );
}
// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
'type' => 'feedbacks',
'link_before' => '',
'link_after' => '',
'link_text_zero' => get_icon( 'nocomment' ),
'link_text_one' => '1 '.get_icon( 'comments' ),
'link_text_more' => T_('%d ').get_icon( 'comments' ),
'link_title' => '#',
) );
echo '</div>';
?>
<h3 class="evo_post_title linked"><?php
if( ! $Item->is_intro() )
{
$permalink_title = 'permalink';
}
else
{
$permalink_title = '';
}
$Item->title( array(
'link_type' => $permalink_title,
) );
?></h3>
<?php
if( ! $Item->is_intro() ) {
$Item->issue_date( array(
'before' => '<span class="timestamp">',
'after' => '</span>',
'date_format' => locale_datefmt().' H:i',
) );
}
?>
</div>
<?php
// ---------------------- POST CONTENT INCLUDED HERE ----------------------
// Note: at the top of this file, we set: 'image_size' => '', // Do not display images in content block - Image is handled separately
skin_include( '_item_content.inc.php', $params );
// Note: You can customize the default item content by copying the generic
// /skins/_item_content.inc.php file into the current skin folder.
// -------------------------- END OF POST CONTENT -------------------------
?>
<?php
if( ! $Item->is_intro() ) {
?>
<div class="evo_post_footer">
<?php
$Item->author( array(
'before' => T_('By').' ',
'after' => ' • ',
'link_text' => 'preferredname',
) );
?>
<?php
$Item->categories( array(
'before' => T_('Galleries').': ',
'after' => ' ',
'include_main' => true,
'include_other' => true,
'include_external'=> true,
'link_categories' => true,
) );
?>
<?php
// List all tags attached to this post:
if( ! $Item->is_intro() ) {
$Item->tags( array(
'before' => ' • '.T_('Tags').': ',
'after' => ' ',
'separator' => ', ',
) );
?>
<?php
// URL link, if the post has one:
$Item->url_link( array(
'before' => ' • '.T_('Link').': ',
'after' => ' ',
'text_template' => '$url$',
'url_template' => '$url$',
'target' => '',
'podcast' => false, // DO NOT display mp3 player if post type is podcast
) );
}
?>
</div>
<?php } ?>
</div>
<?php
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
'author_link_text' => 'preferredname',
) );
// Note: You can customize the default item feedback by copying the generic
// /skins/_item_feedback.inc.php file into the current skin folder.
// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
?>
<?php
// ------------------ WORKFLOW PROPERTIES INCLUDED HERE ------------------
skin_include( '_item_workflow.inc.php' );
// ---------------------- END OF WORKFLOW PROPERTIES ---------------------
?>
<?php
// ------------------ META COMMENTS INCLUDED HERE ------------------
skin_include( '_item_meta_comments.inc.php', array(
'comment_start' => '<article class="evo_comment evo_comment__meta panel panel-default">',
'comment_end' => '</article>',
) );
// ---------------------- END OF META COMMENTS ---------------------
?>
<?php
locale_restore_previous(); // Restore previous locale (Blog locale)
?>
</article>