Skip to content

Instantly share code, notes, and snippets.

@cloud-walker
Last active May 6, 2016 09:55
Show Gist options
  • Save cloud-walker/969304cc1eedac3cb932 to your computer and use it in GitHub Desktop.
Save cloud-walker/969304cc1eedac3cb932 to your computer and use it in GitHub Desktop.
Epic Code
<p class="isArrivedAndIsBeautifull" style="font-size: 2em;color: #333;text-align: center;">&Egrave; arrivata... ed &egrave; bellissima!</p>
<? $c=0; foreach($ebookLink[$ebook] as $myEbook){?>
<? if($c==0){$c++; continue;} $c++; ?>
<? if($c == 4){?> <div class="clear"></div><? } ?>
<div class="ebookContainer staticPagesBox respoColumn third rightspace">
<div style="padding:7px;">
<a href="<?= $myEbok['url'] ?>" class="ebookPreview">
<img src="/images/usabilita6/statics/ebook/ebook_<?= $ebook.'_'.$c; ?>.png" class="respoImg100">
</a>
<h2 class="ebookTitle">
<?= $myEbook['title'] ?>
</h2>
<h3 class="ebookText">
<?= $myEbook['desc'] ?>
</h3>
<a href="<?= $myEbook['url'] ?>" class="ebbokDownloadButton ui blue big button">
<? if(LANG == "it") { ?>
DOWNLOAD GRATIS
<? } else { ?>
DOWNLOAD FOR FREE
<? } ?>
</a>
</div>
</div>
<? } ?>
// PISCIOTT CODE
$('.something').each(function () {
$(this).hide();
});
<?php
function getCountry($identifier = false)
{
if ($identifier) {
return $this->country();
}
return $this->country();
}
<?php
// Notare che è una action del controller, quindi chiamabile da chiunque (anche dagli utenti)
function normalizetradAction()
{
$this->disableRendering();
$section = file_get_contents('application/languages/en_EN/messages.po');
$pattern = '@(msgid ".*")@i';
preg_match_all($pattern, $section, $allMsgForContent);
$c = 0;
if (count($allMsgForContent[0]) > 0) {
foreach ($allMsgForContent[0] as $singleMsg) {
$path_to_file = 'application/languages/ru_RU/messages.po';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace(strtolower($singleMsg), $singleMsg, $file_contents);
file_put_contents($path_to_file, $file_contents);
}
}
}
<?php
$cache = Zend_Registry::get('cacheOutput');
$count = 0;
# DA SPOSTARE
/**
* Funzione anomina che si va generare
* la URI per i vari links del popup
*
* @param string $lang la sigla del linguaggio
* di cui si vuole generare
* la URI.
* @return string
*/
$parseURI = function ($fragment) {
return $this->docsityUrl(
$this->url(array(), LANG . $fragment),
$this->urlSubdomain()
);
}
?>
<? //if (!($cache->start('landing_we_are'. LANG .'_'. $this->Country()->getId()))): ?>
<? if (!LANG=='it'): ?>
<style>
.staticVoice.first {
margin-left: 143px;
}
</style>
<? endif ?>
<?= $this->partial('index/partials/staticsMenu.phtml', array('sel' => 'about-us')) ?>
<div class="whoWeAreMainSection staticMainSection">
<h1 class="ui dividing black header">
<?= $this->title ?>
</h1>
<? foreach ($this->members as $member): ?>
<? if ($count == 3): ?>
<div class="clear"></div>
<div class="whoWeAreSection">
<? $count = 0 ?>
<? endif ?>
<div class="whoWeAreContainer staticPagesBox respoColumn third <? if($count % 3 || $count): echo 'rightspace'; endif ?>">
<div style="padding:1em;">
<div style="text-align:center;margin-bottom:0.8em;">
<img src="/public/images/index/staff/<?= $member['staff_image'] ?>" alt="" style="width:75%">
</div>
<p class="whoWeAreName" style="color:<?= $member['staff_color'] ?>">
<?= $member['staff_name'] ?>
</p>
<div class="whoWeAreBubble">
<p>
<b><?= $this->translate('static_who_we_are_age') ?></b>:
<?= $member['staff_age'] ?>
</p>
<p>
<b>
<?= $this->translate('static_who_we_are_profile') ?>
</b>:
<a href="<?= $member['staff_profile_link'] ?>">Link</a>
</p>
<p>
<b>
<?= $this->translate('static_who_we_are_studies') ?>
</b>:
<?= $member['staff_studies'] ?>
</p>
<p>
<b>
<?= $this->translate('static_who_we_are_about_me') ?>
</b>:
<?= $member['staff_description'] ?>
</p>
<p>
<b>
<?= $this->translate('static_who_we_are_more') ?>
</b>:
<?= $member['staff_statement'] ?>
</p>
</div>
</div>
</div>
<? $count++ ?>
<? endforeach ?>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<? //$cache->end() ?>
<? //endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment