diff --git a/private/lib/gui/GUIHandler.php b/private/lib/gui/GUIHandler.php index ce89427..bb2d50b 100644 --- a/private/lib/gui/GUIHandler.php +++ b/private/lib/gui/GUIHandler.php @@ -164,9 +164,9 @@ class GUIHandler {
-
+
BANNER
-
+
BANNER
@@ -276,5 +276,54 @@ class GUIHandler { $url = self::getBaseUrl()."fbMetadata.php?id=".$notizia->id; return 'window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent("'.$url.'"))'; } + + public static function generateRightBannerBlock(){ + $lastsNews = GlobalVariables::get("dao")->query("NotiziaModel", + array("status"=>NotiziaModel::STATUS_ACCEPTED), + array("sort"=>array("about.data"=>-1),"limit"=>5) + ); + if (sizeof($lastsNews)>0){ + $lastsNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $lastsNews); + } + + $mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile', + 'Maggio', 'Giugno', 'Luglio', 'Agosto', + 'Settembre', 'Ottobre', 'Novembre','Dicembre'); + + ?> +
+
+
Guarda anche
+
BANNER
+
BANNER
+
+
+
+
+
Più Letti
+
+
+ 0){ + foreach($lastsNews as $last){ + $data = $mesi[date("n",$last->about->data->sec)]." ".date("Y",$last->about->data->sec); + $string = (strlen($last->titolo) > 103) ? substr($last->titolo,0,100).'...' : $last->titolo;?> +
+
+
+ +
+ +
+
+
+
Guarda anche
+
BANNER
+
BANNER
+
+
+ + \ No newline at end of file diff --git a/public/articolo.php b/public/articolo.php index 79b1fcc..38f47ae 100644 --- a/public/articolo.php +++ b/public/articolo.php @@ -62,7 +62,7 @@ try {
> renderMedia(array("size"=>MediaRenderer::SIZE_BIG)); + $media->renderMedia(array("size"=>MediaRenderer::SIZE_MEDIUM)); } ?>
@@ -122,9 +122,7 @@ try {
-
Riquadro Banner Rotanti
-
Più Letti
-
Riquadro Banner Non Rotanti
+
query("NotiziaModel", array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>$category))), array("sort"=>array("about.data"=>-1),"limit"=>10) ); - } + } else{ GUIHandler::redirect("index.php"); } - + }catch(GUIException $ex){ $error = $ex->getMessage(); @@ -36,8 +37,9 @@ try{ GUIHandler::generateHeadPublic(); GUIHandler::generateMenu();?>
- titolo) > 103) ? substr($notizia->titolo,0,100).'...' : $notizia->titolo; $stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? substr($notizia->sottotitolo,0,70).'...' : $notizia->sottotitolo; $stringTesto = (strlen($notizia->testo) > 33) ? substr($notizia->testo,0,30).'...' : $notizia->testo; @@ -45,18 +47,27 @@ try{ ?>
renderMedia(array("size"=>MediaRenderer::SIZE_SMALL)):"" ;?>
-
+
-
+
+
-
+
+ +
+ GUIHandler::generateFooter();?> \ No newline at end of file diff --git a/public/style/public.css b/public/style/public.css index 095dca9..e10e5f6 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -231,12 +231,12 @@ body{font-family:lato, arial;} .middleRightBanner{width:220px;overflow:hidden;} .middleRightBanner > img{max-width:220px; max-heigth:200px;} -.lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} -.lastContainer:last-child {border-bottom: none;} -.lastData{font-size:12px;} -.lastTitle{font-size:12px;font-weight:bold;} -.lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;} -.lastContinua a{color:#64bff0;} +.reader > .lastContainer, .lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} +.reader > .lastContainer:last-child, .lastContainer:last-child {border-bottom: none;} +.reader > .lastData, .lastData{font-size:12px;} +.reader > .lastTitle, .lastTitle{font-size:12px;font-weight:bold;} +.reader > .lastContinua, .lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;} +.reader > .lastContinua a, .lastContinua a{color:#64bff0;} .gossipContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;} .gossipContainer#gossip_2{border-bottom:none;} @@ -274,7 +274,7 @@ body{font-family:lato, arial;} .headArticolo{margin-bottom:25px;} -.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;} +.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;text-align:center;} .articoloTitle{display:inline-block;width:550px;padding:0px 20px;vertical-align:top;} .articoloTitle > .title{font-size:20px;font-weight:bold;text-transform:uppercase;font-family:"Arial Bold";} @@ -319,15 +319,36 @@ body{font-family:lato, arial;} .articoloRightBar{vertical-align:top;} -.rotoBanner{} -.reader{} -.notRotoBanner{} + +.categorySummaryContainer{width:600px;padding:5px 10px 5px 0px;vertical-align:top;display:inline-block;} +.categorySummaryContainer > .notiziaContainer{border:solid #d6d6d6 1px;margin-bottom:5px;padding:5px;} +.notiziaContainer > .notiziaImage{display:inline-block;vertical-align:middle;text-align:center;} +.notiziaContainer > .notiziaInfo{display:inline-block;width:430px;padding:10px;vertical-align:middle;cursor:pointer;} +.notiziaInfo > .notiziaTitolo{font-weight:bold;padding:5px;} +.notiziaInfo > .notiziaSottotitolo{padding:5px;} +.notiziaInfo > .notiziaTesto{padding:5px;color:#1a9ee9;font-weight:bold;} + +.summaryRightBar{width:370px;padding:5px;vertical-align:top;display:inline-block;} +.rightBarContainer{width:100%;height:100%;} -.categorySummaryContainer{width:600px;padding:5px 10px;vertical-align:top;} -.notiziaContainer > .notiziaImage{display:inline-block;} -.notiziaContainer > .notiziaInfo{display:inline-block;width:430px;padding:10px;} -.summaryRightBar{width:300px;padding:5px;vertical-align:top;} \ No newline at end of file + +.bannerContainer{width:45%;padding:5px;display:inline-block;} + +/* + ____ +| __ ) __ _ _ __ _ __ ___ _ __ +| _ \ / _` | '_ \| '_ \ / _ \ '__| +| |_) | (_| | | | | | | | __/ | +|____/ \__,_|_| |_|_| |_|\___|_| + +*/ + + +.rotoBanner{border:solid #d6d6d6 1px;padding:5px;margin-bottom:5px;} +.reader{border:solid #d6d6d6 1px;padding:5px;margin-bottom:5px;} +.rotoBanner .not{} +