Skip to content
Snippets Groups Projects
Commit aeecfc28 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

Update plugins/mobile to version 1.6

parent d82c0b66
No related branches found
No related tags found
No related merge requests found
Showing
with 644 additions and 0 deletions
<?php
/**
* View a list of entities
*
* @package Elgg
* @author Curverider Ltd <info@elgg.com>
* @link http://elgg.com/
*
*/
$context = $vars['context'];
$offset = $vars['offset'];
$entities = $vars['entities'];
$limit = $vars['limit'];
$count = $vars['count'];
$baseurl = $vars['baseurl'];
$context = $vars['context'];
$viewtype = $vars['viewtype'];
$pagination = $vars['pagination'];
$fullview = $vars['fullview'];
$html = "";
$nav = "";
if (isset($vars['viewtypetoggle'])) {
$viewtypetoggle = $vars['viewtypetoggle'];
} else {
$viewtypetoggle = true;
}
if ($context == "search" && $count > 0 && $viewtypetoggle) {
$nav .= elgg_view('navigation/viewtype', array(
'baseurl' => $baseurl,
'offset' => $offset,
'count' => $count,
'viewtype' => $viewtype,
));
}
if ($pagination) {
$nav .= elgg_view('navigation/pagination',array(
'baseurl' => $baseurl,
'offset' => $offset,
'count' => $count,
'limit' => $limit,
));
}
$html .= $nav;
if ($viewtype == 'list') {
if (is_array($entities) && sizeof($entities) > 0) {
foreach($entities as $entity) {
$html .= elgg_view_entity($entity, $fullview);
}
}
} else {
if (is_array($entities) && sizeof($entities) > 0) {
$html .= elgg_view('entities/gallery', array('entities' => $entities));
}
}
if ($count) {
$html .= $nav;
}
echo $html;
\ No newline at end of file
<?php
/**
* Elgg entity listing
*
* @package Elgg
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
*/
?>
<div class="search_listing">
<div class="search_listing_icon">
<?php
echo $vars['icon'];
?>
</div>
<div class="search_listing_info">
<?php
echo $vars['info'];
?>
</div>
</div>
<?php
/**
* Elgg gallery view
*
* @package Elgg
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
*/
$entities = $vars['entities'];
if (is_array($entities) && sizeof($entities) > 0) {
?>
<table class="entity_gallery">
<?php
$col = 0;
foreach($entities as $entity) {
if ($col == 0) {
echo "<tr>";
}
echo "<td class=\"entity_gallery_item\">";
echo elgg_view_entity($entity);
echo "</td>";
$col++;
if ($col > 1) {
echo "</tr>";
$col = 0;
}
}
if ($col > 0) echo "</tr>";
?>
</table>
<?php
}
\ No newline at end of file
<?php
/**
* Elgg entity listing: gallery view
*
* @package Elgg
* @subpackage Core
* @author Curverider Ltd
* @link http://elgg.org/
*/
?>
<div class="search_listing">
<div class="search_listing_header">
<?php
echo $vars['icon'];
?>
</div>
<div class="search_listing_info">
<?php
echo $vars['info'];
?>
</div>
</div>
\ No newline at end of file
<?php
/**
* File CSS extender
*
* @package Elgg File Repository
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider <info@elgg.com>
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.org/
*/
?>
p.filerepo_owner {
margin:0;
padding:0;
}
.filerepo_owner_details {
margin:0;
padding:0;
line-height: 1.2em;
}
.filerepo_owner_details small {
color:#666666;
}
.filerepo_owner .usericon {
margin: 3px 5px 5px 0;
float: left;
}
.filerepo_download a {
font: 12px/100% Arial, Helvetica, sans-serif;
font-weight: bold;
color: white;
background:#4690d6;
border:none;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
width: auto;
height: 25px;
padding: 3px 6px 3px 6px;
margin:10px 0 10px 0;
cursor: pointer;
}
.filerepo_download a:hover {
background: black;
color:white;
text-decoration: none;
}
/* FILE REPRO WIDGET VIEW */
.filerepo_widget_singleitem {
margin:0 0 5px 0;
padding:5px;
min-height:60px;
display:block;
background:white;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
}
.filerepo_widget_singleitem_more {
margin:0;
padding:5px;
display:block;
background:white;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
}
.filerepo_listview_icon {
float: left;
margin-right: 10px;
}
.filerepo_timestamp {
color:#666666;
margin:0;
}
.filerepo_listview_desc {
display:none;
padding:0 10px 10px 0;
line-height: 1.2em;
}
.filerepo_listview_desc p {
color:#333333;
}
.filerepo_widget_content {
margin-left: 70px;
}
.filerepo_title {
margin:0;
padding:6px 5px 0 0;
line-height: 1.2em;
color:#666666;
font-weight: bold;
}
.collapsable_box #filerepo_widget_layout {
margin:0 10px 0 10px;
background: none;
}
/* widget gallery view */
#filerepo_widget_layout .filerepo_widget_galleryview {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
background: white;
margin:0 0 5px 0;
}
.filerepo_widget_galleryview img {
padding:0;
border:1px solid white;
margin:4px;
}
.filerepo_widget_galleryview img:hover {
border:1px solid #333333;
}
/* SINGLE ITEM VIEW */
.filerepo_file {
background:white;
margin:10px 10px 0 10px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
}
.filerepo_file .filerepo_title_owner_wrapper {
min-height:60px;
}
.filerepo_title_owner_wrapper .filerepo_title,
.filerepo_title_owner_wrapper .filerepo_owner {
margin-left: 70px !important;
}
.filerepo_file .filerepo_maincontent {
padding:0 20px 0 0;
}
.filerepo_file .filerepo_icon {
width: 70px;
position: absolute;
margin:10px 0 10px 10px;
}
.filerepo_file .filerepo_title {
margin:0;
padding:7px 4px 10px 10px;
line-height: 1.2em;
}
.filerepo_file .filerepo_owner {
padding:0 0 0 10px;
}
.filerepo_file .filerepo_description {
margin:10px 0 0 0;
padding:0 0 0 10px;
}
.filerepo_download,
.filerepo_controls {
padding:0 0 1px 10px;
margin:0 0 10px 0;
}
.filerepo_file .filerepo_description p {
padding:0 0 5px 0;
margin:0;
}
.filerepo_file .filerepo_specialcontent img {
padding:10px;
margin:0 0 0 10px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
background: black;
}
/* zaudio player */
.filerepo_maincontent .filerepo_specialcontent {
margin:0 0 20px 0;
}
.filerepo_tags {
padding:0 0 10px 10px;
margin:0;
}
/* file repro gallery items */
.search_gallery .filerepo_controls {
padding:0;
}
.search_gallery .filerepo_title {
font-weight: bold;
line-height: 1.1em;
margin:0 0 10px 0;
}
.filerepo_gallery_item {
margin:0;
padding:0;
text-align:center;
}
.filerepo_gallery_item p {
margin:0;
padding:0;
}
.filerepo_gallery_item .filerepo_controls {
margin-top:10px;
}
.filerepo_gallery_item .filerepo_controls a {
padding-right:10px;
padding-left:10px;
}
.search_gallery .filerepo_comments {
font-size:90%;
}
.filerepo_user_gallery_link {
float:right;
margin:5px 5px 5px 50px;
}
.filerepo_user_gallery_link a {
padding:2px 25px 5px 0;
background: transparent url(<?php echo $vars['url']; ?>_graphics/icon_gallery.gif) no-repeat right top;
display:block;
}
.filerepo_user_gallery_link a:hover {
background-position: right -40px;
}
/* IE6 */
* html #description_tbl { width:676px !important;}
<?php
// Latest forum discussion for the group home page
//check to make sure this group forum has been activated
if($vars['entity']->files_enable != 'no'){
?>
<script type="text/javascript">
$(document).ready(function () {
$('a.show_file_desc').click(function () {
$(this.parentNode).children("[class=filerepo_listview_desc]").slideToggle("fast");
return false;
});
}); /* end document ready function */
</script>
<div id="filerepo_widget_layout">
<h2><?php echo elgg_echo("file:group"); ?></h2>
<?php
//the number of files to display
$number = (int) $vars['entity']->num_display;
if (!$number)
$number = 10;
//get the group's files
$files = elgg_get_entities(array('type' => 'object',
'subtype' => 'file',
'container_guid' => $vars['entity']->guid,
'limit' => $number,
));
//if there are some files, go get them
if ($files) {
//display in list mode
foreach($files as $f){
$mime = $f->mimetype;
echo "<div class=\"filerepo_widget_singleitem\">";
echo "<div class=\"filerepo_listview_icon\"><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
echo "<div class=\"filerepo_widget_content\">";
echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\">" . $f->title . "</p></div>";
echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
$description = $f->description;
if (!empty($description)) echo "<a href=\"javascript:void(0);\" class=\"show_file_desc\">". elgg_echo('more') ."</a><br /><div class=\"filerepo_listview_desc\">" . $description . "</div>";
echo "</div><div class=\"clearfloat\"></div></div>";
}
//get a link to the users files
$users_file_url = $vars['url'] . "pg/file/" . page_owner_entity()->username;
echo "<div class=\"forum_latest\"><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>";
} else {
echo "<div class=\"forum_latest\">" . elgg_echo("file:none") . "</div>";
}
?>
<div class="clearfloat" /></div>
</div>
<?php
}//end of activate check statement
?>
\ No newline at end of file
<?php
/**
* Elgg file icons.
* Displays an icon, depending on its mime type, for a file.
* Optionally you can specify a size.
*
* @package ElggFile
* @author Curverider Ltd
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
global $CONFIG;
$mime = $vars['mimetype'];
// is this request for an image thumbnail
if (isset($vars['thumbnail'])) {
$thumbnail = $vars['thumbnail'];
} else {
$thumbnail = false;
}
// default size is small for thumbnails
if (isset($vars['size'])) {
$size = $vars['size'];
} else {
$size = 'small';
}
// Handle
switch ($mime)
{
case 'image/jpg' :
case 'image/jpeg' :
case 'image/pjpeg' :
case 'image/png' :
case 'image/x-png' :
case 'image/gif' :
case 'image/bmp' :
if ($thumbnail) {
echo "<img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />";
} else {
if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) {
echo elgg_view("file/icon/{$mime}", $vars);
} else if (!empty($mime) && elgg_view_exists("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
echo elgg_view("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars);
} else {
echo "<img src=\"". elgg_view('file/icon/default',$vars) ."\" border=\"0\" />";
}
}
break;
default :
if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) {
echo elgg_view("file/icon/{$mime}", $vars);
} else if (!empty($mime) && elgg_view_exists("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
echo elgg_view("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars);
} else {
echo "<img src=\"". elgg_view('file/icon/default',$vars) ."\" border=\"0\" />";
}
break;
}
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
<?php
echo elgg_view('file/icon/archive',$vars);
?>
\ No newline at end of file
<?php
echo elgg_view('file/icon/archive',$vars);
?>
\ No newline at end of file
<?php
echo elgg_view('file/icon/archive',$vars);
?>
\ No newline at end of file
<?php
echo elgg_view('file/icon/archive',$vars);
?>
\ No newline at end of file
<?php
if ($vars['size'] == 'large') {
$ext = '_lrg';
} else {
$ext = '';
}
echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />";
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment