1<?php
2// must be run from within DokuWiki
3if (!defined('DOKU_INC')) die();
4require_once('TwitterAPIExchange.php');
5include('GtopiaHelper.php');
6
7//if (!include('DOKU_TPL'+'sidebar.php')) die();
8// render the content into buffer for later use
9    ob_start();
10    tpl_content(false);
11    $buffer = ob_get_clean();
12?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
13<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
14	<head>
15		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16    	<title><?php tpl_pagetitle()?>[<?php echo strip_tags($conf['title'])?>]</title>
17    	<!-- Start DOKU tpl_metaheaders -->
18    	<?php tpl_metaheaders()?>
19    	<!-- End DOKU tpl_metaheaders -->
20		<link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.ico" type="image/x-icon" />
21		<style type='text/css'>#cart-block-contents { display: none; }</style>
22    	<link type="text/css" rel="stylesheet" media="all" href="style.css" />
23	    <!--[if IE 7]>
24	      <link rel="stylesheet" href="acquia_slate/ie7-fixes.css" type="text/css">
25	    <![endif]-->
26	    <!--[if lte IE 6]>
27	      <link rel="stylesheet" href="acquia_slate/ie6-fixes.css" type="text/css">
28	    <![endif]-->
29	    <script type="text/javascript" src="gtopia.js"></script>
30	</head>
31
32  <body class="front layout-first-main">
33  <div id="page">
34
35    <div id="primary-menu" class="links">
36      <?php
37        //### TODO Add Configuration Option here to USE Namespace Menus or HardCoded Menus
38		// #if(config says use namespace){
39        // tpl_include_page(<<get namespace from config>>);
40		// ELSE Use Hardcoded //
41       ?>
42      <ul class="links">
43        <li><a href="">MENU 1</a></li>
44        <li><a href="">MENU 2</a></li>
45        <li><div class="li"><a href="">MENU 3</a></div></li>
46      </ul>
47		<?php //END IFELSE ?>
48    </div><!-- /primary_menu -->
49
50
51    <div id="header-wrapper" class="clearfix">
52      <div id="header-first">
53        <div id="logo"><a href="<?php echo DOKU_BASE?>" title="Home"><img src="<?php echo DOKU_TPL?>images/logo.png" alt="Home" /></a></div>
54        <h1><a href="/" title="Home"><?php echo strip_tags($conf['title'])?></a></h1>
55      </div><!-- /header-first -->
56
57      <div id="header-middle">
58        <div id="slogan"><?php echo tpl_getConf('subtitle'); ?></div>
59      </div><!-- /header-middle -->
60
61      <div id="search-box">
62        <?php tpl_searchform()?>
63      </div><!-- /search-box -->
64    </div><!-- /header-wrapper -->
65
66<!-- Start of Main Image Block -->
67
68<?php
69if(($INFO['id'] == $conf['start'] && tpl_getConf('disableMainImgOnSubpages') == "1") || tpl_getConf('disableMainImgOnSubpages') == "0"): ?>
70            <div id="preface-wrapper" class="clearfix">
71                  <div id="preface-sidebar">
72            	<!-- start block.tpl.pihp -->
73			<div class="block-wrapper odd">
74
75
76		        <div id="block-views-about-block_1" class="block block-views">
77                    <div class="content">
78       	     <div class="view view-about view-id-about view-display-id-block_1 view-dom-id-4">
79
80
81
82      <div class="view-content">
83        <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
84
85<!-- start node.tpl.php -->
86<div id="node-2" class="node odd teaser node-type-page">
87
88    <h2 class="title"><a href="/about" title="About">TWITTER</a></h2>
89
90	  <div class="meta">
91	      </div>
92
93	<div class="content">
94
95<?php
96
97/** Perform a GET request and echo the response **/
98/** Note: Set the GET field BEFORE calling buildOauth(); **/
99$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
100$getfield = '?screen_name=' . $twitter_username;
101$getfield .= '&count=' . tpl_getConf('twitter_number_of_tweets');
102$getfield .= '&include_rts=false';
103$requestMethod = 'GET';
104$twitter = new TwitterAPIExchange($twitterAPI_settings);
105$twitter_response =  $twitter->setGetfield($getfield)
106             ->buildOauth($url, $requestMethod)
107             ->performRequest();
108
109foreach (json_decode($twitter_response, true) as $tweet){
110  echo "<p>";
111  echo makeClickableLinks($tweet['text']);
112  echo '<span class="text-right clear-block">'.date('n/j/Y', strtotime($tweet['created_at'])).'</span>';
113  echo '</p>';
114}
115// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)
116$suffix = "";
117?>
118<br/>
119<span class="read-more"><a href="http://www.twitter.com/<?php echo $twitter_username?>"><strong>&raquo; <?php echo $twitter_username; ?></strong></a></span>
120<!-- /PICTURE TEXT -->
121</div>
122  </div>
123<!-- /#node-2 -->  </div>
124    </div>
125</div>           </div>
126        </div>
127</div>
128<!-- /end block.tpl.php -->          </div>
129                      </div><!-- /preface-wrapper -->
130<?php endif; ?>
131            <div id="main-wrapper" class="clearfix">
132                <div id="sidebar-first">
133
134<!-- start block.tpl.php -->
135<div class="block-wrapper even">
136  <div class="rounded-block">
137    <div class="rounded-block-top-left"></div>
138    <div class="rounded-block-top-right"></div>
139    <div class="rounded-outside">
140      <div class="rounded-inside">
141        <p class="rounded-topspace"></p>
142        <div id="block-views-catalog-block_1" class="block block-views">
143          <h2 class="title block-title"><span class="first-word">Categories</span></h2>
144          <div class="content">
145            <div class="view view-catalog view-id-catalog view-display-id-block_1 view-dom-id-3">
146              <div class="view-content">
147                <!-- CONTENT HERE -->
148<?php //tpl_sitemap(); ?>
149              </div>
150            </div>
151          </div>
152        </div>
153        <p class="rounded-bottomspace"></p>
154      </div><!-- /rounded-inside -->
155    </div>
156    <div class="rounded-block-bottom-left"></div>
157    <div class="rounded-block-bottom-right"></div>
158  </div><!-- /rounded-block -->
159</div>
160<!-- /end block.tpl.php -->
161
162<!-- start Table of Contents -->
163<div class="block-wrapper">
164  <div class="rounded-block">
165    <div class="rounded-block-top-left"></div>
166    <div class="rounded-block-top-right"></div>
167    <div class="rounded-outside">
168      <div class="rounded-inside">
169        <p class="rounded-topspace"></p>
170          <div class="block block-uc_cart">
171            <h2 class="title block-title"><span class="cart-block-title-bar"><span class="first-word">Table</span> of Contents</span></h2>
172            <div class="content">
173              <?php tpl_toc()?>
174            </div>
175          </div>
176          <p class="rounded-bottomspace"></p>
177        </div><!-- /rounded-inside -->
178      </div>
179    <div class="rounded-block-bottom-left"></div>
180    <div class="rounded-block-bottom-right"></div>
181  </div><!-- /rounded-block -->
182</div>
183<!-- /end Table of Contents -->
184
185</div><!-- /sidebar-first -->
186<div id="content-wrapper">
187  <div id="content">
188    <div id="content-inner" class="clear">
189
190    <!-- wikipage start -->
191    <?php echo $buffer; ?>
192    <!-- wikipage stop -->
193 </div>
194</div><!-- /content -->
195        </div><!-- /content-wrapper -->
196
197              </div><!-- /main-wrapper -->
198                      <div class="item-list">
199  <ul class="pager">
200          <li class="pager-item"><?php tpl_actionlink('edit') ?></li>
201          <li class="pager-item"><?php tpl_actionlink('history') ?></li>
202          <li class="pager-item"><?php tpl_actionlink('recent') ?></li>
203          <li class="pager-item"><?php tpl_actionlink('login') ?></li>
204          <li class="pager-item"><?php tpl_actionlink('profile') ?></li>
205	      <li class="pager-item"><?php tpl_actionlink('index') ?></li>
206	      <li class="pager-item"><?php tpl_actionlink('admin') ?></li>
207	      <li class="pager-item"><?php tpl_actionlink('top') ?></li>
208	      <li class="pager-item"><?php tpl_actionlink('back') ?></li>
209	      <li class="pager-item"><?php tpl_actionlink('backlink') ?></li>
210	      <li class="pager-item"><?php tpl_actionlink('subscribe') ?></li>
211        </ul>
212      </div>
213    </div><!-- /page -->
214
215    <div id="footer" class="clearfix">
216      <div id="footer-wrapper">
217        <div id="footer-message"><!--&copy; 2010 Caldwell Pics-->FOOTER MESSAGE</div>
218        <div id="closure">CLOSURE MESSAGE</div>
219          <div id="legal-notice">Theme provided under GPL license from <a href="http://www.topnotchthemes.com">Drupal themes</a> <br/>Modified by Mark Gardner of <a href="http://www.gtopia.org">Gtopia</a></div>
220        </div><!-- /closure -->
221      </div><!-- /footer-wrapper -->
222    </div><!-- /footer -->
223<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
224  </body>
225</html>
226