[Fusionforge-commits] r11169 - in trunk/src: . plugins plugins/gravatar plugins/gravatar/common www/images www/themes/css
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Sun Oct 24 18:12:03 CEST 2010
Author: aljeux
Date: 2010-10-24 18:12:02 +0200 (Sun, 24 Oct 2010)
New Revision: 11169
Added:
trunk/src/plugins/gravatar/
trunk/src/plugins/gravatar/common/
trunk/src/plugins/gravatar/common/gravatarPlugin.class.php
trunk/src/www/images/img-shadow.gif
trunk/src/www/images/img-shadowAlpha.png
Modified:
trunk/src/CHANGES
trunk/src/fusionforge.spec
trunk/src/www/themes/css/fusionforge.css
Log:
New gravatar plugin for fusionforge
Modified: trunk/src/CHANGES
===================================================================
--- trunk/src/CHANGES 2010-10-24 15:27:26 UTC (rev 11168)
+++ trunk/src/CHANGES 2010-10-24 16:12:02 UTC (rev 11169)
@@ -11,6 +11,7 @@
* New blocks plugin, to add free HTML blocks on top of each tools of the project allowing
admins to add free descriptions (Alcate-Lucent), (better with fckeditor plugin).
* New unobstructive tooltip system based on jquery and tipsy to replace old help window (Alcatel-Lucent)
+* New gravatar plugin to display faces of users using the Gravatar service (Alain Peyrat)
FusionForge-5.0.2:
* Maintenance release, bugfixes mostly.
Modified: trunk/src/fusionforge.spec
===================================================================
--- trunk/src/fusionforge.spec 2010-10-24 15:27:26 UTC (rev 11168)
+++ trunk/src/fusionforge.spec 2010-10-24 16:12:02 UTC (rev 11169)
@@ -1,7 +1,7 @@
#
# RPM spec file for FusionForge
#
-# Developed for 4.8 by JL Bond Consulting
+# Initial work for 4.8 by JL Bond Consulting
# Reworked for 5.1 by Alain Peyrat <aljeux at free.fr>
#
# TODO: Generate a random password to avoid sites with default pass.
@@ -118,6 +118,13 @@
%description fckeditor
FCKEditor is a WYSIWYG text editor that displays within a web browser.
+%package gravatar
+Summary: Gravatar plugin for FusionForge
+Group: Development/Tools
+Requires: %{name} >= %{version}, php
+%description gravatar
+This plugin adds faces images to FusionForge users using the gravatar service.
+
%package ldapextauth
Summary: external LDAP authentication for FusionForge plugin
Group: Development/Tools
@@ -714,6 +721,9 @@
%{GFORGE_DIR}/plugins/fckeditor
%{GFORGE_DIR}/www/plugins/fckeditor
+%files gravatar
+%{GFORGE_DIR}/plugins/gravatar
+
%files ldapextauth
%config(noreplace) %{GFORGE_CONF_DIR}/plugins/ldapextauth/
%{GFORGE_DIR}/plugins/ldapextauth
Added: trunk/src/plugins/gravatar/common/gravatarPlugin.class.php
===================================================================
--- trunk/src/plugins/gravatar/common/gravatarPlugin.class.php (rev 0)
+++ trunk/src/plugins/gravatar/common/gravatarPlugin.class.php 2010-10-24 16:12:02 UTC (rev 11169)
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Gravatar Plugin
+ *
+ * Copyright 2010 (c) Alain Peyrat <aljeux at free.fr>
+ *
+ * This file is part of FusionForge
+ *
+ * FusionForge is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will
+ * be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
+ */
+
+class gravatarPlugin extends Plugin {
+
+ function gravatarPlugin () {
+ $this->Plugin() ;
+ $this->name = "gravatar" ;
+ $this->text = _('Gravatar Plugin');
+ $this->hooks[] = 'user_logo';
+ }
+
+ function user_logo (&$params) {
+ $user_id = $params['user_id'];
+ $size = isset($params['size'])? $params['size']: 'm';
+ $code = $this->getHtml($user_id, $size);
+ if (isset($params['content'])) {
+ $params['content'] = $code;
+ } else {
+ echo $code;
+ }
+ }
+
+ private function getEmail($user_id) {
+ $res = db_query_params('SELECT email FROM users WHERE user_id=$1', array($user_id));
+ if ($res) {
+ return db_result($res, 0, 'email');
+ }
+ return false;
+ }
+
+ private function getHtml($user_id, $size) {
+ if ($email = $this->getEmail($user_id)) {
+ $hash = md5( strtolower( trim( $email ) ) );
+
+ $url = 'http://www.gravatar.com/avatar/';
+ if (isset($_SERVER['HTTPS']))
+ $url = 'https://secure.gravatar.com/avatar';
+
+ if ($size == 'l')
+ $usize = '130';
+ if ($size == 'm')
+ $usize = 48;
+ if ($size == 's')
+ $usize = 28;
+ if ($size == 'xs')
+ $usize = 16;
+
+ $url .= $hash.'?s='. $usize;
+ $class = 'img-shadow-'.$size;
+ return '<div class="'.$class.'"><img src="'.$url.'" class="gravatar" alt="" /></div>';
+ }
+ return '';
+ }
+}
Added: trunk/src/www/images/img-shadow.gif
===================================================================
--- trunk/src/www/images/img-shadow.gif (rev 0)
+++ trunk/src/www/images/img-shadow.gif 2010-10-24 16:12:02 UTC (rev 11169)
@@ -0,0 +1,32 @@
+GIF89a ÷ ÊÊÊËËËÍÍÍÐÐÐÑÑÑÓÓÓØØØÜÜÜÝÝÝÞÞÞâââéééêêêëëëîîîòòòööö÷÷÷øøøùùùüüüýýýþþþÿÿÿÿÿÿ !ù , þ 1H° Á*\È°¡Ã#JH±¢Å3jÜȱ£Ç CI²¤É8À 0cÊI³¦Í8sêÜɳ§O*YºüI´¨Ñ£H*]Ê´©ÓA[¾|JµªÕ«X³jÝÊõiÔ¡]ÃK¶¬Ù³h}~¶Û·pãÊëu¥TºxóêÝË·¯_kÿ
+L¸°áÃ;#^̸±ãÇ*L¹²å˵NÎ̹³çÏ MnMº´éÓ¨1Nͺµë×WÃM»¶í®²oëÞÍ»wb»`}N¼8ÈÜÆ+_Î\5p¶Í£K~9õëسg¶®½»÷ï¹þO¾¼[ñæÓ«_=û÷ðã«}.¿¾ýû¿
BÇÏ¿¿ÿãôý'àNä^&Èß
+6èàz>(áÝEHá
2gavØÛ(âk hâ¡â,V¦b0ÆxØ2Öhã^4Þ¨ãçÈã@úcDYÕF&©äQH.éä95 åT¢$eXféÑZvé%E\~)æ
+
Iæhæ_ªÉæXº çOÊIçFÚç?êÉç6ú è -
+Jè¡&è¢*Êè£:
+é¤
+JJé¥Zé¦ýiÊé§õy
+ê¨ìJê©åêªÞ©Êê«þ×¹
+ë¬ÍÉJëÆÙ뮾éÊë¯Õùì°ÿùJ챬첥)Ëì³9í´IKíµYí¶iËí·á î¸Kî¹Åyîºr©Ëî»m¹ï¼eÉKクᄃÙËï¿TùðÀK LðÁFðÂ=)ÌðÃ89ñÄ3ILñÅ'YñÆ@éËñÇxiòÈLòÉ`zòÊõªÌòËùêóÌ-ËLóÍ1ß
óÎYÌ3Í>ÿsÐB³LtÑ(4ÉJ/
+rÓNsuÔOM5ÅV_
+qÖZ3Ìu×
+6Áb
+pÙfóvÚø®Í6½n¿
+oÜr³KwÝèÞ7þ¹zï
+nß~sxàØN8µmâ3ËxãÈ>9±Olåóyæ¸nÎ9k袳Jzé¨:©ª¯jë®s
+{ìÎN;¥¶ßiîº3Ê{ïþ<¡ÂhñÆó|òx.Ï<Î?gôÒ³I}õiº½Ö×o?f÷Þ·©}øNO¾æçøê~ûS¾ìϳüö+þyÖÏÿÐþûÑ(À¤°L; ¦ÀJ¬#µ Rpk¼ ×2¨Á°q°dû Ï&ª&l
+S·²pn.|¡Ýb(üѰ|»!ÿ¦Ã
+®þ>,¸!qqF<¢ã¨ÄÈ1±{"/'Å)j®V쳺-rqt^ü¢éÂ(ÆÔ±¬;#_§Æ5Ê®n¬ã»9Òqwv¼£ïò¨Çàñ±Äû# 'ÈA*¯l" ½E2rz|¤õ")ÉìÙ¬ãÚ&ߣÉMBß%C)ÄQ²¦<%S©Ê%²²N|%,£(ËYR±¶¼".s©Å]ò²¾ü%)Ì1³f<&2Ó¨Ìe²±Î|#4£)ÇiR³Ö¼&³©Í=r³~ü&8)Îq²æ<$:Ó©Èu²³î|'$ã)ÏIÒ³þÔ>©Ï}J³þ¬&@Ít=¨7ªÐp2´¡ä|(DÏ)Ѫ³¢m'F3
+Ïrtý¨=C*Ò|§¤=)J/ªÒj´¥.í(Lc
+ÒÒt¤6½©I÷£Ó7u²§ù)P1#Ô¡Z¦¨F¥R-P2Õ?K}jc¢*Õn9µª÷¡*V
+£Õë^eQWÃú±µ/f=+®ªÖOµ"J+\é"×¹¶v%O]óú½ò5^xýk«+Xíøµ°f9,bÉ¢ØÅ¥±ÍYN#[#ÈRV3½l2«ÙåX¶³Vù,hÆÙѦ«´¦hSËÕ²V)®}þ-Rb+Û¡¶¶º¡-n¡rÛÝÖF·¾å p«á7b½=®k«Ü0·¹K.tQóÜ餺ÖÍt³Kìr$ÞýnÇÞ*Þñ·¼9/z;¢Þõn¤½î-Ùvã[ùÒ×Eö½odà«ß·¿Óá/#"à?¤Àn¼38!~ðA",áP¸Â¹0óß
+«6¿.+CÖx>ñn4aWØÅñeÌ`'ØÆÆñu`÷×Çúò}
L_"Ç×ÈîEòz^&×Éâ
òw¥Ì]*g×ÊÖÅòtµ].7×ËÊóqÅL\2×̾EóþnÕ[6×ÖͲ
ókåÌZ:§ÖΦÅóhõZ>wÖÏôeMYBGÖÐEôbXFÖÑ
ô_%ÍWJçÕÒvÅô\5
+WN·ÕÓjõYEMVRÕÔ^EõVUUVWÕÕR
õSeÍTZ'ÕÖFÅõPu
+T^÷Ô×:öM
MSbÇÔØ.EöJRfÔÙ"
öG¥ÍQjgÔÚÅöDµ
+Qn7ÔÛ
+÷AÅMPrÔÜþD÷>ÕOv×ÓÝò÷;åÍNz§ÓÞæÄ÷8õ
+N~wÓßÚø5NMGÓàÎDø2LÓáÂø/%ÎKçÒâ¶Äø,5K·Òãªù)þENJÒäDù&UIWÒåù#eÎH'ÒæÄù uH÷Ñçzú
NG¢ÇÑènDúF¦Ñébú¥ÎEªgÑêVÄúµE®7ÑëJûÅND²Ñì>DûÕC¶×Ðí2ûåÎBº§Ðî&ÄûõB¾wÐïüOAÂGÐðDü@ÆÐñüÿ$Ï?ÊçÏòöÃüü4?ηÏóêýùDO>ÒÏôÞCýöT=ÖWÏõÒýódÏ<Ú'ÏöÆÃýðt<Þ÷Î÷ºþíO;âÇÎø®Cþê:æÎù¢þç¤Ï9êgÎúÃþä´þ9î7ÎûÿáÄO8òÎü~CÿÞÔ7ö×ÍýrÿÛäÏ6ú§ÍþfÃÿØô6þwÍÿÜcb*28sWT£QÃåS¸44X4è>}µX)ö°?C<c;÷ã"x*x3/4,Ø5CR4èY3x:(Y<ÕØ3# @hDø2I8 at FxÝÅNK¸2Sh at M
Q
'£
t
XØ\82aÈ@^ø
Û
fXeG
lØZnø°r8[tX¶µxècø1}ø@z¸ñCþx1XA\u(\8ÅU\"¶Xbø(f¢Ø,X2Ñ£¨HW§øV²(´Xàu¸8^¤¸gè¾½mÄèºxÁÃdÊÈXÉòÔθ0ÙèAÖx\±!ÔÞYäXR8èh ê¸Öîx`ð
+6ôØ`öxú8aüØö a96Éâ80IBçLRÙÿB'ôY¹/©B¼õ Ù0 y/'ÙB"9ù,yW+ùþè2Ù1YÎUýóÂ0t8]@1áïb34D9J¹¶ØNP¼8YTy:©H¹.[iCSyé÷ØçB9ô`É^bIfIkmÉChïõîß?4tY4Ù[¡Û"¥ôÙ3v¹y-JyíèØÓB«ôy$Yù,éJj¢Ù¹,§K¤Y³ÞÇ´´¬²9,·yK´Yɼ®y¹ù+éK»ùDQ»¢½tÈ9¾ùeÔÈ·bÀäÒþÙV¹Þ ÔØ9+å9LÚ7q¯ÂÆêà1Êè«Éôöyúy*ÊLüÙ×õÄ8 £¢ R :¡Z¡z¡¡º¡Ú¡ú¡ ¢":¢$Z¢&z¢(¢*º¢,Ú¢.ú¢0£2:£4Z£6z£ P Ð .1 @¤B:¤DZ¤Fz¤H¤Jº¤LÚ¤Nú¤P¥R:¥TZ¥Vz¥X¥Zº¥\Ú¥^ú¥`¦b:¦dZ¦KJ `
+à Pð¦p§r:§tZ§vz§x§zº§|Ú§~ú§¨:¨öZ¨z¨¨º¨Ú¨ú¨©:©ª§
+° 0À ú© ª¢:ª¤Zª¦zª¨ªªºª¬Úª®úª°«²:«´Z«¶z«¸«ºº«¼Ú«¾ú«À¬Â:¬©Ú
+à `ЬÎú¬ÐÒ:ÔZÖzØÚºÜÚÞúà®â:®äZ®æz®è®êº®ìÚ®îú®ð¯òª0P@úº¯üÚ¯þú¯ °;°[°{°°
+»°Û°û°±;±[±{±±»±Û±û±[`p ;
\ No newline at end of file
Added: trunk/src/www/images/img-shadowAlpha.png
===================================================================
--- trunk/src/www/images/img-shadowAlpha.png (rev 0)
+++ trunk/src/www/images/img-shadowAlpha.png 2010-10-24 16:12:02 UTC (rev 11169)
@@ -0,0 +1,6 @@
+PNG
+
+
+IHDR < E Ò1l +tEXtCreation Time Thu 5 Feb 2004 11:21:22 -0600rj<f tIMEÔ¯<um pHYs ÒÝ~ü gAMA ±üa £IDATxÚíÚQjÛ@@ÑçØBtÿ;
+NìdC7Ý@{Î Aöþ.oó ÀÑÎsZëù
+ Gû5/kÍÏ]x 8Þï¹ìá¹Íz£½Ïç|Ì»ð p¼·¹®ýºíÂÀñ^g+Î~Åà姿ÿÀvµày¯Mx 8Þéïujá %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx H )á %< ¤ð RÂ@Jx 8Þ}_»ËçuÞæ}=¯+C§þ6 þ9÷¹õLÏeùϹΠØÂs]¥ùÚsYÜÖÙ"t ¾Ý6âl¥ù\ÅÙ'¯}Ú¹ÎyíÂÀwÛØgkkæÙB³°×㢠G¹íÎ}n çqÄfÚà(÷y¹ÍùÅ>¬øP- IEND®B`
\ No newline at end of file
Modified: trunk/src/www/themes/css/fusionforge.css
===================================================================
--- trunk/src/www/themes/css/fusionforge.css 2010-10-24 15:27:26 UTC (rev 11168)
+++ trunk/src/www/themes/css/fusionforge.css 2010-10-24 16:12:02 UTC (rev 11169)
@@ -399,3 +399,66 @@
padding: 0px;
color: red;
}
+
+.img-shadow-l {
+ float:left;
+ background: url(../../images/img-shadowAlpha.png) no-repeat bottom right !important;
+ background: url(../../images/img-shadow.gif) no-repeat bottom right;
+ margin: 10px 0 0 10px !important;
+ margin: 10px 0 0 5px;
+}
+
+.img-shadow-l img {
+ display: block;
+ position: relative;
+ background-color: #fff;
+ border: 1px solid #a9a9a9;
+ margin: -6px 6px 6px -6px;
+ padding: 4px;
+}
+
+.img-shadow-s {
+ float:left;
+ background: url(../../images/img-shadowAlpha.png) no-repeat bottom right !important;
+ background: url(../../images/img-shadow.gif) no-repeat bottom right;
+ margin: 4px 0 0 4px !important;
+ margin: 4px 0 0 2px;
+ }
+
+.img-shadow-s img {
+ display: block;
+ position: relative;
+ background-color: #fff;
+ border: 1px solid #a9a9a9;
+ margin: -2px 2px 2px -2px;
+ padding: 2px;
+ }
+
+.img-shadow-xs {
+ float:left;
+ margin-right: 2px;
+}
+
+.img-shadow-xs img {
+ display: block;
+ position: relative;
+ border: 1px solid #a9a9a9;
+ width: auto;
+ height : 16px;
+}
+
+.img-shadow-xs img:hover {
+ height : auto;
+}
+
+.no-img-xs {
+ float: left;
+ margin-right: 2px;
+ width: 15px;
+ height : 18px;
+}
+
+.new_line {
+ clear: left;
+ margin-bottom: 1px;
+}
More information about the Fusionforge-commits
mailing list