add support for moodpic sources and revamp moodpic integration a little bit

This commit is contained in:
oliver 2015-08-20 13:20:49 +02:00
commit 5cb60679e0
37 changed files with 271 additions and 292 deletions

View file

@ -0,0 +1,20 @@
<div class="moodpic">
<div>
<?php if(!is_null($medium)) : ?>
<img src="<?=$medium['url']?>" <?php if(!empty($medium['title'])) : ?>title="<?=$medium['title']?>"<?php endif ?> <?php if(!empty($medium['description'])) : ?>alt="<?=$medium['description']?>"<?php endif ?>/>
<?php if(!empty($medium['sourcelabel']) || !empty($medium['sourceurl'])) : ?>
<?php $label = (!empty($medium['sourcelabel'])) ? $medium['sourcelabel'] : substr($medium['sourceurl'], 0, 30).'…'; ?>
<span class="source">
<?=_('Image source')?>:
<?php if(!empty($medium['sourceurl'])): ?>
<a href="<?=$medium['sourceurl']?>" target="_blank"><?=$label?></a>
<?php else : ?>
<?=$label?>
<?php endif ?>
</span>
<?php endif ?>
<?php else : ?>
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
<?php endif ?>
</div>
</div>