-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.main.php
286 lines (250 loc) · 10.3 KB
/
index.main.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
<?php
/**
* This is the main/default page template.
*
* For a quick explanation of b2evo 2.0 skins, please start here:
* {@link http://b2evolution.net/man/skin-development-primer}
*
* It is used to display the blog when no specific page template is available to handle the request.
*
* @package evoskins
* @subpackage photoalbums
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
if( evo_version_compare( $app_version, '3.0' ) < 0 )
{ // Older skins (versions 2.x and above) should work on newer b2evo versions, but newer skins may not work on older b2evo versions.
die( 'This skin is designed for b2evolution 3.0 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
}
global $Skin;
// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );
require_js( 'functions.js', 'blog' ); // for opening popup window (comments)
// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php', array(
'viewport_tag' => '#responsive#',
'arcdir_text' => T_('Index'),
'catdir_text' => T_('Galleries'),
'category_text' => T_('Gallery').': ',
'categories_text' => T_('Galleries').': ',
) );
// -------------------------------- END OF HEADER --------------------------------
// ---------------------------- SITE HEADER INCLUDED HERE ----------------------------
// If site headers are enabled, they will be included here:
siteskin_include( '_site_body_header.inc.php' );
// ------------------------------- END OF SITE HEADER --------------------------------
?>
<div class="PageTop">
<?php
// Display container and contents:
skin_container( NT_('Page Top'), array(
// The following params will be used as defaults for widgets included in this container:
'block_start' => '<div class="widget $wi_class$">',
'block_end' => '</div>',
'block_display_title' => false,
'list_start' => '<ul>',
'list_end' => '</ul>',
'item_start' => '<li>',
'item_end' => '</li>',
) );
?>
</div>
<div class="pageHeader">
<h1 id="pageTitle"><a href="<?php $Blog->disp( 'url', 'raw' ) ?>"><?php $Blog->disp( 'name', 'htmlbody' ) ?></a></h1>
<?php
skin_widget( array(
// CODE for the widget:
'widget' => 'coll_member_count',
// Optional display params
'before' => '(',
'after' => ')',
) );
?>
<div class="top_menu floatright">
<?php
// ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
// Display container and contents:
skin_container( NT_('Menu'), array(
// The following params will be used as defaults for widgets included in this container:
'block_start' => '',
'block_end' => '',
'block_display_title' => false,
'list_start' => '',
'list_end' => '',
'item_start' => ' <span class="menu_link">',
'item_end' => '</span> ',
'item_selected_start' => ' <span class="menu_link">',
'item_selected_end' => '</span>',
'item_title_before' => '',
'item_title_after' => '',
) );
// ----------------------------- END OF "Menu" CONTAINER -----------------------------
?>
</div>
<div class="clear"></div>
</div>
<?php
if( $disp == 'single' )
{ // ------------------- NAVIGATION BAR FOR ALBUM(POST) -------------------
if( $single_Item = & mainlist_get_item() )
{ // Get Item here, because it can be not defined yet, e.g. in Preview mode
?>
<div class="nav_album">
<a href="<?php $Blog->disp( 'url', 'raw' ) ?>" id="ios-arrow-left" title="<?php echo format_to_output( T_('All Albums'), 'htmlattr' ); ?>"></a>
<span class="nav_album_title">
<?php
$single_Item->title( array(
'link_type' => 'permalink'
) );
$single_Item->edit_link( array( // Link to backoffice for editing
'before' => ' ',
'after' => '',
'text' => get_icon( 'edit' ),
'title' => T_('Edit title/description...'),
) );
if( $Skin->enabled_status_banner( $single_Item->status ) )
{ // Status banner
$single_Item->format_status( array(
'template' => '<div class="post_status"><div class="floatright"><span class="note status_$status$"><span>$status_title$</span></span></div></div>',
) );
}
?>
</span>
<?php
// ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
item_prevnext_links( array(
'template' => '$prev$$next$',
'block_start' => '<div class="roundbutton_group nav_album_arrows">',
'next_class' => 'roundbutton rbtn_black',
'next_start' => '',
'next_text' => '<span class="arrow_right_white"></span>',
'next_no_item' => '<span class="roundbutton rbtn_black"><span class="arrow_right_grey"></span></span>',
'next_end' => '',
'prev_class' => 'roundbutton rbtn_black',
'prev_start' => '',
'prev_text' => '<span class="arrow_left_white"></span>',
'prev_no_item' => '<span class="roundbutton rbtn_black"><span class="arrow_left_grey"></span></span>',
'prev_end' => '',
'block_end' => '</div>',
) );
// ------------------------- END OF PREV/NEXT POST LINKS -------------------------
?>
<div class="nav_album_number">
<?php printf( T_('%s photos'), $single_Item->get_number_of_images() ); ?>
</div>
<div class="clear"></div></div>
<?php
}
} // ------------------- END OF NAVIGATION BAR FOR ALBUM(POST) ------------------- ?>
<div class="bPosts<?php echo in_array( $disp, array( 'catdir', 'posts', 'single', 'page', 'mediaidx' ) ) ? ' full_width' : '' ?>">
<!-- =================================== START OF MAIN AREA =================================== -->
<?php
// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
messages( array(
'block_start' => '<div class="action_messages">',
'block_end' => '</div>',
) );
// --------------------------------- END OF MESSAGES ---------------------------------
?>
<?php
// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
request_title( array(
'title_before' => '<h2>',
'title_after' => '</h2>',
'title_none' => '',
'glue' => ' - ',
'title_single_disp' => false,
'format' => 'htmlbody',
'arcdir_text' => T_('Index'),
'catdir_text' => '',
'category_text' => T_('Gallery').': ',
'categories_text' => T_('Galleries').': ',
'user_text' => '',
) );
// ------------------------------ END OF REQUEST TITLE -----------------------------
?>
<?php
// Go Grab the featured post:
if( $Item = & get_featured_Item() )
{ // We have a featured/intro post to display:
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include( '_item_block.inc.php', array(
'feature_block' => true,
'content_mode' => 'full', // We want regular "full" content, even in category browsing: i-e no excerpt or thumbnail
'intro_mode' => 'normal', // Intro posts will be displayed in normal mode
'item_class' => 'featured_post',
'Item' => $Item,
) );
// ----------------------------END ITEM BLOCK ----------------------------
}
?>
<?php
if( $disp == 'single' || $disp == 'page' )
{ // ------------------------------------ START OF A POST ----------------------------------------
// Display message if no post:
display_if_empty();
if( isset( $single_Item ) )
{ // Use Item that already is defined above
$Item = & $single_Item;
}
else
{ // Get next Item object
$Item = & mainlist_get_item();
}
if( $Item )
{
// ---------------------- ITEM BLOCK INCLUDED HERE ------------------------
skin_include( '_item_block.inc.php', array(
'content_mode' => 'full', // We want regular "full" content, even in category browsing: i-e no excerpt or thumbnail
) );
// ----------------------------END ITEM BLOCK ----------------------------
}
} // ---------------------------------- END OF A POST ------------------------------------
?>
<?php
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
skin_include( '$disp$', array(
'disp_single' => '', // We already handled this case above
'disp_page' => '', // We already handled this case above
'mediaidx_thumb_size' => $Skin->get_setting( 'mediaidx_thumb_size' ),
'author_link_text' => 'auto',
'login_page_before' => '<div class="login_block"><div class="bDetails">',
'login_page_after' => '</div></div>',
'register_page_before' => '<div class="login_block"><div class="bDetails">',
'register_page_after' => '</div></div>',
'display_abort_link' => ( $Blog->get_setting( 'allow_access' ) == 'public' ), // Display link to abort login only when it is really possible
) );
// Note: you can customize any of the sub templates included here by
// copying the matching php file into your skin directory.
// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
?>
</div>
<?php
if( $disp != 'catdir' )
{ // Don't display the pages on disp=catdir because we don't have a limit by page there
// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
mainlist_page_links( array(
'block_start' => '<div class="nav_pages">',
'block_end' => '</div>',
'prev_text' => '<<',
'next_text' => '>>',
) );
// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
}
?>
<?php
// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include( '_body_footer.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
// ---------------------------- SITE FOOTER INCLUDED HERE ----------------------------
// If site footers are enabled, they will be included here:
siteskin_include( '_site_body_footer.inc.php' );
// ------------------------------- END OF SITE FOOTER --------------------------------
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>