Hi all, this should works
Edit mod/custom_index/views/default/canvas/layouts/new_index.php, add the following where you want the pictures to show up
<?php
if(is_plugin_enabled('tidypics')){
$photos = get_entities('object', 'image', 0, 0, 12, false, false);
if(isset($photos)) {
echo '<div class="index_box">';
echo '<h2>'.elgg_echo("Latest images").'</h2>';
$counter = 0;
echo '<div class="frontpage_tidypics_box">';
?>
<!-- display latest photos -->
<?php
foreach ($photos as $photo) {
$counter +=1;
if ($counter == 7){
$counter = 0;
echo "</div>";
echo '<div class="frontpage_tidypics_box">';
}
echo "<div class=\"tidypics_index\">";
echo elgg_view("custom_index/tidypics/icon", array(
'mimetype' => $photo->mimetype
,'thumbnail' => $photo->thumbnail
,'file_guid' => $photo->guid
,'link' => $photo->getUrl()
,'size' => 'small'
));
echo "</div>";
}
?>
</div>
</div>
<?php
}
}
?>
This Code works for me perfectly:
<?php
}
if (is_plugin_enabled('tidypics')) {
?>
<!-- display latest photos -->
<div class="index_box">
<h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("Najnowsze Zdięcia"); ?></a></h2>
<div class="contentWrapper">
<?php
echo tp_get_latest_photos(12);
?>
</div>
</div>
________________________________________________________________________
You can see result of this code on my frontpage
Hi rogal
can u please help me by telling how to implement this code ? where to post it ?
PLeas Im a total newbie in here :)
Hi all, this should works
Edit mod/custom_index/views/default/canvas/layouts/new_index.php, add the following where you want the pictures to show up
<?php
if(is_plugin_enabled('tidypics')){
$photos = get_entities('object', 'image', 0, 0, 12, false, false);
if(isset($photos)) {
echo '<div class="index_box">';
echo '<h2>'.elgg_echo("Latest images").'</h2>';
$counter = 0;
echo '<div class="frontpage_tidypics_box">';
?>
<!-- display latest photos -->
<?php
foreach ($photos as $photo) {
$counter +=1;
if ($counter == 7){
$counter = 0;
echo "</div>";
echo '<div class="frontpage_tidypics_box">';
}
echo "<div class=\"tidypics_index\">";
echo elgg_view("custom_index/tidypics/icon", array(
'mimetype' => $photo->mimetype
,'thumbnail' => $photo->thumbnail
,'file_guid' => $photo->guid
,'link' => $photo->getUrl()
,'size' => 'small'
));
echo "</div>";
}
?>
</div>
</div>
<?php
}
}
?>
This Code works for me perfectly:
<?php
}
if (is_plugin_enabled('tidypics')) {
?>
<!-- display latest photos -->
<div class="index_box">
<h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("Najnowsze Zdięcia"); ?></a></h2>
<div class="contentWrapper">
<?php
echo tp_get_latest_photos(12);
?>
</div>
</div>
________________________________________________________________________
You can see result of this code on my frontpage
Hi rogal
can u please help me by telling how to implement this code ? where to post it ?
PLeas Im a total newbie in here :)
Hi all, this should works
Edit mod/custom_index/views/default/canvas/layouts/new_index.php, add the following where you want the pictures to show up
<?php
if(is_plugin_enabled('tidypics')){
$photos = get_entities('object', 'image', 0, 0, 12, false, false);
if(isset($photos)) {
echo '<div class="index_box">';
echo '<h2>'.elgg_echo("Latest images").'</h2>';
$counter = 0;
echo '<div class="frontpage_tidypics_box">';
?>
<!-- display latest photos -->
<?php
foreach ($photos as $photo) {
$counter +=1;
if ($counter == 7){
$counter = 0;
echo "</div>";
echo '<div class="frontpage_tidypics_box">';
}
echo "<div class=\"tidypics_index\">";
echo elgg_view("custom_index/tidypics/icon", array(
'mimetype' => $photo->mimetype
,'thumbnail' => $photo->thumbnail
,'file_guid' => $photo->guid
,'link' => $photo->getUrl()
,'size' => 'small'
));
echo "</div>";
}
?>
</div>
</div>
<?php
}
}
?>
This Code works for me perfectly:
<?php
}
if (is_plugin_enabled('tidypics')) {
?>
<!-- display latest photos -->
<div class="index_box">
<h2><a href="<?php echo $vars['url']; ?>pg/photos/world/"><?php echo elgg_echo("Najnowsze Zdięcia"); ?></a></h2>
<div class="contentWrapper">
<?php
echo tp_get_latest_photos(12);
?>
</div>
</div>
________________________________________________________________________
You can see result of this code on my frontpage
Hi rogal
can u please help me by telling how to implement this code ? where to post it ?
PLeas Im a total newbie in here :)
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.