~quam-plures-core/quam-plures/hic-sunt-dracones

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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<?php
/**
 * This file will display a blog, WITHOUT using a template.
 *
 * This file will set some display parameters and then display the blog in a template.
 *
 * Note: You only need to use this file for advanced use/customization of Quam Plures.
 * Most of the time, calling your blog through index.php with a template will be enough.
 * You should try to customize a template before thrying to use this fle.
 *
 * Quam Plures - {@link http://quamplures.net/}
 * Released under GNU GPL License - {@link http://quamplures.net/license.html}
 * @copyright (c) 2009 by the Quam Plures developers - {@link http://quamplures.net/}
 * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @todo EdB: figure out if this useful, shed if not else embrace
 *
 * @package templates
 */

# First, select which blog you want to display here!
# You can find these numbers in the back-office under the Blogs section.
# You can also create new blogs over there. If you do, you may duplicate this file for the new blog.
$blog = 1;

# Tell quam plures you don't want to use templates for this page:
$template = '';

# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
$show_statuses = array();

# Here you can set a limit before which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the past
$timestamp_min = '';

# Here you can set a limit after which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the future
$timestamp_max = 'now';

# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...

# Tell Quam Plures not to redirect. This is necessary only if "301" for homepage is checked and the blog URL is set
# to something else than this page -- which is the case on demo installs.
# For production systems, properly set the blog URL , then remove the line below:
$redir = 'no';

/**
 * Let Quam Plures handle the query string and load the blog data:
 */
require_once dirname(__FILE__).'/conf/_config.php';

require $inc_path.'_blog_main.inc.php';

// Make sure includes will check in the current folder!
$ads_current_template_path = dirname(__FILE__).'/';


# Now, below you'll find the main template...

// --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
// Note: This is totally optional. General caching must be enabled in Global settings, otherwise this will do nothing.
// Delete this block if you don't care about page level caching. Don't forget to delete the matching section at the end of the page.
load_class( '_core/model/_pagecache.class.php' );
$PageCache = & new PageCache( NULL );
// Check for cached content & Start caching if needed:
if( ! $PageCache->check() )
{	// Cache miss, we have to generate:
	// --------------------- PAGE LEVEL CACHING SUPPORT ---------------------


// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
template_init( $disp );

add_js_for_toolbar();		// Registers all the javascripts needed by the toolbar menu

header_content_type( 'text/html' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>"><!-- InstanceBegin template="/Templates/Standard.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
	<title><?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
			'auto_pilot'      => 'seo_title',
		) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?></title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" href="rsc/css/fp02.css" type="text/css" />
<!-- InstanceBeginEditable name="head" -->
	<?php template_content_meta(); /* Charset for static pages */ ?>
	<?php $Plugins->trigger_event( 'TemplateBeginHtmlHead' ); ?>
	<?php template_base_tag(); /* You're not using any template here but this won't hurt. However it will be very helpfull to have this here when you make the switch to a template! */ ?>
	<?php template_description_tag(); ?>
	<?php template_keywords_tag(); ?>
	<?php meta_generator_tag(); /* Please leave this for stats */ ?>
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
	<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
	<?php include_headlines() /* Add javascript and css files included by plugins and template */ ?>
</head>

<body>
<?php
// --- --- --- --- --- --- --- --- --- --- ---
// --- TOOLBAR INCLUDED HERE ---
template_include( '_toolbar.inc.php' );
echo "\n";
if( is_logged_in() )
{
	echo '<div id="template_wrapper" class="template_wrapper_loggedin">';
}
else
{
	echo '<div id="template_wrapper" class="template_wrapper_anonymous">';
}
echo "\n";
?>

<div class="pageHeader">
<?php
	// --------------------------------- START OF BLOG LIST --------------------------------
	template_widget( array(
						// CODE for the widget:
						'widget' => 'colls_list_public',
						// Optional display params
						'block_start' => '<div class="NavBar">',
						'block_end' => '</div>',
						'block_display_title' => false,
						'list_start' => '',
						'list_end' => '',
						'item_start' => '',
						'item_end' => '',
						'item_selected_start' => '',
						'item_selected_end' => '',
						'link_selected_class' => 'NavButton2',
						'link_default_class' => 'NavButton2',
				) );
	// ---------------------------------- END OF BLOG LIST ---------------------------------
?>
<!-- InstanceEndEditable -->
<div class="pageTitle">
<h1 id="pageTitle"><!-- InstanceBeginEditable name="PageTitle" --><?php $Blog->disp( 'name', 'htmlbody' ) ?><!-- InstanceEndEditable --></h1>
</div>
</div>


<div class="pageSubTitle"><!-- InstanceBeginEditable name="SubTitle" --><?php $Blog->disp( 'tagline', 'htmlbody' ) ?><!-- InstanceEndEditable --></div>


<div class="main"><!-- InstanceBeginEditable name="Main" -->

<div class="bPosts">

	<?php
		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
		messages( array(
			'block_start' => '<div class="action_messages">',
			'block_end'   => '</div>',
		) );
		// --------------------------------- END OF MESSAGES ---------------------------------
	?>

	<?php
		// ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
		item_prevnext_links( array(
				'block_start' => '<table class="prevnext_post"><tr>',
				'prev_start'  => '<td>',
				'prev_end'    => '</td>',
				'next_start'  => '<td class="right">',
				'next_end'    => '</td>',
				'block_end'   => '</tr></table>',
			) );
		// ------------------------- END OF PREV/NEXT POST LINKS -------------------------
	?>

	<?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
				'title_before'=> '<h2>',
				'title_after' => '</h2>',
				'title_none'  => '',
				'glue'        => ' - ',
				'title_single_disp' => true,
				'format'      => 'htmlbody',
			) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?>

	<?php
		// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
		mainlist_page_links( array(
				'block_start' => '<p class="center"><strong>',
				'block_end' => '</strong></p>',
			) );
		// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
	?>


	<!-- =================================== START OF MAIN AREA =================================== -->

	<?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 "}"
		?>

		<?php
			// ------------------------------ DATE SEPARATOR ------------------------------
			$MainList->date_if_changed( array(
					'before'      => '<h2>',
					'after'       => '</h2>',
					'date_format' => '#',
				) );
		?>
		<div id="<?php $Item->anchor_id() ?>" class="bPost bPost<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">

			<div class="bSmallHead">
			<?php
				$Item->permanent_link( array(
						'text' => '#icon#',
					) );
			?>
			<?php
				$Item->issue_time(); // Post issue time
			?>
			<?php
				$Item->categories( array(
					'before'          => ', '.T_('Categories').': ',
					'after'           => ' ',
					'include_main'    => true,
					'include_other'   => true,
					'include_external'=> true,
					'link_categories' => true,
				) );
	?>
	</div>

	<h3 class="bTitle"><?php $Item->title(); ?></h3>

	<?php
	// --- --- --- --- --- --- --- --- --- --- ---
	// ---  POST CONTENT INCLUDED HERE ---
	template_include( '_item_content.inc.php', array(
		'image_size' => 'fit-400x320',
	) );

	// List all tags attached to this post:
				$Item->tags( array(
						'before' =>         '<div class="bSmallPrint">'.T_('Tags').': ',
						'after' =>          '</div>',
						'separator' =>      ', ',
					) );
			?>

			<div class="bSmallPrint">
				<?php
					// Link to comments, trackbacks, etc.:
					$Item->feedback_link( array(
									'type' => 'comments',
									'link_before' => '',
									'link_after' => ' &bull; ',
									'link_text_zero' => '#',
									'link_text_one' => '#',
									'link_text_more' => '#',
									'link_title' => '#',
									'use_popup' => false,
								) );
				 ?>
				<?php
					// Link to comments, trackbacks, etc.:
					$Item->feedback_link( array(
									'type' => 'trackbacks',
									'link_before' => '',
									'link_after' => ' &bull; ',
									'link_text_zero' => '#',
									'link_text_one' => '#',
									'link_text_more' => '#',
									'link_title' => '#',
									'use_popup' => false,
								) );
				 ?>

				<?php	$Item->permanent_link(); ?>
	</div>

	<?php
	// --- --- --- --- --- --- --- --- --- --- ---
	// --- ITEM FEEDBACK INCLUDED HERE ---
	template_include( '_item_feedback.inc.php', array(
		'before_section_title' => '<h4>',
		'after_section_title' => '</h4>',
	) );
	?>
	</div>

	<?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>',
   			'prev_text' => '&lt;&lt;',
   			'next_text' => '&gt;&gt;',
			) );
		// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------

// --- --- --- --- --- --- --- --- --- --- ---
// MAIN CONTENT INCLUDED HERE
template_include( '$disp$', array(
	// we already handled these cases above
	'disp_posts' => '', 
	'disp_single' => '', 
	'disp_page' => '', 
) );
?>
</div>

<div class="bSideBar">

<div class="bSideItem">
<h3><?php $Blog->disp( 'name', 'htmlbody' ); ?></h3>

		<p><?php
			// BLOG LONG DESCRIPTION:
			$Blog->disp( 'longdesc', 'htmlbody' );
			// Note: we could have called the coll_longdesc widget instead, but that would be overkill.
		?></p>

		<?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' => '&lt;&lt; '.T_('Previous'),
   				'next_text' => T_('Next').' &gt;&gt;',
				) );
			// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
		?>

		<?php
			// --------------------------------- START OF COMMON LINKS --------------------------------
			// Call the coll_common_links widget:
			template_widget( array(
								// CODE for the widget:
								'widget' => 'coll_common_links',
								// Optional display params:
								'show_recently' => true,
								'show_archives' => true,
								'show_categories' => false,
								'show_latestcomments' => false,
								'list_start' => '<ul>',
								'list_end' => '</ul>',
								'item_start' => '<li>',
								'item_end' => '</li>',
						) );
			// ---------------------------------- END OF COMMON LINKS ---------------------------------
		?>

		<?php
			// ------------------------------- START OF CALENDAR ---------------------------------
			// Call the Calendar plugin (if installed):
			$Plugins->call_by_code( 'evo_Calr', array(	// Params follow:
					'block_start' => '',
					'block_end' => '',
					'displaycaption' => true,
					'linktomontharchive' => false,
				) );
			// -------------------------------- END OF CALENDAR ----------------------------------
		?>
	</div>

	<?php
		// --------------------------------- START OF SEARCH FORM --------------------------------
		// Call the coll_search_form widget:
		template_widget( array(
				// CODE for the widget:
				'widget' => 'coll_search_form',
				// Optional display params:
				'block_start' => '<div class="bSideItem">',
				'block_end' => '</div>',
				'block_title_start' => '<h3 class="sideItemTitle">',
				'block_title_end' => '</h3>',
			) );
		// ---------------------------------- END OF SEARCH FORM ---------------------------------
	?>

	<?php
		// --------------------------------- START OF CATEGORY LIST --------------------------------
		template_widget( array(
				// CODE for the widget:
				'widget' => 'coll_category_list',
				// Optional display params
				'block_start' => '<div class="bSideItem">',
				'block_end' => '</div>',
				'block_title_start' => '<h3 class="sideItemTitle">',
				'block_title_end' => '</h3>',
			) );
		// ---------------------------------- END OF CATEGORY LIST ---------------------------------
	?>

	<?php
		// -------------------------- ARCHIVES INSERTED HERE -----------------------------
		$Plugins->call_by_code( 'evo_Arch', array(
				'block_start' => '<div class="bSideItem">',
				'block_end' => '</div>',
				'block_title_start' => '<h3>',
				'block_title_end' => '</h3>',
			) );
		// ------------------------------ END OF ARCHIVES --------------------------------
	?>

	<?php
		// --------------------------------- START OF LINKBLOG --------------------------------
		// Call the coll_search_form widget:
		template_widget( array(
							// CODE for the widget:
							'widget' => 'linkblog',
							// Optional display params:
							'block_start' => '<div class="bSideItem">',
							'block_end' => '</div>',
							'block_title_start' => '<h3 class="sideItemTitle">',
							'block_title_end' => '</h3>',
					) );
		// ---------------------------------- END OF LINKBLOG ---------------------------------
	?>

	<?php
		// --------------------------------- START OF USER TOOLS --------------------------------
		template_widget( array(
				// CODE for the widget:
				'widget' => 'user_tools',
				// Optional display params
				'block_start' => '<div class="bSideItem">',
				'block_end' => '</div>',
				'block_title_start' => '<h3 class="sideItemTitle">',
				'block_title_end' => '</h3>',
			) );
		// ---------------------------------- END OF USER TOOLS ---------------------------------
	?>

	<?php
		// --------------------------------- START OF XML FEEDS --------------------------------
		template_widget( array(
				// CODE for the widget:
				'widget' => 'coll_xml_feeds',
				// Optional display params
				'block_start' => '<div class="bSideItem">',
				'block_end' => '</div>',
				'block_title_start' => '<h3 class="sideItemTitle">',
				'block_title_end' => '</h3>',
			) );
		// ---------------------------------- END OF XML FEEDS ---------------------------------
	?>

</div>
<!-- InstanceEndEditable --></div>
<div class="footer">
This is a demo page for <a href="<?php echo $app_homepage; ?>"><?php echo $app_name; ?></a>.
<!-- InstanceBeginEditable name="Baseline" -->
<?php echo '</div>' ?>
<!-- InstanceEndEditable --></div>
</body>
<!-- InstanceEnd --></html>
<?php
	// --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
	// Save collected cached data if needed:
	$PageCache->end_collect();
}
// --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
?>