diff options
Diffstat (limited to 'mod/profile/views')
32 files changed, 292 insertions, 1493 deletions
diff --git a/mod/profile/views/default/icon/user/default/large.php b/mod/profile/views/default/icon/user/default/large.php deleted file mode 100644 index 255153174..000000000 --- a/mod/profile/views/default/icon/user/default/large.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaultlarge.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/master.php b/mod/profile/views/default/icon/user/default/master.php deleted file mode 100644 index 51fbc6c8d..000000000 --- a/mod/profile/views/default/icon/user/default/master.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaultmaster.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/medium.php b/mod/profile/views/default/icon/user/default/medium.php deleted file mode 100644 index 30403c954..000000000 --- a/mod/profile/views/default/icon/user/default/medium.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaultmedium.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/small.php b/mod/profile/views/default/icon/user/default/small.php deleted file mode 100644 index 0b458f871..000000000 --- a/mod/profile/views/default/icon/user/default/small.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaultsmall.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/tiny.php b/mod/profile/views/default/icon/user/default/tiny.php deleted file mode 100644 index b2a89439a..000000000 --- a/mod/profile/views/default/icon/user/default/tiny.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaulttiny.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/topbar.php b/mod/profile/views/default/icon/user/default/topbar.php deleted file mode 100644 index f5adc886e..000000000 --- a/mod/profile/views/default/icon/user/default/topbar.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
- echo $vars['url'] . "mod/profile/graphics/defaulttopbar.gif";
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.js b/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.js deleted file mode 100644 index 637332d07..000000000 --- a/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.js +++ /dev/null @@ -1,355 +0,0 @@ -/* - * imgAreaSelect jQuery plugin - * version 0.4.2 - * - * Copyright (c) 2008 Michal Wojciechowski (odyniec.net) - * - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://odyniec.net/projects/imgareaselect/ - * - */ - -jQuery.imgAreaSelect = function (img, options) { - var $area = jQuery('<div></div>'), - $border1 = jQuery('<div></div>'), - $border2 = jQuery('<div></div>'), - $outLeft = jQuery('<div></div>'), - $outTop = jQuery('<div></div>'), - $outRight = jQuery('<div></div>'), - $outBottom = jQuery('<div></div>'), - imgOfs, imgWidth, imgHeight, zIndex = 0, fixed = false, $p, - startX, startY, moveX, moveY, - resizeMargin = 10, resize = [ ], V = 0, H = 1, - d, aspectRatio, - x1, x2, y1, y2, x, y, - selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 }; - - var $a = $area.add($border1).add($border2); - var $o = $outLeft.add($outTop).add($outRight).add($outBottom); - - function update() - { - $a.css({ - left: (selection.x1 + imgOfs.left) + 'px', - top: (selection.y1 + imgOfs.top) + 'px', - width: Math.max(selection.width - options.borderWidth * 2, 0) + 'px', - height: Math.max(selection.height - options.borderWidth * 2, 0) + 'px' - }); - $outLeft.css({ left: imgOfs.left + 'px', top: imgOfs.top + 'px', - width: selection.x1 + 'px', height: imgHeight + 'px' }); - $outTop.css({ left: imgOfs.left + selection.x1 + 'px', top: imgOfs.top + 'px', - width: selection.width + 'px', height: selection.y1 + 'px' }); - $outRight.css({ left: imgOfs.left + selection.x2 + 'px', top: imgOfs.top + 'px', - width: imgWidth - selection.x2 + 'px', height: imgHeight + 'px' }); - $outBottom.css({ left: imgOfs.left + selection.x1 + 'px', top: imgOfs.top + selection.y2 + 'px', - width: selection.width + 'px', height: imgHeight - selection.y2 + 'px' }); - } - - function areaMouseMove(event) - { - x = event.pageX - selection.x1 - imgOfs.left; - y = event.pageY - selection.y1 - imgOfs.top; - - resize = [ ]; - - if (options.resizable) { - if (y <= resizeMargin) - resize[V] = 'n'; - else if (y >= selection.height - resizeMargin) - resize[V] = 's'; - if (x <= resizeMargin) - resize[H] = 'w'; - else if (x >= selection.width - resizeMargin) - resize[H] = 'e'; - } - - $border2.css('cursor', resize.length ? resize.join('') + '-resize' : - options.movable ? 'move' : ''); - } - - function areaMouseDown(event) - { - if (event.which != 1) return false; - - if (options.resizable && resize.length > 0) { - jQuery('body').css('cursor', resize.join('') + '-resize'); - - x1 = (resize[H] == 'w' ? selection.x2 : selection.x1) + imgOfs.left; - y1 = (resize[V] == 'n' ? selection.y2 : selection.y1) + imgOfs.top; - - jQuery(document).mousemove(selectingMouseMove); - $border2.unbind('mousemove', areaMouseMove); - - jQuery(document).one('mouseup', function () { - resize = [ ]; - - jQuery('body').css('cursor', ''); - - if (options.autoHide) - $a.add($o).hide(); - - options.onSelectEnd(img, selection); - - jQuery(document).unbind('mousemove', selectingMouseMove); - $border2.mousemove(areaMouseMove); - }); - } - else if (options.movable) { - moveX = selection.x1 + imgOfs.left; - moveY = selection.y1 + imgOfs.top; - startX = event.pageX; - startY = event.pageY; - - jQuery(document) - .mousemove(movingMouseMove) - .one('mouseup', function () { - options.onSelectEnd(img, selection); - - jQuery(document).unbind('mousemove', movingMouseMove); - }); - } - else - jQuery(img).mousedown(event); - - return false; - } - - function aspectRatioXY() - { - x2 = Math.max(imgOfs.left, Math.min(imgOfs.left + imgWidth, - x1 + Math.abs(y2 - y1) * aspectRatio * (x2 > x1 ? 1 : -1))); - y2 = Math.round(Math.max(imgOfs.top, Math.min(imgOfs.top + imgHeight, - y1 + Math.abs(x2 - x1) / aspectRatio * (y2 > y1 ? 1 : -1)))); - x2 = Math.round(x2); - } - - function aspectRatioYX() - { - y2 = Math.max(imgOfs.top, Math.min(imgOfs.top + imgHeight, - y1 + Math.abs(x2 - x1) / aspectRatio * (y2 > y1 ? 1 : -1))); - x2 = Math.round(Math.max(imgOfs.left, Math.min(imgOfs.left + imgWidth, - x1 + Math.abs(y2 - y1) * aspectRatio * (x2 > x1 ? 1 : -1)))); - y2 = Math.round(y2); - } - - function selectingMouseMove(event) - { - x2 = !resize.length || resize[H] || aspectRatio ? event.pageX : selection.x2 + imgOfs.left; - y2 = !resize.length || resize[V] || aspectRatio ? event.pageY : selection.y2 + imgOfs.top; - - if (options.minWidth && Math.abs(x2 - x1) < options.minWidth) { - x2 = x1 - options.minWidth * (x2 < x1 ? 1 : -1); - - if (x2 < imgOfs.left) - x1 = imgOfs.left + options.minWidth; - else if (x2 > imgOfs.left + imgWidth) - x1 = imgOfs.left + imgWidth - options.minWidth; - } - - if (options.minHeight && Math.abs(y2 - y1) < options.minHeight) { - y2 = y1 - options.minHeight * (y2 < y1 ? 1 : -1); - - if (y2 < imgOfs.top) - y1 = imgOfs.top + options.minHeight; - else if (y2 > imgOfs.top + imgHeight) - y1 = imgOfs.top + imgHeight - options.minHeight; - } - - x2 = Math.max(imgOfs.left, Math.min(x2, imgOfs.left + imgWidth)); - y2 = Math.max(imgOfs.top, Math.min(y2, imgOfs.top + imgHeight)); - - if (aspectRatio) - if (Math.abs(x2 - x1) / aspectRatio > Math.abs(y2 - y1)) - aspectRatioYX(); - else - aspectRatioXY(); - - if (options.maxWidth && Math.abs(x2 - x1) > options.maxWidth) { - x2 = x1 - options.maxWidth * (x2 < x1 ? 1 : -1); - if (aspectRatio) aspectRatioYX(); - } - - if (options.maxHeight && Math.abs(y2 - y1) > options.maxHeight) { - y2 = y1 - options.maxHeight * (y2 < y1 ? 1 : -1); - if (aspectRatio) aspectRatioXY(); - } - - selection.x1 = Math.min(x1, x2) - imgOfs.left; - selection.x2 = Math.max(x1, x2) - imgOfs.left; - selection.y1 = Math.min(y1, y2) - imgOfs.top; - selection.y2 = Math.max(y1, y2) - imgOfs.top; - selection.width = Math.abs(x2 - x1); - selection.height = Math.abs(y2 - y1); - - update(); - - options.onSelectChange(img, selection); - - return false; - } - - function movingMouseMove(event) - { - x1 = Math.max(imgOfs.left, Math.min(moveX + event.pageX - startX, - imgOfs.left + imgWidth - selection.width)); - y1 = Math.max(imgOfs.top, Math.min(moveY + event.pageY - startY, - imgOfs.top + imgHeight - selection.height)); - x2 = x1 + selection.width; - y2 = y1 + selection.height; - - selection.x1 = x1 - imgOfs.left; - selection.y1 = y1 - imgOfs.top; - selection.x2 = x2 - imgOfs.left; - selection.y2 = y2 - imgOfs.top; - - update(); - - options.onSelectChange(img, selection); - event.preventDefault(); - - return false; - } - - function imgMouseDown(event) - { - if (event.which != 1) return false; - - startX = x1 = event.pageX; - startY = y1 = event.pageY; - selection.x1 = selection.x2 = x1 - imgOfs.left; - selection.y1 = selection.y2 = y1 - imgOfs.top; - selection.width = 0; - selection.height = 0; - - resize = [ ]; - - update(); - $a.add($o).show(); - - jQuery(document).mousemove(selectingMouseMove); - $border2.unbind('mousemove', areaMouseMove); - - options.onSelectStart(img, selection); - - jQuery(document).one('mouseup', function () { - if (options.autoHide) - $a.add($o).hide(); - - options.onSelectEnd(img, selection); - - jQuery(document).unbind('mousemove', selectingMouseMove); - $border2.mousemove(areaMouseMove); - }); - - return false; - } - - this.setOptions = function(newOptions) - { - options = jQuery.extend(options, newOptions); - - if (newOptions.x1 != null) { - selection.x1 = newOptions.x1; - selection.y1 = newOptions.y1; - selection.x2 = newOptions.x2; - selection.y2 = newOptions.y2; - newOptions.show = true; - } - - imgWidth = jQuery(img).width(); - imgHeight = jQuery(img).height(); - imgOfs = jQuery(img).offset(); - - $p = jQuery(img); - - while ($p.length && !$p.is('body')) { - if (!isNaN($p.css('z-index')) && $p.css('z-index') > zIndex) - zIndex = $p.css('z-index'); - if ($p.css('position') == 'fixed') fixed = true; - - $p = $p.parent(); - } - - x1 = selection.x1 + imgOfs.left; - y1 = selection.y1 + imgOfs.top; - x2 = selection.x2 + imgOfs.left; - y2 = selection.y2 + imgOfs.top; - selection.width = x2 - x1; - selection.height = y2 - y1; - - update(); - - if (newOptions.hide) - $a.add($o).hide(); - else if (newOptions.show) - $a.add($o).show(); - - $a.css({ borderWidth: options.borderWidth + 'px' }); - $area.css({ backgroundColor: options.selectionColor, opacity: options.selectionOpacity }); - $border1.css({ borderStyle: 'solid', borderColor: options.borderColor1 }); - $border2.css({ borderStyle: 'dashed', borderColor: options.borderColor2 }); - $o.css({ opacity: options.outerOpacity, backgroundColor: options.outerColor }); - - aspectRatio = options.aspectRatio && (d = options.aspectRatio.split(/:/)) ? - d[0] / d[1] : null; - - if (options.disable || options.enable === false) { - $a.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown); - jQuery(img).add($o).unbind('mousedown', imgMouseDown); - } - else if (options.enable || options.disable === false) { - if (options.resizable || options.movable) - $a.mousemove(areaMouseMove).mousedown(areaMouseDown); - - jQuery(img).add($o).mousedown(imgMouseDown); - } - - options.enable = options.disable = undefined; - }; - - if (jQuery.browser.msie) - jQuery(img).attr('unselectable', 'on'); - - $a.add($o).css({ display: 'none', position: fixed ? 'fixed' : 'absolute', overflow: 'hidden', - zIndex: zIndex > 0 ? zIndex : null }); - $area.css({ borderStyle: 'solid' }); - - jQuery('body').append($o.add($a)); - - initOptions = { - borderColor1: '#000', - borderColor2: '#fff', - borderWidth: 1, - movable: true, - resizable: true, - selectionColor: '#fff', - selectionOpacity: 0.2, - outerColor: '#000', - outerOpacity: 0.2, - onSelectStart: function () {}, - onSelectChange: function () {}, - onSelectEnd: function () {} - }; - - options = jQuery.extend(initOptions, options); - this.setOptions(options); -}; - -jQuery.fn.imgAreaSelect = function (options) { - options = options || {}; - - this.each(function () { - if (jQuery(this).data('imgAreaSelect')) - jQuery(this).data('imgAreaSelect').setOptions(options); - else { - if (options.enable === undefined && options.disable === undefined) - options.enable = true; - - jQuery(this).data('imgAreaSelect', new jQuery.imgAreaSelect(this, options)); - } - }); - - return this; -}; diff --git a/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.min.js b/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.min.js deleted file mode 100644 index 0c07deebd..000000000 --- a/mod/profile/views/default/js/jquery.imgareaselect-0.4.2.min.js +++ /dev/null @@ -1 +0,0 @@ -jQuery.imgAreaSelect=function(img,options){var $area=jQuery('<div></div>'),$border1=jQuery('<div></div>'),$border2=jQuery('<div></div>'),$outLeft=jQuery('<div></div>'),$outTop=jQuery('<div></div>'),$outRight=jQuery('<div></div>'),$outBottom=jQuery('<div></div>'),imgOfs,imgWidth,imgHeight,zIndex=0,fixed=false,$p,startX,startY,moveX,moveY,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $a=$area.add($border1).add($border2);var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function update(){$a.css({left:(selection.x1+imgOfs.left)+'px',top:(selection.y1+imgOfs.top)+'px',width:Math.max(selection.width-options.borderWidth*2,0)+'px',height:Math.max(selection.height-options.borderWidth*2,0)+'px'});$outLeft.css({left:imgOfs.left+'px',top:imgOfs.top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:imgOfs.left+selection.x1+'px',top:imgOfs.top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:imgOfs.left+selection.x2+'px',top:imgOfs.top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:imgOfs.left+selection.x1+'px',top:imgOfs.top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'})}function areaMouseMove(event){x=event.pageX-selection.x1-imgOfs.left;y=event.pageY-selection.y1-imgOfs.top;resize=[];if(options.resizable){if(y<=resizeMargin)resize[V]='n';else if(y>=selection.height-resizeMargin)resize[V]='s';if(x<=resizeMargin)resize[H]='w';else if(x>=selection.width-resizeMargin)resize[H]='e'}$border2.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'')}function areaMouseDown(event){if(event.which!=1)return false;if(options.resizable&&resize.length>0){jQuery('body').css('cursor',resize.join('')+'-resize');x1=(resize[H]=='w'?selection.x2:selection.x1)+imgOfs.left;y1=(resize[V]=='n'?selection.y2:selection.y1)+imgOfs.top;jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);jQuery(document).one('mouseup',function(){resize=[];jQuery('body').css('cursor','');if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)})}else if(options.movable){moveX=selection.x1+imgOfs.left;moveY=selection.y1+imgOfs.top;startX=event.pageX;startY=event.pageY;jQuery(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',movingMouseMove)})}else jQuery(img).mousedown(event);return false}function aspectRatioXY(){x2=Math.max(imgOfs.left,Math.min(imgOfs.left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2>x1?1:-1)));y2=Math.round(Math.max(imgOfs.top,Math.min(imgOfs.top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2>y1?1:-1))));x2=Math.round(x2)}function aspectRatioYX(){y2=Math.max(imgOfs.top,Math.min(imgOfs.top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2>y1?1:-1)));x2=Math.round(Math.max(imgOfs.left,Math.min(imgOfs.left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2>x1?1:-1))));y2=Math.round(y2)}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?event.pageX:selection.x2+imgOfs.left;y2=!resize.length||resize[V]||aspectRatio?event.pageY:selection.y2+imgOfs.top;if(options.minWidth&&Math.abs(x2-x1)<options.minWidth){x2=x1-options.minWidth*(x2<x1?1:-1);if(x2<imgOfs.left)x1=imgOfs.left+options.minWidth;else if(x2>imgOfs.left+imgWidth)x1=imgOfs.left+imgWidth-options.minWidth}if(options.minHeight&&Math.abs(y2-y1)<options.minHeight){y2=y1-options.minHeight*(y2<y1?1:-1);if(y2<imgOfs.top)y1=imgOfs.top+options.minHeight;else if(y2>imgOfs.top+imgHeight)y1=imgOfs.top+imgHeight-options.minHeight}x2=Math.max(imgOfs.left,Math.min(x2,imgOfs.left+imgWidth));y2=Math.max(imgOfs.top,Math.min(y2,imgOfs.top+imgHeight));if(aspectRatio)if(Math.abs(x2-x1)/aspectRatio>Math.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&&Math.abs(x2-x1)>options.maxWidth){x2=x1-options.maxWidth*(x2<x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&&Math.abs(y2-y1)>options.maxHeight){y2=y1-options.maxHeight*(y2<y1?1:-1);if(aspectRatio)aspectRatioXY()}selection.x1=Math.min(x1,x2)-imgOfs.left;selection.x2=Math.max(x1,x2)-imgOfs.left;selection.y1=Math.min(y1,y2)-imgOfs.top;selection.y2=Math.max(y1,y2)-imgOfs.top;selection.width=Math.abs(x2-x1);selection.height=Math.abs(y2-y1);update();options.onSelectChange(img,selection);return false}function movingMouseMove(event){x1=Math.max(imgOfs.left,Math.min(moveX+event.pageX-startX,imgOfs.left+imgWidth-selection.width));y1=Math.max(imgOfs.top,Math.min(moveY+event.pageY-startY,imgOfs.top+imgHeight-selection.height));x2=x1+selection.width;y2=y1+selection.height;selection.x1=x1-imgOfs.left;selection.y1=y1-imgOfs.top;selection.x2=x2-imgOfs.left;selection.y2=y2-imgOfs.top;update();options.onSelectChange(img,selection);event.preventDefault();return false}function imgMouseDown(event){if(event.which!=1)return false;startX=x1=event.pageX;startY=y1=event.pageY;selection.x1=selection.x2=x1-imgOfs.left;selection.y1=selection.y2=y1-imgOfs.top;selection.width=0;selection.height=0;resize=[];update();$a.add($o).show();jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);options.onSelectStart(img,selection);jQuery(document).one('mouseup',function(){if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)});return false}this.setOptions=function(newOptions){options=jQuery.extend(options,newOptions);if(newOptions.x1!=null){selection.x1=newOptions.x1;selection.y1=newOptions.y1;selection.x2=newOptions.x2;selection.y2=newOptions.y2;newOptions.show=true}imgWidth=jQuery(img).width();imgHeight=jQuery(img).height();imgOfs=jQuery(img).offset();$p=jQuery(img);while($p.length&&!$p.is('body')){if(!isNaN($p.css('z-index'))&&$p.css('z-index')>zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')fixed=true;$p=$p.parent()}x1=selection.x1+imgOfs.left;y1=selection.y1+imgOfs.top;x2=selection.x2+imgOfs.left;y2=selection.y2+imgOfs.top;selection.width=x2-x1;selection.height=y2-y1;update();if(newOptions.hide)$a.add($o).hide();else if(newOptions.show)$a.add($o).show();$a.css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});aspectRatio=options.aspectRatio&&(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(options.disable||options.enable===false){$a.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);jQuery(img).add($o).unbind('mousedown',imgMouseDown)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$a.mousemove(areaMouseMove).mousedown(areaMouseDown);jQuery(img).add($o).mousedown(imgMouseDown)}options.enable=options.disable=undefined};if(jQuery.browser.msie)jQuery(img).attr('unselectable','on');$a.add($o).css({display:'none',position:fixed?'fixed':'absolute',overflow:'hidden',zIndex:zIndex>0?zIndex:null});$area.css({borderStyle:'solid'});jQuery('body').append($o.add($a));initOptions={borderColor1:'#000',borderColor2:'#fff',borderWidth:1,movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0.2,outerColor:'#000',outerOpacity:0.2,onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}};options=jQuery.extend(initOptions,options);this.setOptions(options)};jQuery.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if(jQuery(this).data('imgAreaSelect'))jQuery(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&&options.disable===undefined)options.enable=true;jQuery(this).data('imgAreaSelect',new jQuery.imgAreaSelect(this,options))}});return this}; diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index e03f32c38..e24f555a9 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -1,124 +1,126 @@ <?php - - /** - * Elgg Profile - * - * @package Profile - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.com/ - */ - +/** + * Elgg Profile CSS + * + * @package Profile + */ ?> - -#profile_icon_wrapper { - float:left; +/* *************************************** + Profile +*************************************** */ +.profile { + float: left; + margin-bottom: 15px; +} +.profile .elgg-inner { + margin: 0 5px; + border: 2px solid #eee; + + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +#profile-details { + padding: 15px; +} +/*** ownerblock ***/ +#profile-owner-block { + width: 200px; + float: left; + background-color: #eee; + padding: 15px; +} +#profile-owner-block .large { + margin-bottom: 10px; +} +#profile-owner-block a.elgg-button-action { + margin-bottom: 4px; + display: table; +} +.profile-content-menu a { + display: block; + + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + + background-color: white; + margin: 3px 0 5px 0; + padding: 2px 4px 2px 8px; +} +.profile-content-menu a:hover { + background: #0054A7; + color: white; + text-decoration: none; +} +.profile-admin-menu { + display: none; +} +.profile-admin-menu-wrapper a { + display: block; + + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + + background-color: white; + margin: 3px 0 5px 0; + padding: 2px 4px 2px 8px; +} +.profile-admin-menu-wrapper { + background-color: white; + + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +.profile-admin-menu-wrapper li a { + background-color: white; + color: red; + margin-bottom: 0; +} +.profile-admin-menu-wrapper a:hover { + color: black; +} +/*** profile details ***/ +#profile-details .odd { + background-color: #f4f4f4; + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + + margin: 0 0 7px; + padding: 2px 4px; +} +#profile-details .even { + background-color:#f4f4f4; + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + + margin: 0 0 7px; + padding: 2px 4px; } +.profile-aboutme-title { + background-color:#f4f4f4; -.usericon { - position:relative; -} - -.avatar_menu_button { - width:15px; - height:15px; - position:absolute; - cursor:pointer; - display:none; - right:0; - bottom:0; -} -.avatar_menu_arrow { - background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left top; - width:15px; - height:15px; -} -.avatar_menu_arrow_on { - background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left -16px; - width:15px; - height:15px; -} -.avatar_menu_arrow_hover { - background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left -32px; - width:15px; - height:15px; -} -.usericon div.sub_menu { - display:none; - position:absolute; - padding:2px; - margin:0; - border-top:solid 1px #E5E5E5; - border-left:solid 1px #E5E5E5; - border-right:solid 1px #999999; - border-bottom:solid 1px #999999; - width:160px; - background:#FFFFFF; - text-align:left; -} -div.usericon a.icon img { - z-index:10; -} - -.usericon div.sub_menu a {margin:0;padding:2px;} -.usericon div.sub_menu a:link, -.usericon div.sub_menu a:visited, -.usericon div.sub_menu a:hover{ display:block;} -.usericon div.sub_menu a:hover{ background:#cccccc; text-decoration:none;} - -.usericon div.sub_menu h3 { - font-size:1.2em; - padding-bottom:3px; - border-bottom:solid 1px #dddddd; - color: #4690d6; - margin:0 !important; -} -.usericon div.sub_menu h3:hover { - -} - -.user_menu_addfriend, -.user_menu_removefriend, -.user_menu_profile, -.user_menu_friends, -.user_menu_friends_of, -.user_menu_blog, -.user_menu_file, -.user_menu_messages, -.user_menu_admin, -.user_menu_pages { - margin:0; - padding:0; -} -.user_menu_admin { - border-top:solid 1px #dddddd; -} -.user_menu_admin a { - color:red; -} -.user_menu_admin a:hover { - color:white !important; - background:red !important; -} - -.resetdefaultprofile { - padding:0 10px 0 10px; -} -.resetdefaultprofile input[type="submit"] { - background: #dedede; - border-color: #dedede; - color:#333333; -} -.resetdefaultprofile input[type="submit"]:hover { - background: red; - border-color: red; - color:white; -} - -/* Banned user */ -#profile_banned { - background-color:#FF8888; - border:3px solid #FF0000; - padding:2px; -}
\ No newline at end of file + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + + margin: 0; + padding: 2px 4px; +} +.profile-aboutme-contents { + padding: 2px 0 0 3px; +} +.profile-banned-user { + border: 2px solid red; + padding: 4px 8px; + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php new file mode 100644 index 000000000..da4e95690 --- /dev/null +++ b/mod/profile/views/default/profile/details.php @@ -0,0 +1,68 @@ +<?php +/** + * Elgg user display (details) + * @uses $vars['entity'] The user entity + */ + +$user = elgg_get_page_owner_entity(); + +$profile_fields = elgg_get_config('profile_fields'); + +echo '<div id="profile-details" class="elgg-body pll">'; +echo "<h2>{$user->name}</h2>"; + +echo elgg_view("profile/status", array("entity" => $user)); + +$even_odd = null; +if (is_array($profile_fields) && sizeof($profile_fields) > 0) { + foreach ($profile_fields as $shortname => $valtype) { + if ($shortname == "description") { + // skip about me and put at bottom + continue; + } + $value = $user->$shortname; + + if (!empty($value)) { + + // fix profile URLs populated by https://github.com/Elgg/Elgg/issues/5232 + // @todo Replace with upgrade script, only need to alter users with last_update after 1.8.13 + if ($valtype == 'url' && $value == 'http://') { + $user->$shortname = ''; + continue; + } + + // validate urls + if ($valtype == 'url' && !preg_match('~^https?\://~i', $value)) { + $value = "http://$value"; + } + + // this controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + ?> + <div class="<?php echo $even_odd; ?>"> + <b><?php echo elgg_echo("profile:{$shortname}"); ?>: </b> + <?php + echo elgg_view("output/{$valtype}", array('value' => $value)); + ?> + </div> + <?php + } + } +} + +if (!elgg_get_config('profile_custom_fields')) { + if ($user->isBanned()) { + echo "<p class='profile-banned-user'>"; + echo elgg_echo('banned'); + echo "</p>"; + } else { + if ($user->description) { + echo "<p class='profile-aboutme-title'><b>" . elgg_echo("profile:aboutme") . "</b></p>"; + echo "<div class='profile-aboutme-contents'>"; + echo elgg_view('output/longtext', array('value' => $user->description, 'class' => 'mtn')); + echo "</div>"; + } + } +} + +echo '</div>';
\ No newline at end of file diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php deleted file mode 100644 index e2eb8f5ce..000000000 --- a/mod/profile/views/default/profile/edit.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php
-
- /**
- * Elgg profile edit form
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
- */
-
-?>
-<div class="contentWrapper">
-<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post">
-
-<?php
-
- //var_export($vars['profile']);
- if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
- foreach($vars['config']->profile as $shortname => $valtype) {
- if ($metadata = get_metadata_byname($vars['entity']->guid, $shortname)) {
- if (is_array($metadata)) {
- $value = '';
- foreach($metadata as $md) {
- if (!empty($value)) $value .= ', ';
- $value .= $md->value;
- $access_id = $md->access_id;
- }
- } else {
- $value = $metadata->value;
- $access_id = $metadata->access_id;
- }
- } else {
- $value = '';
- $access_id = ACCESS_DEFAULT;
- }
-
-?>
-
- <p>
- <label>
- <?php echo elgg_echo("profile:{$shortname}") ?><br />
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $value,
- )); ?>
- </label>
- <?php echo elgg_view('input/access',array('internalname' => 'accesslevel['.$shortname.']', 'value' => $access_id)); ?>
- </p>
-
-<?php
-
- }
-
-?>
-
- <p>
- <input type="hidden" name="username" value="<?php echo page_owner_entity()->username; ?>" />
- <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
- </p>
-
-</form>
-</div>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php deleted file mode 100644 index b65746e01..000000000 --- a/mod/profile/views/default/profile/editdefaultprofile.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - /** - * Elgg profile index - * - * @package ElggProfile - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.com/ - */ - - $label_text = elgg_echo('profile:label'); - $type_text = elgg_echo('profile:type'); - - $label_control = elgg_view('input/text', array('internalname' => 'label')); - $type_control = elgg_view('input/pulldown', array('internalname' => 'type', 'options_values' => array( - 'text' => elgg_echo('text'), - 'longtext' => elgg_echo('longtext'), - 'tags' => elgg_echo('tags'), - 'url' => elgg_echo('url'), - 'email' => elgg_echo('email') - ))); - - $submit_control = elgg_view('input/submit', array('internalname' => elgg_echo('save'), 'value' => elgg_echo('save'))); - - $formbody = <<< END - <p>$label_text: $label_control - $type_text: $type_control - $submit_control</p> -END; - echo "<div class=\"contentWrapper\">"; - echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault')); - echo "</div>"; -?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php deleted file mode 100644 index bb0eb9a13..000000000 --- a/mod/profile/views/default/profile/editicon.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon edit form
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
- */
-
-?>
-<!-- grab the required js for icon cropping -->
-<div class="contentWrapper">
-<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.4.2.js"></script>
-
-<p><?php echo elgg_echo('profile:profilepictureinstructions'); ?></p>
-
-<div id="current_user_avatar">
-
- <label><?php echo elgg_echo('profile:currentavatar'); ?></label>
- <?php
-
- $user_avatar = $_SESSION['user']->getIcon('medium');//$vars['url'] . "pg/icon/" . $_SESSION['user']->username . "/medium/" . $_SESSION['user']->icontime . ".jpg";
- echo "<img src=\"{$user_avatar}\" alt=\"avatar\" />";
-
- ?>
-
-</div>
-
-<div id="profile_picture_form">
- <form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data">
- <p><label><?php echo elgg_echo("profile:editicon"); ?></label><br />
-
- <?php
-
- echo elgg_view("input/file",array('internalname' => 'profileicon'));
-
- ?>
- <br /><input type="submit" class="submit_button" value="<?php echo elgg_echo("upload"); ?>" />
- </p>
- </form>
-</div>
-
-<div id="profile_picture_croppingtool">
-<label><?php echo elgg_echo('profile:profilepicturecroppingtool'); ?></label><br />
-<p>
-<?php
-
- echo elgg_echo("profile:createicon:instructions");
- //display the current user photo
- $user_master_image = $vars['url'] . "pg/icon/" . $_SESSION['user']->username . "/master/" . $_SESSION['user']->icontime . ".jpg";
-
-?>
-</p>
-<script>
-
- //function to display a preview of the users cropped section
- function preview(img, selection) {
- var origWidth = $("#user_avatar").width(); //get the width of the users master photo
- var origHeight = $("#user_avatar").height(); //get the height of the users master photo
- var scaleX = 100 / selection.width;
- var scaleY = 100 / selection.height;
- $('#user_avatar_preview > img').css({
- width: Math.round(scaleX * origWidth) + 'px',
- height: Math.round(scaleY * origHeight) + 'px',
- marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
- marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
- });
- }
-
- //variables for the newly cropped avatar
- var $x1, $y1, $x2, $y2, $w, $h;
-
- function selectChange(img, selection){
-
- //populate the form with the correct coordinates once a user has cropped their image
- document.getElementById('x_1').value = selection.x1;
- document.getElementById('x_2').value = selection.x2;
- document.getElementById('y_1').value = selection.y1;
- document.getElementById('y_2').value = selection.y2;
-
- }
-
- $(document).ready(function () {
-
- //get and set the coordinates
- $x1 = $('#x1');
- $y1 = $('#y1');
- $x2 = $('#x2');
- $y2 = $('#y2');
- $w = $('#w');
- $h = $('#h');
-
-
- $('<div id="user_avatar_preview"><img src="<?php echo $user_master_image; ?>" /></div>')
- .insertAfter($('#user_avatar'));
-
- $('<div id="user_avatar_preview_title"><label>Preview</label></div>').insertBefore($('#user_avatar_preview'));
-
- });
-
- $(window).load(function () {
-
- //this produces the coordinates
- $('#user_avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
- //show the preview
- $('#user_avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
-
- });
-
-</script>
-
-<p>
-<img id="user_avatar" src="<?php echo $user_master_image; ?>" alt="<?php echo elgg_echo("profile:icon"); ?>" />
-</p>
-
-<div class="clearfloat"></div>
-
-<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" />
- <input type="hidden" name="username" value="<?php echo $vars['user']->username; ?>" />
- <input type="hidden" name="x_1" value="<?php echo $vars['user']->x1; ?>" id="x_1" />
- <input type="hidden" name="x_2" value="<?php echo $vars['user']->x2; ?>" id="x_2" />
- <input type="hidden" name="y_1" value="<?php echo $vars['user']->y1; ?>" id="y_1" />
- <input type="hidden" name="y_2" value="<?php echo $vars['user']->y2; ?>" id="y_2" />
- <input type="submit" name="submit" value="<?php echo elgg_echo("profile:createicon"); ?>" />
-</form>
-
-</div>
-<div class="clearfloat"></div>
-
-</div>
diff --git a/mod/profile/views/default/profile/gallery.php b/mod/profile/views/default/profile/gallery.php deleted file mode 100644 index d9fa092cc..000000000 --- a/mod/profile/views/default/profile/gallery.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-
- /**
- * Elgg user display (gallery)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- //grab the users status message with metadata 'state' set to current if it exists
-/* if($get_status = get_entities_from_metadata("state", "current", "object", "status", $vars['entity']->guid)){
-
- foreach($get_status as $s) {
- $info = elgg_view("status/friends_view", array('entity' => $s));
- }
-
- } */
-
- $icon = elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- 'size' => 'medium',
- )
- ); - - $banned = $vars['entity']->isBanned();
- - $rel = ""; - if (page_owner() == $vars['entity']->guid) - $rel = 'me'; - else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) - $rel = 'friend'; - - if (!$banned)
- $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>"; - else - $info .= "<p><b><strike>" . $vars['entity']->name . "</b></strike><br />".elgg_echo('profile:banned')."</p>";
-
- // echo elgg_view_listing($icon, $info);
- echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/hoverover.php b/mod/profile/views/default/profile/hoverover.php deleted file mode 100644 index 65daeafc2..000000000 --- a/mod/profile/views/default/profile/hoverover.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon hover over
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-?>
-
- <p class="user_menu_name">
- <b><?php echo $vars['entity']->name; ?></b>
- </p>
-
-<?php
-
- echo elgg_view("profile/hoverover/actions",$vars);
- echo elgg_view("profile/hoverover/links",$vars);
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php deleted file mode 100644 index ac278f7c1..000000000 --- a/mod/profile/views/default/profile/icon.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
- */
-
- // Get entity
- if (empty($vars['entity']))
- $vars['entity'] = $vars['user'];
-
- if ($vars['entity'] instanceof ElggUser) {
-
- $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8');
- $username = $vars['entity']->username;
-
- if ($icontime = $vars['entity']->icontime) {
- $icontime = "{$icontime}";
- } else {
- $icontime = "default";
- }
-
- // Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
- // Get any align and js
- if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
- } else {
- $align = "";
- }
-
- // Override
- if (isset($vars['override']) && $vars['override'] == true) {
- $override = true;
- } else $override = false;
-
- if (!$override) {
-
-?>
-<div class="usericon">
-<div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
-
- <div class="sub_menu">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><h3><?php echo $vars['entity']->name; ?></h3></a>
- <?php
- if (isloggedin()) {
- $actions = elgg_view('profile/menu/actions',$vars);
- if (!empty($actions)) {
-
- echo "<div class=\"item_line\">{$actions}</div>";
-
- }
- if ($vars['entity']->getGUID() == $vars['user']->getGUID()) {
- echo elgg_view('profile/menu/linksownpage',$vars);
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- ?>
- </div>
- <?php - if ((isadminloggedin()) || (!$vars['entity']->isBanned())) { - ?><a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><?php - }
-
- }
-
- ?><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> /><?php
-
- if (!$override) {
-
- ?></a>
-</div>
-
-<?php
-
- }
- }
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/javascript.php b/mod/profile/views/default/profile/javascript.php deleted file mode 100644 index fef0aef15..000000000 --- a/mod/profile/views/default/profile/javascript.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php
-
- /**
- * Elgg profile image Javascript
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- header("Content-type: text/javascript");
- header("Pragma: public");
- header("Cache-Control: public");
-
-?>
-
-var submenuLayer = 1000;
-
-function setup_avatar_menu() {
-
- // avatar image menu link
- $("div.usericon img").mouseover(function() {
- // find nested avatar_menu_button and show
- $(this.parentNode.parentNode).children("[class=avatar_menu_button]").show();
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
- //$(this.parentNode.parentNode).css("z-index", submenuLayer);
- })
- .mouseout(function() {
- if($(this).parent().parent().find("div.sub_menu").css('display')!="block") {
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(this.parentNode.parentNode).children("[class=avatar_menu_button]").hide();
- }
- else {
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(this.parentNode.parentNode).children("[class=avatar_menu_button]").show();
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
- }
- });
-
-
- // avatar contextual menu
- $(".avatar_menu_button img").click(function(e) {
-
- var submenu = $(this).parent().parent().find("div.sub_menu");
-
- // close submenu if arrow is clicked & menu already open
- if(submenu.css('display') == "block") {
- //submenu.hide();
- }
- else {
- // get avatar dimensions
- var avatar = $(this).parent().parent().parent().find("div.usericon");
- //alert( "avatarWidth: " + avatar.width() + ", avatarHeight: " + avatar.height() );
-
- // move submenu position so it aligns with arrow graphic
- if (e.pageX < 840) { // popup menu to left of arrow if we're at edge of page
- submenu.css("top",(avatar.height()) + "px")
- .css("left",(avatar.width()-15) + "px")
- .fadeIn('normal');
- }
- else {
- submenu.css("top",(avatar.height()) + "px")
- .css("left",(avatar.width()-166) + "px")
- .fadeIn('normal');
- }
-
- // force z-index - workaround for IE z-index bug
- avatar.css("z-index", submenuLayer);
- avatar.find("a.icon img").css("z-index", submenuLayer);
- submenu.css("z-index", submenuLayer+1);
-
- submenuLayer++;
-
- // change arrow to 'on' state
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
- }
-
- // hide any other open submenus and reset arrows
- $("div.sub_menu:visible").not(submenu).hide();
- $(".avatar_menu_button").removeClass("avatar_menu_arrow");
- $(".avatar_menu_button").removeClass("avatar_menu_arrow_on");
- $(".avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(".avatar_menu_button").hide();
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").show();
- //alert("submenuLayer = " +submenu.css("z-index"));
- })
- // hover arrow each time mouseover enters arrow graphic (eg. when menu is already shown)
- .mouseover(function() {
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_hover");
- })
- // if menu not shown revert arrow, else show 'menu open' arrow
- .mouseout(function() {
- if($(this).parent().parent().find("div.sub_menu").css('display')!="block"){
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
- }
- else {
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
- $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
- }
- });
-
- // hide avatar menu if click occurs outside of menu
- // and hide arrow button
- $(document).click(function(event) {
- var target = $(event.target);
- if (target.parents(".usericon").length == 0) {
- $(".usericon div.sub_menu").fadeOut();
- $(".avatar_menu_button").removeClass("avatar_menu_arrow");
- $(".avatar_menu_button").removeClass("avatar_menu_arrow_on");
- $(".avatar_menu_button").removeClass("avatar_menu_arrow_hover");
- $(".avatar_menu_button").hide();
- }
- });
-
-
-}
-
-$(document).ready(function() {
-
- setup_avatar_menu();
-
-});
diff --git a/mod/profile/views/default/profile/js.php b/mod/profile/views/default/profile/js.php new file mode 100644 index 000000000..5a08a90bd --- /dev/null +++ b/mod/profile/views/default/profile/js.php @@ -0,0 +1,9 @@ + +// force the first column to at least be as large as the profile box in cols 2 and 3 +// we also want to run before the widget init happens so priority is < 500 +elgg.register_hook_handler('init', 'system', function() { + // only do this on the profile page's widget canvas. + if ($('.profile').length) { + $('#elgg-widget-col-1').css('min-height', $('.profile').outerHeight(true) + 1); + } +}, 400); diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php deleted file mode 100644 index 8771a6574..000000000 --- a/mod/profile/views/default/profile/listing.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php
-
- /**
- * Elgg user display (small)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- $icon = elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- 'size' => 'small',
- )
- );
-
- $banned = $vars['entity']->isBanned();
-
- // Simple XFN
- $rel = "";
- if (page_owner() == $vars['entity']->guid)
- $rel = 'me';
- else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
- $rel = 'friend';
-
- if (!$banned) {
- $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
- //create a view that a status plugin could extend - in the default case, this is the wire
- $info .= elgg_view("profile/status", array("entity" => $vars['entity']));
-
- $location = $vars['entity']->location;
- if (!empty($location)) {
- $info .= "<p class=\"owner_timestamp\">" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
- }
- }
- else
- {
- $info .= "<p><b><strike>";
- if (isadminloggedin())
- $info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
- $info .= $vars['entity']->name;
- if (isadminloggedin())
- $info .= "</a>";
- $info .= "</strike></b></p>";
-
- //$info .= "<p class=\"owner_timestamp\">" . elgg_echo('profile:banned') . "</p>";
-
- }
-
- echo elgg_view_listing($icon, $info);
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/actions.php b/mod/profile/views/default/profile/menu/actions.php deleted file mode 100644 index d348831c1..000000000 --- a/mod/profile/views/default/profile/menu/actions.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon hover over: actions
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
- if (isloggedin()) {
- if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
- if ($vars['entity']->isFriend()) {
- echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:remove") . "</a></p>";
- } else {
- echo "<p class=\"user_menu_addfriend\"><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}\">" . elgg_echo("friend:add") . "</a></p>";
- }
- }
- }
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php deleted file mode 100644 index 16f601892..000000000 --- a/mod/profile/views/default/profile/menu/adminlinks.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - /** - * Profile admin context links - * - * @package ElggProfile - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The user entity - */ - - if (isadminloggedin()){ - if ($_SESSION['id']!=$vars['entity']->guid){ - - $ts = time(); - $token = generate_action_token($ts); - -?> - <a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a> - <?php - if (!$vars['entity']->isBanned()) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - } - - echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - - echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - - if (!$vars['entity']->admin) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); - } - } - } -?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/adminwrapper.php b/mod/profile/views/default/profile/menu/adminwrapper.php deleted file mode 100644 index dbbf4b038..000000000 --- a/mod/profile/views/default/profile/menu/adminwrapper.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php
-
- $adminlinks = elgg_view('profile/menu/adminlinks',$vars);
-
- if (!empty($adminlinks)) {
-
- echo "<p class=\"user_menu_admin\">{$adminlinks}</p>";
-
- }
-
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/links.php b/mod/profile/views/default/profile/menu/links.php deleted file mode 100644 index ccbe5748f..000000000 --- a/mod/profile/views/default/profile/menu/links.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon hover over: passive links
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-?>
-
- <p class="user_menu_profile">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
- </p>
- <p class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
- </p>
- <p class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
- </p>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php deleted file mode 100644 index 52e700760..000000000 --- a/mod/profile/views/default/profile/menu/linksownpage.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php
-
- /**
- * Elgg profile icon / profile links: passive links when looking at your own icon / profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-?>
-
- <p class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
- </p>
- <p class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
- </p>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php index 2ca9718d9..52048b8a7 100644 --- a/mod/profile/views/default/profile/metatags.php +++ b/mod/profile/views/default/profile/metatags.php @@ -1,21 +1,16 @@ -<?php
-
- /**
- * Adds metatags to load Javascript required for the profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
- /*
- * <script type="text/javascript" src="<?php echo $vars['url']; ?>pg/iconjs/profile.js" ></script>
- */
-
-?>
+<?php +/** + * FOAF + * + * @package ElggProfile + * + */ - <?php if ($owner = page_owner_entity()) { ?><link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" /><?php } ?> -
+$owner = elgg_get_page_owner_entity(); + +if (elgg_instanceof($owner, 'user')) { +?> + <link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo current_page_url(); ?>?view=foaf" /> +<?php + +} diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php new file mode 100644 index 000000000..63cb5391a --- /dev/null +++ b/mod/profile/views/default/profile/owner_block.php @@ -0,0 +1,66 @@ +<?php +/** + * Profile owner block + */ + +$user = elgg_get_page_owner_entity(); + +if (!$user) { + // no user so we quit view + echo elgg_echo('viewfailure', array(__FILE__)); + return TRUE; +} + +$icon = elgg_view_entity_icon($user, 'large', array( + 'use_hover' => false, + 'use_link' => false, +)); + +// grab the actions and admin menu items from user hover +$menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array()); +$builder = new ElggMenuBuilder($menu); +$menu = $builder->getMenu(); +$actions = elgg_extract('action', $menu, array()); +$admin = elgg_extract('admin', $menu, array()); + +$profile_actions = ''; +if (elgg_is_logged_in() && $actions) { + $profile_actions = '<ul class="elgg-menu profile-action-menu mvm">'; + foreach ($actions as $action) { + $profile_actions .= '<li>' . $action->getContent(array('class' => 'elgg-button elgg-button-action')) . '</li>'; + } + $profile_actions .= '</ul>'; +} + +// if admin, display admin links +$admin_links = ''; +if (elgg_is_admin_logged_in() && elgg_get_logged_in_user_guid() != elgg_get_page_owner_guid()) { + $text = elgg_echo('admin:options'); + + $admin_links = '<ul class="profile-admin-menu-wrapper">'; + $admin_links .= "<li><a rel=\"toggle\" href=\"#profile-menu-admin\">$text…</a>"; + $admin_links .= '<ul class="profile-admin-menu" id="profile-menu-admin">'; + foreach ($admin as $menu_item) { + $admin_links .= elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); + } + $admin_links .= '</ul>'; + $admin_links .= '</li>'; + $admin_links .= '</ul>'; +} + +// content links +$content_menu = elgg_view_menu('owner_block', array( + 'entity' => elgg_get_page_owner_entity(), + 'class' => 'profile-content-menu', +)); + +echo <<<HTML + +<div id="profile-owner-block"> + $icon + $profile_actions + $content_menu + $admin_links +</div> + +HTML; diff --git a/mod/profile/views/default/profile/profilelinks.php b/mod/profile/views/default/profile/profilelinks.php deleted file mode 100644 index b61ff028d..000000000 --- a/mod/profile/views/default/profile/profilelinks.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php
-
- /**
- * Elgg profile links
- * We need to make sure that the correct links display depending on whether you are looking at your own
- * profile or someone else's
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-?>
-
-<?php
- - $banned = false; - $owner = page_owner_entity(); - if ($owner) $banned = $owner->isBanned(); - - // Allow menus if not banned or admin logged in - if ((!$banned) || (isadminloggedin())) - {
- //check to see if the user is looking at their own profile
- if ($_SESSION['user']->guid == page_owner()){
-
- echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
- echo elgg_view("profile/menu/actions",$vars);//grab action links such as make friend
- echo elgg_view("profile/menu/linksownpage",$vars); // an different view for user's own profile
- echo "</div>"; //close wrapper div
-
- } else {
-
- echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
- echo elgg_view("profile/menu/actions",$vars); //grab action links such as make friend
- echo elgg_view("profile/menu/links",$vars); //passive links to items such as user blog etc
- echo "</div>"; //close wrapper div
-
- }
- } - else - { // Some nice spacing - echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div - echo "</div>"; //close wrapper div - }
-?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/submenu.php b/mod/profile/views/default/profile/submenu.php deleted file mode 100644 index be089b2da..000000000 --- a/mod/profile/views/default/profile/submenu.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php
-
- /**
- * Elgg profile submenu links
- * These sit in the submenu when the profile editing is on view
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- */
-
-?>
-
-<ul>
- <li><a href="<?php echo $CONFIG->wwwroot . "mod/profile/edit.php"; ?>"><?php echo elgg_echo('profile:details'); ?></a></li>
- <li><a href="<?php echo $CONFIG->wwwroot."mod/profile/editicon.php"; ?>"><?php echo elgg_echo('profile:editicon'); ?></a></li>
- <li><a href="<?php echo $CONFIG->wwwroot."pg/profile/" . $_SESSION['user']->username; ?>"><?php echo elgg_echo('profile:back'); ?></a></li>
-</ul>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php deleted file mode 100644 index 9cc415dd5..000000000 --- a/mod/profile/views/default/profile/userdetails.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php
-
- /**
- * Elgg user display (details)
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity
- */
-
- if ($vars['full'] == true) {
- $iconsize = "large";
- } else {
- $iconsize = "medium";
- }
-
- // wrap all profile info
- echo "<div id=\"profile_info\">";
-
-?>
-
-<table cellspacing="0">
-<tr>
-<td>
-
-<?php
-
- // wrap the icon and links in a div
- echo "<div id=\"profile_info_column_left\">";
-
- echo "<div id=\"profile_icon_wrapper\">";
- // get the user's main profile picture
- echo elgg_view(
- "profile/icon", array(
- 'entity' => $vars['entity'],
- //'align' => "left",
- 'size' => $iconsize,
- 'override' => true,
- )
- );
-
-
- echo "</div>";
- echo "<div class=\"clearfloat\"></div>";
- // display relevant links
- echo elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
-
- // close profile_info_column_left
- echo "</div>";
-
-?>
-</td>
-<td>
-
- <div id="profile_info_column_middle" >
- <?php
-
- if ($vars['entity']->canEdit()) {
-
- ?>
- <p class="profile_info_edit_buttons">
- <a href="<?php echo $vars['url']; ?>mod/profile/edit.php?username=<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("profile:edit"); ?></a>
- </p>
- <?php
-
- }
-
- ?>
-
-
-
- <?php
-
- // Simple XFN
- $rel = "";
- if (page_owner() == $vars['entity']->guid)
- $rel = 'me';
- else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
- $rel = 'friend';
-
- // display the users name
- echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></h2>";
-
- //insert a view that can be extended
- echo elgg_view("profile/status", array("entity" => $vars['entity']));
-
- if ($vars['full'] == true) {
-
- ?>
- <?php
- $even_odd = null;
-
- if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
- foreach($vars['config']->profile as $shortname => $valtype) {
- if ($shortname != "description") {
- $value = $vars['entity']->$shortname;
- if (!empty($value)) {
-
- //This function controls the alternating class
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
-
-
- ?>
- <p class="<?php echo $even_odd; ?>">
- <b><?php
-
- echo elgg_echo("profile:{$shortname}");
-
- ?>: </b>
- <?php
-
- echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
-
- ?>
-
- </p>
-
- <?php
- }
- }
- }
-
- }
-
- ?>
- </div><!-- /#profile_info_column_middle -->
-
-</td>
-</tr>
-<?php if (!isset($CONFIG->profile_using_custom)) {?>
-<tr>
-<td colspan="2">
- <div id="profile_info_column_right">
- <p class="profile_aboutme_title"><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
-
- <?php if ($vars['entity']->isBanned()) { ?>
- <div id="profile_banned">
- <?php
- echo elgg_echo('profile:banned');
- ?>
- </div><!-- /#profile_info_column_right -->
-
- <?php } else { ?>
-
- <?php echo autop(filter_tags($vars['entity']->description)); ?>
-
- <?php } ?>
-
- </div><!-- /#profile_info_column_right -->
-
-</td>
-
-
-
-</tr>
-<?php } ?>
-
-</table>
-
-
-
-</div><!-- /#profile_info -->
diff --git a/mod/profile/views/default/profile/wrapper.php b/mod/profile/views/default/profile/wrapper.php new file mode 100644 index 000000000..73b7934f2 --- /dev/null +++ b/mod/profile/views/default/profile/wrapper.php @@ -0,0 +1,12 @@ +<?php +/** + * Profile info box + */ + +?> +<div class="profile elgg-col-2of3"> + <div class="elgg-inner clearfix"> + <?php echo elgg_view('profile/owner_block'); ?> + <?php echo elgg_view('profile/details'); ?> + </div> +</div>
\ No newline at end of file diff --git a/mod/profile/views/default/river/user/default/profileiconupdate.php b/mod/profile/views/default/river/user/default/profileiconupdate.php deleted file mode 100644 index 464f07abc..000000000 --- a/mod/profile/views/default/river/user/default/profileiconupdate.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php
-
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("profile:river:iconupdate"),$url);
- $string .= "<div class=\"river_content\">" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small', 'override' => 'true')) . "</div>";
-
-?>
-
-<?php echo $string; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/river/user/default/profileupdate.php b/mod/profile/views/default/river/user/default/profileupdate.php deleted file mode 100644 index 8f3690ae2..000000000 --- a/mod/profile/views/default/river/user/default/profileupdate.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php
-
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("profile:river:update"),$url);
-
-?>
-
-<?php echo $string; ?>
\ No newline at end of file |
