fb sucks huge cock
This commit is contained in:
parent
d1a8b74159
commit
1e81733289
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$neopolimatrix_config=array(array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.mojotrollz.eu/web/Neopolimatrix/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.neopolimatrix.eu/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/Neopolimatrix/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, \SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
|
||||
@ -9,9 +9,9 @@ $neopolimatrix_config=array(array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREP
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'dajsabeaisvd345'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'host_neopolimatrix'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG, '/web/system/sai/page/img/logo.png'),//not working, cuz paths are not set yet! \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/img/logo.png')),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL, 'http://www.mojotrollz.eu/web/Neopolimatrix/sai.php?'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL, 'http://www.neopolimatrix.eu/sai.php?'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE, 'Neopolimatrix - Admin Bereich'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT, '<a href="" target="_blank"></a> © WebCraft Media 2013'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT, '<a href="http://www.neopolimatrix.eu/" target="_blank"></a> © WebCraft Media 2013'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'system/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE')),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
|
||||
|
||||
@ -9,5 +9,5 @@ require_once 'config.php';
|
||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_neopolimatrix', array_merge($_POST,$_GET), 1, true, true)->html();
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_neopolimatrix', array_merge($_POST,$_GET), 1, false, true)->html();
|
||||
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");
|
||||
@ -7,11 +7,35 @@ class default_article extends \SYSTEM\PAGE\Page {
|
||||
$this->article_id = $id;
|
||||
}
|
||||
|
||||
public static function js(){
|
||||
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_article/js/default_article.js'));}
|
||||
|
||||
private static function time_elapsed_string($ptime){
|
||||
$etime = time() - $ptime;
|
||||
if ($etime < 1){
|
||||
return '0 seconds';}
|
||||
|
||||
$a = array( 12 * 30 * 24 * 60 * 60 => 'year',
|
||||
30 * 24 * 60 * 60 => 'month',
|
||||
24 * 60 * 60 => 'day',
|
||||
60 * 60 => 'hour',
|
||||
60 => 'minute',
|
||||
1 => 'second');
|
||||
|
||||
foreach ($a as $secs => $str){
|
||||
$d = $etime / $secs;
|
||||
if ($d >= 1){
|
||||
$r = round($d);
|
||||
return $r . ' ' . $str . ($r > 1 ? 's' : '') . ' ago';}
|
||||
}
|
||||
}
|
||||
|
||||
public function get_text(){
|
||||
$result = '';
|
||||
$element = elements::getText($this->article_id);
|
||||
$element['title'] = $element['id'];
|
||||
$element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y');
|
||||
$element['ago'] = $this->time_elapsed_string(strtotime($element['timestamp']));
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_article/tpl/element.tpl'), $element);
|
||||
return $result;
|
||||
}
|
||||
|
||||
4
neopolimatrix/page/default_article/js/default_article.js
Normal file
4
neopolimatrix/page/default_article/js/default_article.js
Normal file
@ -0,0 +1,4 @@
|
||||
function init_article(){
|
||||
|
||||
FB.XFBML.parse(document.body);
|
||||
}
|
||||
@ -1,10 +1,16 @@
|
||||
<button class="btn btn-default">zurück</button><br><br>
|
||||
<div class="list_element" text_id="${tag_id}" style="width: 750px; margin: auto; margin-bottom: 50px; padding: 20px;">
|
||||
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author}</i></p>
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${timestamp}</p>
|
||||
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">${ago}</p>
|
||||
<div style="clear: both;"></div>
|
||||
<div style="border-top: solid 1px black; width: 100%;"></div>
|
||||
<h2>${title}</h2>
|
||||
<br>
|
||||
${deDE}
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${published}</p>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div class="fb-comments" data-href="http://www.neopolimatrix.eu/#article;article.${tag_id}" data-numposts="20" data-colorscheme="light"></div>
|
||||
</div>
|
||||
@ -28,12 +28,34 @@ class default_list extends \SYSTEM\PAGE\Page {
|
||||
|
||||
}
|
||||
|
||||
private static function time_elapsed_string($ptime){
|
||||
$etime = time() - $ptime;
|
||||
if ($etime < 1){
|
||||
return '0 seconds';}
|
||||
|
||||
$a = array( 12 * 30 * 24 * 60 * 60 => 'year',
|
||||
30 * 24 * 60 * 60 => 'month',
|
||||
24 * 60 * 60 => 'day',
|
||||
60 * 60 => 'hour',
|
||||
60 => 'minute',
|
||||
1 => 'second');
|
||||
|
||||
foreach ($a as $secs => $str){
|
||||
$d = $etime / $secs;
|
||||
if ($d >= 1){
|
||||
$r = round($d);
|
||||
return $r . ' ' . $str . ($r > 1 ? 's' : '') . ' ago';}
|
||||
}
|
||||
}
|
||||
|
||||
public function generate_list(){
|
||||
$result = '';
|
||||
$tag = $this->filter;
|
||||
$elements = elements::getAllElementsOfTag($this->switch_filter($tag));
|
||||
foreach($elements as $element){
|
||||
$element['title'] = $element['id'];
|
||||
$element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y');
|
||||
$element['ago'] = $this->time_elapsed_string(strtotime($element['timestamp']));
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/tpl/element.tpl'), $element);
|
||||
}
|
||||
return $result;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
function init_start(){
|
||||
$(".list_element").click(function(){
|
||||
system.load('article;article.'+$(this).attr('text_id'))});
|
||||
system.load('article;article.'+$(this).attr('text_id'));
|
||||
});
|
||||
}
|
||||
@ -1,10 +1,12 @@
|
||||
<div class="list_element" text_id="${tag_id}" style="width: 750px; margin: auto; margin-bottom: 50px; padding: 20px;">
|
||||
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author}</i></p>
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${timestamp}</p>
|
||||
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">${ago}</p>
|
||||
<div style="clear: both;"></div>
|
||||
<div style="border-top: solid 1px black; width: 100%;"></div>
|
||||
<h2>${title}</h2>
|
||||
<br>
|
||||
${deDE}
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${published}</p>
|
||||
<br>
|
||||
</div>
|
||||
@ -2,8 +2,10 @@ $(document).ready(function() {
|
||||
new SYSTEM('./api.php',1,'start;filter.1');
|
||||
tabs();
|
||||
impressum();
|
||||
FB.XFBML.parse(document.body);
|
||||
});
|
||||
|
||||
|
||||
function impressum(){
|
||||
$("#btn_impressum").click(function(){
|
||||
system.load('impressum');});
|
||||
|
||||
@ -8,9 +8,28 @@
|
||||
${js}
|
||||
</head>
|
||||
<body>
|
||||
<div id="fb-root"></div>
|
||||
<script>
|
||||
window.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
appId : '636780903092531',
|
||||
xfbml : true,
|
||||
version : 'v2.2'
|
||||
});
|
||||
};
|
||||
|
||||
(function(d, s, id){
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
</script>
|
||||
<div style="margin: auto;">
|
||||
<img src="http://www.mojotrollz.eu/web/smaLi/api.php?call=files&cat=files&id=neopolimatrix.png"/>
|
||||
<div style="float: right; text-align: left;">
|
||||
<div style="position: absolute; right: 0; top: 30; text-align: left; width: 350px;">
|
||||
<div class="fb-like" data-href="https://www.neopolimatrix.eu/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
||||
<a href="http://www.mojotrollz.eu/web/Neopolimatrix">Blog</a>
|
||||
<a href="#" id="btn_impressum">Impressum</a>
|
||||
</div>
|
||||
@ -21,12 +40,12 @@
|
||||
<div class="tabbable" style="margin-bottom: 20px;">
|
||||
<p style="padding-top: 10px; font-size: 13pt; margin-right: 30px; margin-left: 7px; float: left;">Nach Themen</p>
|
||||
<ul class="nav nav-tabs" id="tabs_user_list">
|
||||
<li class="active"><a href="#" filter="1">Neu</a></li>
|
||||
<li><a href="#" filter="6">Demokratie</a></li>
|
||||
<li><a href="#" filter="2">Überwachung</a></li>
|
||||
<li><a href="#" filter="3">Ungleichheit</a></li>
|
||||
<li><a href="#" filter="4">Korruption</a></li>
|
||||
<li><a href="#" filter="5">Polizei</a></li>
|
||||
<li class="active"><a href="#start;filter.1" filter="1">Neu</a></li>
|
||||
<li><a href="#start;filter.6" filter="6">Demokratie</a></li>
|
||||
<li><a href="#start;filter.2" filter="2">Überwachung</a></li>
|
||||
<li><a href="#start;filter.3" filter="3">Ungleichheit</a></li>
|
||||
<li><a href="#start;filter.4" filter="4">Korruption</a></li>
|
||||
<li><a href="#start;filter.5" filter="5">Polizei</a></li>
|
||||
<button style="float: right; margin-top: 7px; margin-right: 7px; padding: 2px;"class="btn btn-info" id="nav_search_btn">los geht's!</button>
|
||||
<input style="float: right; margin-top: 7px; margin-right: 7px;" type="text" id="nav_search" placeholder="Suchbegriff eingeben">
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user