/
index.main.php
262 lines (221 loc) · 8.37 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
<?php
/**
* This is the main/default page template for the "custom" skin.
*
* This skin only uses one single template which includes most of its features.
* It will also rely on default includes for specific dispays (like the comment form).
*
* For a quick explanation of b2evo 2.0 skins, please start here:
* {@link http://manual.b2evolution.net/Skins_2.0}
*
* The main page template is used to display the blog when no specific page template is available
* to handle the request (based on $disp).
*
* @package evoskins
* @subpackage custom
*
* @version $Id: index.main.php,v 1.9 2007/11/03 23:54:39 fplanque Exp $
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );
// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php' );
// Note: You can customize the default HTML header by copying the
// _html_header.inc.php file into the current skin folder.
// -------------------------------- END OF HEADER --------------------------------
?>
</head>
<body>
<div id="wrap">
<!-- HEADER -->
<!-- Header banner background -->
<div id="header-banner">
<!-- This is where css puts the background -->
</div>
<!-- Header bottom navigation -->
<div class="PageTop">
<?php if ( true /* change to false to hide the blog list */ ) { ?>
<?php
// START OF BLOG LIST
skin_widget( array(
'widget' => 'colls_list_public',
'block_start' => '<div class="header-low">',
'block_end' => '</div>',
'block_display_title' => true,
'list_start' => '<ul>',
'list_end' => '</ul>',
'item_start' => '<li>',
'item_end' => '</li>',
'item_selected_start' => '<li class="selected">',
'item_selected_end' => '</li>',
) );
?>
<?php } ?>
<?php
// ------------------------- "Page Top" CONTAINER EMBEDDED HERE --------------------------
// 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="header-low">',
'block_end' => '</div>',
'block_display_title' => true,
'list_start' => '<ul>',
'list_end' => '</ul>',
'item_start' => '<li>',
'item_end' => '</li>',
) );
// ----------------------------- END OF "Page Top" CONTAINER -----------------------------
?>
</div>
<!-- end header-low/PageTop -->
<!-- Buffer to content area -->
<div id="buffer"></div>
<!-- MIDDLE COLUMN -->
<div id="middle-column">
<?php
// --------------------------------- START OF POSTS -------------------------------------
// Display message if no post:
display_if_empty();
while( $Item = & mainlist_get_item() )
{ // For each blog post, do everything below up to the closing curly brace "}"
?>
<div class="middle-column-title-standard"> <h3><?php $Item->title(); ?></h3></div>
<?php $Item->issue_time( array(
'time_format' => 'F jS, Y',
'before' => ' ',
'after' => ' ',
) );
$Item->author( array(
'before' => ''.T_('by').' <strong>',
'after' => '</strong>',
) );
?>
<?php
// ---------------------- POST CONTENT INCLUDED HERE ----------------------
skin_include( '_item_content.inc.php', array(
'image_size' => 'fit-400x320',
) );
// 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 POST CONTENT -------------------------
//
?>
<div class="bSmallPrint">
<?php
// Link to comments, trackbacks, etc.:
//class' => 'permalink_right
$Item->feedback_link( array(
'type' => 'comments',
'link_before' => '',
'link_after' => '',
'link_text_zero' => '#',
'link_text_one' => '#',
'link_text_more' => '#',
'link_title' => '#',
'use_popup' => false,
) );
echo ' ';
// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
'type' => 'trackbacks',
'link_before' => ' • ',
'link_after' => '',
'link_text_zero' => '#',
'link_text_one' => '#',
'link_text_more' => '#',
'link_title' => '#',
'use_popup' => false,
) );
// Permalink:
$Item->permanent_link();
echo ' ';
$Item->edit_link( array( // Link to backoffice for editing
'before' => '',
'after' => '',
) );
?>
<br/>
<?php
$NewText= '<div class="bSmallPrintBox"><a href="http://slashdot.org/bookmark.pl?url='.$Item->get_permanent_url().'">slashdot</a> | <a href="http://digg.com/submit?phase=2&url='.$Item->get_permanent_url().'">digg</a> | <a href="http://www.facebook.com/sharer.php?u='.$Item->get_permanent_url().'">facebook</a> | <a href="http://del.icio.us/post?url='.$Item->get_permanent_url().'">del.icio.us</a> | <a href="http://www.sphere.com/search?q=sphereit:'.$Item->get_permanent_url().'">sphere</a></div>';
echo $NewText;
?>
</div>
<?php
// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
skin_include( '_item_feedback.inc.php', array(
'before_section_title' => '<h4>',
'after_section_title' => '</h4>',
) );
// 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
} // ---------------------------------- END OF POSTS ------------------------------------
?>
<?php
// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
mainlist_page_links( array(
'block_start' => '<p class="center"><strong>',
'block_end' => '</strong></p>',
'links_format' => '$prev$ :: $next$',
'prev_text' => '<< '.T_('Previous'),
'next_text' => T_('Next').' >>',
) );
// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
?>
<?php
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
skin_include( '$disp$', array(
'disp_posts' => '', // We already handled this case above
'disp_single' => '', // We already handled this case above
'disp_page' => '', // We already handled this case above
) );
// 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 ---------------------------
?>
<?php
// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
// skin_include( '$disp$', array(
// ) );
// 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>
<!-- RIGHT COLUMN -->
<div id="right-column">
<?php
// Display container contents:
skin_container( NT_('Sidebar'), array(
// The following (optional) params will be used as defaults for widgets included in this container:
// This will enclose each widget in a block:
'block_start' => '<div class="right-column-box-standard">',
'block_end' => '</div>',
// This will enclose the title of each widget:
'block_title_start' => '<h3>',
'block_title_end' => '</h3>',
// If a widget displays a list, this will enclose that list:
'list_start' => '<ul>',
'list_end' => '</ul>',
// This will enclose each item in a list:
'item_start' => '<li>',
'item_end' => '</li>',
// This will enclose sub-lists in a list:
'group_start' => '<ul>',
'group_end' => '</ul>',
) );
?>
</div> <!-- end of right column -->
<!-- FOOTER -->
<? include("_body_footer.inc.php") ?>
</div>
<?php
$Hit->log(); // log the hit on this page
debug_info(); // output debug info if requested
?>
</body>
</html>