From: <dj...@us...> - 2013-03-12 14:42:04
|
Revision: 10227 http://xoops.svn.sourceforge.net/xoops/?rev=10227&view=rev Author: djculex Date: 2013-03-12 14:41:53 +0000 (Tue, 12 Mar 2013) Log Message: ----------- Adding: class/publicWall.php adding: publicindex.php adding: templates for public postings Adding: Missing image Added Paths: ----------- XoopsModules/smallworld/trunk/smallworld/class/publicWall.php XoopsModules/smallworld/trunk/smallworld/images/image_missing.png XoopsModules/smallworld/trunk/smallworld/publicindex.php XoopsModules/smallworld/trunk/smallworld/templates/getmorepublic.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_publicindex.html Added: XoopsModules/smallworld/trunk/smallworld/class/publicWall.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/publicWall.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/class/publicWall.php 2013-03-12 14:41:53 UTC (rev 10227) @@ -0,0 +1,349 @@ +<?php +/** +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program 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. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/smallworld/class/wall.php $ +* @Last committed: $Revision: 9502 $ +* @Last changed by: $Author: djculex $ +* @Last changed date: $Date: 2012-05-13 18:15:22 +0200 (sø, 13 maj 2012) $ +* @ID: $Id: wall.php 9502 2012-05-13 16:15:22Z djculex $ +**/ + + + +// Moderrated and fitted from the tutorial by Srinivas Tamada http://9lessons.info + +class Public_Wall_Updates +{ + + private function getAdminModerators() + { + global $xoopsDB, $xoopsUser; + $sql = "SELECT userid + FROM ".$xoopsDB->prefix('smallworld_user')." su + left JOIN ".$xoopsDB->prefix('groups_users_link')." xu ON su.userid = xu.uid + WHERE xu.uid in (1)"; + $result = $xoopsDB->queryF($sql); + while ($row = $xoopsDB->fetchArray($result)) { + $data[]=$row; + } + + } + /** + * @Get array of updates + * @param int $last + * @param int $uid + * @param array $followes + * @return array + */ + public function Updates($last,$moderators) { + global $xoopsUser, $xoopsDB, $moduleConfig; + $hm = smallworld_GetModuleOption('msgtoshow'); + $set = smallworld_checkPrivateOrPublic (); + $mods = implode(",",Smallworld_array_flatten(array_unique($moderators),0)); + $i=0; + //Get array of users permitted to post on public index page (normally admin moderators etc etc) + + + if ($last == 0) { + $query = "SELECT M.msg_id, M.uid_fk, M.priv, M.message, M.created, U.username FROM ".$xoopsDB->prefix('smallworld_messages') + . " M, ".$xoopsDB->prefix('smallworld_user')." U WHERE M.uid_fk=U.userid and M.priv = '0'"; + } elseif ($last > 0) { + $query = "SELECT M.msg_id, M.uid_fk, M.priv, M.message, M.created, U.username FROM " + . $xoopsDB->prefix('smallworld_messages')." M, ".$xoopsDB->prefix('smallworld_user') + . " U WHERE M.uid_fk=U.userid and M.priv = '0' and M.msg_id < '".$last."'"; + } elseif ($last == 'a') { + $query = "SELECT M.msg_id, M.uid_fk, M.priv, M.message, M.created, U.username FROM " + . $xoopsDB->prefix('smallworld_messages')." M, ".$xoopsDB->prefix('smallworld_user') + . " U WHERE M.uid_fk=U.userid and M.priv = '0'"; + } + + if (is_array($moderators)){ + foreach ($moderators as $k => $v) { + if ($last>0) { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$v."' and M.priv= '0' and M.msg_id < '".$last."'"; + } elseif ($last == 0) { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$v."' and M.priv= '0' "; + } elseif ($last == 'a') { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$v."' and M.priv= '0' "; + } + $i++; + } + } + if (!is_array($moderators)) { + if ($last > 0) { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$moderators."' and M.priv= '0' and M.msg_id < '".$last."'"; + } elseif ($last == 0) { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$moderators."' and M.priv= '0' "; + } elseif ($last == 'a') { + $query .= " OR M.uid_fk=U.userid and M.uid_fk= '".$moderators."' and M.priv= '0' "; + } + } + + if ($last>0) { + $query .= " order by created DESC LIMIT ".$hm; + } elseif ($last == 'a') { + $query .= " order by M.msg_id DESC LIMIT ".$hm; + } else { + $query .= " order by created DESC LIMIT ".$hm; + } + + $result=$xoopsDB->queryF($query); + $count = $xoopsDB->getRowsNum($result); + if ($count == 0) { + return false; + } else { + while ($row = $xoopsDB->fetchArray($result)) { + $data[]=$row; + } + + if(!empty($data)) { + return $data; + } + } + } + + /** + * @Get comments based on msg id + * @param int $msg_id + * @return array + */ + public function Comments($msg_id) + { + global $xoopsUser, $xoopsDB; + $query = "SELECT C.msg_id_fk, C.com_id, C.uid_fk, C.comment, C.created, U.username FROM " + . $xoopsDB->prefix('smallworld_comments')." C, ".$xoopsDB->prefix('smallworld_user') + . " U WHERE C.uid_fk=U.userid and C.msg_id_fk='".$msg_id."' order by C.com_id asc "; + $result = $xoopsDB->queryF($query); + $i = $xoopsDB->getRowsNum($result); + while ($row = $xoopsDB->fetchArray($result)) { + $data[]=$row; + } + if(!empty($data)) { + return $data; + } + } + + /** + * @Get user image based on uid + * @param int $uid + * @return string + */ + public function Gravatar($uid) + { + global $xoopsUser, $xoopsDB; + $image=''; + $sql = "SELECT userimage FROM ".$xoopsDB->prefix('smallworld_user')." WHERE userid = '".$uid."'"; + $result = $xoopsDB->queryF($sql); + while ($r = $xoopsDB->fetchArray($result)) { + $image = $r['userimage']; + } + + $type = Array( + 1 => 'jpg', + 2 => 'jpeg', + 3 => 'png', + 4 => 'gif' + ); + + $ext = explode(".",$image); + + if (@!in_array(strtolower ($ext[1]), $type) || $image == '') { + $avt = new XoopsUser($uid); + $avatar = $avt->user_avatar(); + } else { + $avatar = $image; + } + return $avatar; + } + + /** + * @count all votes + * @param int $type + * @param int $val + * @param int $msgid + * @return int + */ + public function countVotes ($type, $val, $msgid) + { + global $xoopsUser, $xoopsDB; + $query = "Select SUM(".$val.") as sum from ".$xoopsDB->prefix('smallworld_vote')." where msg_id = '".$msgid."' and com_id = '0'"; + $result=$xoopsDB->queryF($query); + while ($row = $xoopsDB->fetchArray($result)) { + $sum = $row['sum']; + } + if ($sum==''){ + $sum = '0'; + } + return $sum; + } + + /** + * @Count comments votes + * @param int $type + * @param int $val + * @param int $comid + * @param int $msgid + * @returns int + */ + public function countVotesCom ($type, $val, $comid, $msgid) + { + global $xoopsUser, $xoopsDB; + $query = "Select SUM(".$val.") as sum from ".$xoopsDB->prefix('smallworld_vote') + . " where com_id = '".$comid."' AND msg_id = '".$msgid."'"; + $result=$xoopsDB->queryF($query); + while ($row = $xoopsDB->fetchArray($result)) { + $sum = $row['sum']; + } + if ($sum==''){ + $sum = '0'; + } + return $sum; + } + + /** + * @Check is user is friend + * @param int $userid + * @param string $type + * @param int $comid + * @param int $msgid + * @return int + */ + public function HasVoted ($userid, $type, $comid, $msgid) + { + global $xoopsUser, $xoopsDB; + if ($type == 'msg') { + $sql = "Select * from ".$xoopsDB->prefix('smallworld_vote') + . " where com_id = '0' and msg_id = '".$msgid."' and user_id = '".$userid."'"; + $result = $xoopsDB->queryF($sql); + $i = $xoopsDB->getRowsNum($result); + } else { + $sql = "Select * from ".$xoopsDB->prefix('smallworld_vote') + . " where com_id = '".$comid."' and msg_id = '".$msgid."' and user_id = '".$userid."'"; + $result = $xoopsDB->queryF($sql); + $i = $xoopsDB->getRowsNum($result); + } + return $i; + } + + /** + * @count messages per user + * @param int $userid + * @return int + */ + public function CountMsges ($userid) + { + global $xoopsDB; + $sql = "SELECT (SELECT COUNT(*) FROM ".$xoopsDB->prefix('smallworld_comments') + . " WHERE uid_fk = '".$userid."') + (SELECT COUNT(*) FROM " + . $xoopsDB->prefix('smallworld_messages')." WHERE uid_fk = '".$userid."')"; + $result = $xoopsDB->queryF($sql); + $sum = $xoopsDB->fetchRow($result); + return $sum[0]; + } + + /** + * @Show permaling updates + * @param int $updid + * @param int $uid + * @param int $ownerID + * @return array + */ + public function UpdatesPermalink($updid,$uid, $ownerID) + { + global $xoopsUser, $xoopsDB, $moduleConfig; + $query = "SELECT M.msg_id, M.uid_fk, M.message, M.created, M.priv, U.username FROM " + . $xoopsDB->prefix('smallworld_messages')." M, ".$xoopsDB->prefix('smallworld_user') + . " U WHERE M.uid_fk=U.userid and M.uid_fk='".$ownerID."'"; + $query .= " AND M.msg_id = '".$updid."'"; + $query .= " order by M.created DESC LIMIT 1"; + $result=$xoopsDB->queryF($query); + $count = $xoopsDB->getRowsNum($result); + if ($count < 1) { + return false; + } else { + while ($row = $xoopsDB->fetchArray($result)) { + $data[]=$row; + } + if(!empty($data)) { + return $data; + } + } + } + + /** + * @Get share link + * @param int $updid + * @param int $ownerID + * @return array + */ + public function UpdatesSharelink($updid,$ownerID) + { + global $xoopsUser, $xoopsDB, $moduleConfig; + $query = "SELECT M.msg_id, M.uid_fk, M.message, M.created, M.priv, U.username FROM " + . $xoopsDB->prefix('smallworld_messages')." M, ".$xoopsDB->prefix('smallworld_user') + . " U WHERE M.uid_fk=U.userid and M.uid_fk='".$ownerID."' and M.priv = 0"; + $query .= " AND M.msg_id = '".$updid."'"; + $query .= " order by created DESC LIMIT 1"; + $result=$xoopsDB->queryF($query); + $count = $xoopsDB->getRowsNum($result); + if ($count < 1) { + return false; + } else { + while ($row = $xoopsDB->fetchArray($result)) { + $data[]=$row; + } + if(!empty($data)) { + return $data; + } + } + } + + /** + * @Get sharing link + * @param int $id + * @param int $priv + * @return string + */ + function GetSharing ($id, $priv) { + if ($priv != 1) { + $text = " | <span class='smallworld_share' id='smallworld_share'>"; + $text .= "<a class='share' id='share-page".$id."' href='javascript:void(0);'>"._SMALLWORLD_SHARELINK."</a></span>"; + } else { + $text = ""; + } + return $text; + } + + /** + * @Get content for sharing div + * @param int $id + * @param int $priv + * @param string $permalink + * @param string $desc + * @param string $username + * @return string + */ + function GetSharingDiv ($id, $priv, $permalink,$desc,$username) { + if ($priv != 1) { + $text = "<div style='display: none;' class='smallworld_bookmarks' id='share-page' name='share-page".$id."'>"; + $text .= "<span name='share-page".$id."' rel1='".$desc."' rel2= '".$username."' rel=".$permalink." id='basicBookmark' title='"._SMALLWORLD_SHAREBOX_TITLE."'>"; + $text .= "</span></div>"; + } else { + $text=""; + } + return $text; + } + +} +?> \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/images/image_missing.png =================================================================== (Binary files differ) Property changes on: XoopsModules/smallworld/trunk/smallworld/images/image_missing.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/smallworld/trunk/smallworld/publicindex.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/publicindex.php (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/publicindex.php 2013-03-12 14:41:53 UTC (rev 10227) @@ -0,0 +1,132 @@ +<?php +/** +* You may not change or alter any portion of this comment or credits +* of supporting developers from this source code or any supporting source code +* which is considered copyrighted (c) material of the original comment or credit authors. +* This program 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. +* +* @copyright: The XOOPS Project http://sourceforge.net/projects/xoops/ +* @license: http://www.fsf.org/copyleft/gpl.html GNU public license +* @module: Smallworld +* @Author: Michael Albertsen (http://culex.dk) <cu...@cu...> +* @copyright: 2011 Culex +* @Repository path: $HeadURL: https://xoops.svn.sourceforge.net/svnroot/xoops/XoopsModules/smallworld/trunk/smallworld/index.php $ +* @Last committed: $Revision: 9482 $ +* @Last changed by: $Author: djculex $ +* @Last changed date: $Date: 2012-05-11 12:02:24 +0200 (fr, 11 maj 2012) $ +* @ID: $Id: index.php 9482 2012-05-11 10:02:24Z djculex $ +**/ + +include_once("../../mainfile.php"); +$xoopsOption['template_main'] = 'smallworld_publicindex.html'; +include_once(XOOPS_ROOT_PATH."/header.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/publicWall.php"); +include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); +global $xoopsUser, $xoTheme,$xoopsConfig,$xoopsLogger; + $xoopsLogger->activated = true; + error_reporting(E_ALL); + + $set = smallworld_checkPrivateOrPublic (); + + $module_handler =& xoops_gethandler('module'); + $module = $module_handler->getByDirname('smallworld'); + $config_handler =& xoops_gethandler('config'); + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + + $pub = smallworld_GetModuleOption('smallworldshowPoPubPage', $repmodule='smallworld'); + $wall = new Public_Wall_Updates; + $updates = $wall->updates(0, $pub); + +/* if (!$xoopsUser && $set['access']==1) { +*/ + + $xuser = new SmallWorldProfile; + + $menu_home = "<a href='".XOOPS_URL."/modules/smallworld/'><img id='menuimg' src='".XOOPS_URL."/modules/smallworld/images/house.png'>"._SMALLWORLD_HOME."</a>"; + + + $updatesarray=$wall->updates(0, $pub); + if (!empty($updatesarray)) { + foreach ($updatesarray as $data) { + $wm['msg_id'] = $data['msg_id']; + $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); + $wm['message'] = nl2br(smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk'])); + $wm['message'] = str_replace(array('<','>'),array('<','>'), $wm['message']); + $wm['created'] = smallworld_time_stamp($data['created']); + $wm['username'] = $data['username']; + $wm['uid_fk'] = $data['uid_fk']; + $wm['priv'] = $data['priv']; + $wm['avatar'] = $wall->Gravatar($data['uid_fk']); + $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']); + $wm['avatar_size'] = smallworld_getImageSize(80, 100, $wm['avatar_link']); + $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50); + $wm['vote_up'] = $wall->countVotes ('msg', 'up', $data['msg_id']); + $wm['vote_down'] = $wall->countVotes ('msg', 'down', $data['msg_id']); + $wm['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']; + $wm['compl_msg_lnk'] .= "&updid=".$data['msg_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; + $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk']; + $wm['sharelinkurl'] .= "&updid=".$data['msg_id'].""; + $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename']; + $wm['sharelink'] = $wall->GetSharing ($wm['msg_id'],$wm['priv']); + $wm['sharediv'] = $wall->GetSharingDiv ($wm['msg_id'],$wm['priv'], $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']); + $wm['commentsarray'] = $wall->Comments($data['msg_id']); + print_r($wm['commentsarray']); + $xoopsTpl->append('walldata', $wm); + + if (!empty($wm['commentsarray'])){ + foreach($wm['commentsarray'] as $cdata) { + $wc['msg_id_fk'] = $cdata['msg_id_fk']; + $wc['com_id'] = $cdata['com_id']; + $wc['comment'] = nl2br(smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk'])); + $wc['time'] = smallworld_time_stamp($cdata['created']); + $wc['username'] = $cdata['username']; + $wc['uid'] = $cdata['uid_fk']; + $wc['myavatar'] = $wall->Gravatar($id); + $wc['myavatar_link'] = $myavatarlink; + $wc['avatar_size'] = smallworld_getImageSize(80, 100, $wc['myavatar_link']); + $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35); + $wc['cface'] = $wall->Gravatar($cdata['uid_fk']); + $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']); + $wc['compl_msg_lnk'] = "<a href='".XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".Smallworld_getOwnerFromComment($cdata['msg_id_fk']); + $wc['compl_msg_lnk'] .= "&updid=".$cdata['msg_id_fk']."#".$cdata['com_id']."'>"._SMALLWORLD_COMP_MSG_LNK_DESC."</a>"; + $wc['vote_up'] = $wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']); + $wc['vote_down'] = $wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']); + $xoopsTpl->append('comm', $wc); + } + } + } + } + + $xoopsTpl->assign('menu_home',$menu_home); + $xoopsTpl->assign('pagename','index'); + $xoopsTpl->assign('check',1); + $xoopsTpl->assign('access',$set['access']); + + //Check xoops version. If bigger than 2.5.0 then include by internal jquery plugins + $ver = explode(" ", XOOPS_VERSION); + if ($ver[1] >= '2.4.0') { + $xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); + $xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + //$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); + //$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); + } else { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.min.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jqueryui.min.js'); + } + + smallworld_SetCoreScript (); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); +include(XOOPS_ROOT_PATH."/footer.php"); +?> \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/templates/getmorepublic.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmorepublic.html (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmorepublic.html 2013-03-12 14:41:53 UTC (rev 10227) @@ -0,0 +1,96 @@ +<{if $access != '0'}> +<{foreach item=post from=$walldata}> + <script type="text/javascript"> + xoops_smallworld(document).ready(function(){ + xoops_smallworld("#smallworld_stexpand<{$post.msg_id}>").oembed("<{$post.orimessage}>",{ + maxWidth: "100%", + maxHeight: "100%" + }); + }); + </script> +<div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> + <div class="smallworld_stimg"> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}> /> + </div> + + <div class="smallworld_sttext"> + <b><a class="smallworld_wall_link" href=""><{$post.username}></a></b> <{$post.message}> + <div class="smallworld_sttime"><{$post.created}><{$post.sharelink}> | <a href='#' class='smallworld_commentopen' id='<{$post.msg_id}>' title='<{$smarty.const._SMALLWORLD_COMMENTWALL}>'><{$smarty.const._SMALLWORLD_COMMENTWALL}></a></div> + <{$post.sharediv}> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$post.vote_up}></span> + <img class="smallworld_voteimg" src = "images/like.png" /> + + <span id ="smallworld_votenum"><{$post.vote_down}></span> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + + </div> + + <div id="smallworld_stexpandbox"> + <div id="smallworld_stexpand<{$post.msg_id}>"></div> + </div> + + <div class="smallworld_commentcontainer" id="smallworld_commentload<{$post.msg_id}>"> + <{section name=i loop=$comm}> + <{if $comm[i].msg_id_fk == $post.msg_id}> + <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"> + <div class="smallworld_stcommentimg"> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> + </div> + <div class="smallworld_stcommenttext"> + <div class="comm_holder"> + <a class="smallworld_wall_link" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$comm[i].username}>"> + <b><{$comm[i].username}></b> + </a> <{$comm[i].comment}></div> + + <div class="smallworld_stcommenttime"> + <{$comm[i].time}> + </div> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$comm[i].vote_up}></span> + <img class="smallworld_voteimg" src = "images/like.png" /> + + + <span id ="smallworld_votenum"><{$comm[i].vote_down}></span> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + + </div> + </div> + </div> + <{/if}> + <{/section}> + </div> <!-- smallworld_commentcontainer --> + <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> + <div class="smallworld_stcommentimg"> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> + </div> + <div class="smallworld_stcommenttext" > + <form method="post" action=""> + <textarea name="smallworld_comment" class="smallworld_comment" maxlength="200" id="smallworld_ctextarea<{$post.msg_id}>"></textarea> + <br /> + <input type="submit" value="<{$smarty.const._SMALLWORLD_COMMENTBUTTONTEXT}>" id="<{$post.msg_id}>" class="smallworld_comment_button"/> + </form> + </div> + </div> <!-- smallworld_commentupdate --> +</div> <!-- smallworld_sttext --> +</div> <!-- smallworld_stbody --> +<{/foreach}> + +<div id = "smallworld_moremsg_ajax" style="display:none"> + <img src="images/loader.gif"/> +</div> + +<{if $sCountResp >= $msgtoshow}> +<a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>"><{$smarty.const._SMALLWORLD_MOREBUTTONLINK}></a> +<{/if}> + +<script type="text/javascript"> +xoops_smallworld(document).ready(function(){ + smallworldCheckNumDivs(); + attachAvatarOpen(); + SmallworldGetMoreMsg (); +}); +</script> +<{else}> + +<{/if}> \ No newline at end of file Added: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_publicindex.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_publicindex.html (rev 0) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_publicindex.html 2013-03-12 14:41:53 UTC (rev 10227) @@ -0,0 +1,268 @@ +<{if $access == 1}> + <{if $check >= 1}> + <ul id="smallworld_menu" class="smallworld_menu"> + <li class="active"> + <a href="<{$xoops_url}>/modules/smallworld/index.php"><{$smarty.const._SMALLWORLD_HOME}></a> + </li> + </ul> + <div id="example1" class="smallworld_content"> + <table class="smallworld_biotable"> + <tr> + <td> + <{$avatar}> + <{if $xoops_isuser}> + <div class="UploadNewAvatar" id="<{$ownerofpage}>" style="display:none"> + <div id="smallworld_avatarupload" > + <span><{$smarty.const._SMALLWORLD_UPLOADFILEBUTTONTEXT}></span> + </div> + <span id="smallworld_avatarstatus" ></span> + <ul id="smallworld_avatarfiles" ></ul> + </div> + + <div class="smallworld_userstat_menu"> + <h1><{$username}></h1> + <center><{$rankimage}></center> + <br><center><{$smarty.const._SMALLWORLD_TOTALPOSTS}> + <{$totalposts}></center> + <br><br> + <h1><{$smarty.const._SMALLWORLD_TOTALUSERRATINGS}></h1> + <p class="smallworld_rating_menu"><{$usersratinf}></p> + </div> + <br> + + <{if $isadminuser == 'YES' or $username == $myusername}> + <br> + <p class="smallworld_useredits_menu"> + <img height="10px" width="10px" src="images/editavatar.png"/> + <a href="javascript:void(0);" id="smallworld_changeAvatar"><{$smarty.const._SMALLWORLD_CHANGEAVATAR}></a><br> + <img height="10px" width="10px" src="images/edituserprofile.png"/> + <a href="editprofile.php" id="smallworld_changeEditProfile"><{$smarty.const._SMALLWORLD_EDITPROFILE}></a> + + <br> + </p> + <{/if}> + + <br> + <p class="smallworld_useredits_menu"> + <img width= '10px' height= '10px' src="<{$xoops_url}>/modules/smallworld/images/statistics.png" /> + <a href="javascript:void(0);" id = "smallworld_statistics_lnk" ><{$smarty.const._SMALLWORLD_STATS}></a><br> + </p> + <br> + + </td> + <{else}> + <td> + <br/> + </td> + <{/if}> + <span class="smallworld_search"> + <td> + <ul class="smallworld_index_headmenu"> + <li><{$menu_home}></li> + <li><{$menu_profile}></li> + <li><{$menu_friends}></li> + <li><{$menu_gallery}></li> + </ul> + <br> + <br> + + <center><input id="smallworld_searchform" size="35" type="text" value="<{$smarty.const._SMALLWORLD_SEARCHMEMBER}>"/></center> + <br> + <br> + <div id="smallworld_wall_container"> + <div id="smallworld_updateboxarea"> + <h4><{$smarty.const._SMALLWORLD_WHATSUP}></h4> + <form method="post" action=""> + <{if $xoopsUser}> + <textarea cols="50" rows="1" rel="<{$ownerofpage}>" name="smallworld_update" id="smallworld_update" maxlength="200" ></textarea> + <{else}> + <textarea cols="50" rows="1" maxlength="200" ></textarea> + <{/if}> + <br> + <div id = "smallworld_updatePrivacyCheck"> + <label for="updatePriv"><{$smarty.const._SMALLWORLD_PRIVATEUPDATE}></label> + <input type="radio" name="updatePublic" id="updatePublic" value="1"/> + <label for="updatePriv"><{$smarty.const._SMALLWORLD_PUBLICUPDATE}></label> + <input type="radio" name="updatePublic" id="updatePublic" value="0"/> + + </div> + <br><br> + <{if $xoopsUser}> + <input type="submit" value="<{$smarty.const._SMALLWORLD_UPDATEBUTTONTEXT}>" id="smallworld_update_button" class="smallworld_update_button"/> + <{else}> + <input type="submit" value="<{$smarty.const._SMALLWORLD_UPDATEBUTTONTEXT}>" id="smallworld_update_button" class="smallworld_update_button"/> + <{/if}> + </form> + </div> + <hr/> + <div id = "smallworld_Stats_container"></div> + <button id='smallworld_messagecounter_id' onClick='javascript:smallworldRefresh();return false;'></button> + <div id='smallworld_flashmessage'> + <div id="smallworld_flash" align="left" ></div> + </div> + <div id="smallworld_content"> + <{foreach item=post from=$walldata}> + <div class="smallworld_stbody" id="smallworld_stbody<{$post.msg_id}>"> + <script type="text/javascript"> + xoops_smallworld(document).ready(function(){ + xoops_smallworld('#smallworld_stexpand<{$post.msg_id}>').oembed('<{$post.orimessage}>',{ + maxWidth: "100%", + maxHeight: "100%" + }); + }); + </script> + <div class="smallworld_stimg"> + <img src="<{$post.avatar_link}>" class='smallworld_big_face' <{$post.avatar_highwide}>/> + </div> + + <div class="smallworld_sttext"> + <{if $isadminuser == 'YES' or $post.username == $myusername}> + <a class="smallworld_stdelete" href="#" rel="<{$post.uid_fk}>" id="<{$post.msg_id}>" title="<{$smarty.const._SMALLWORLD_DELUPD}>">X</a> + <{/if}> + <b><a class="smallworld_wall_link" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$post.username}>"><{$post.username}></a></b> <{$post.message}> + <div class="smallworld_sttime"><{$post.created}><{$post.sharelink}> | <a href='#' class='smallworld_commentopen' id='<{$post.msg_id}>' title='<{$smarty.const._SMALLWORLD_COMMENTWALL}>'><{$smarty.const._SMALLWORLD_COMMENTWALL}></a></div> + <{$post.sharediv}> + <{if $post.username == $myusername}> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$post.vote_up}></span> + <img class="smallworld_voteimg" src = "images/like.png" /> + + <span id ="smallworld_votenum"><{$post.vote_down}></span> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + </div> + <{else}> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$post.vote_up}></span> <a href="javascript:void(0)" name="up" class="smallworld_stcomment_vote" id="<{$post.msg_id}>" type="msg" owner="<{$post.uid_fk}>"> + <img class="smallworld_voteimg" src = "images/like.png" /> + </a> + <span id ="smallworld_votenum"><{$post.vote_down}></span> <a href="javascript:void(0)" name="down" class="smallworld_stcomment_vote" id="<{$post.msg_id}>" type="msg" owner="<{$post.uid_fk}>"> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + </a> + <a href="javascript:void(0)" auserid="<{$post.uid_fk}>" by_user = "<{$myusername}>" a_user = "<{$post.username}>" name="complaint" class="smallworld_comment_complaint" id="<{$post.compl_msg_lnk}>"> + <img class="smallworld_voteimg" src = "images/complaint.png" /> + </a> + </div> + <{/if}> + <div id="smallworld_stexpandbox"> + <div id="smallworld_stexpand<{$post.msg_id}>"></div> + </div> + + <div class="smallworld_commentcontainer" id="smallworld_commentload<{$post.msg_id}>"> + + <{section name=i loop=$comm}> + <{if $comm[i].msg_id_fk == $post.msg_id}> + <div class="smallworld_stcommentbody" id="smallworld_stcommentbody<{$comm[i].com_id}>"/> + <div class="smallworld_stcommentimg"> + <img src="<{$comm[i].avatar_link}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> + </div> + <div class="smallworld_stcommenttext"> + <{if $isadminuser == 'YES' or $comm[i].username == $myusername}> + <a class="smallworld_stcommentdelete" href="#" rel="<{$comm[i].uid}>" id='<{$comm[i].com_id}>' title='<{$smarty.const._SMALLWORLD_DELETECOMMENT}>'>X</a> + <{/if}> + <div class="comm_holder"> + <a class="smallworld_wall_link" href="<{$xoops_url}>/modules/smallworld/userprofile.php?username=<{$comm[i].username}>"> + <b><{$comm[i].username}></b> + </a> <{$comm[i].comment}></div> + <div class="smallworld_stcommenttime"><{$comm[i].time}></div> + <{if $comm[i].username == $myusername}> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$comm[i].vote_up}></span> + <img class="smallworld_voteimg" src = "images/like.png" /> + + + <span id ="smallworld_votenum"><{$comm[i].vote_down}></span> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + </div> + <{else}> + <div class="smallworld_stcommentvote"> + <span id ="smallworld_votenum"><{$comm[i].vote_up}></span> <a href="javascript:void(0)" name="up" class="smallworld_stcomment_vote" id="<{$comm[i].com_id}>" owner="<{$comm[i].uid}>" type="com" type2="<{$comm[i].msg_id_fk}>"> + <img class="smallworld_voteimg" src = "images/like.png" /> + </a> + + <span id ="smallworld_votenum"><{$comm[i].vote_down}></span> <a href="javascript:void(0)" name="down" class="smallworld_stcomment_vote" id="<{$comm[i].com_id}>" owner="<{$comm[i].uid}>" type="com" type2="<{$comm[i].msg_id_fk}>"> + <img class="smallworld_voteimg" src = "images/dislike.png" /> + </a> + <a href="javascript:void(0)" auserid="<{$comm[i].uid}>" by_user = "<{$myusername}>" a_user = "<{$comm[i].username}>" name="complaint" class="smallworld_comment_complaint" id="<{$comm[i].compl_msg_lnk}>"> + <img class="smallworld_voteimg" src = "images/complaint.png" /> + </a> + </div> + <{/if}> + </div> + </div> + <{/if}> + <{/section}> + </div> + + <div class="smallworld_commentupdate" style="display:none" id="smallworld_commentbox<{$post.msg_id}>"> + <div class="smallworld_stcommentimg"> + <{if $xoopsUser}> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> + <{else}> + <img src="<{$myavatarlink}>" class='smallworld_small_face' width="50px" height="50px"/> + <{/if}> + </div> + <div class="smallworld_stcommenttext" > + <form method="post" action=""> + <textarea name="smallworld_comment" class="smallworld_comment" maxlength="200" id="smallworld_ctextarea<{$post.msg_id}>"></textarea> + <br /> + <input type="submit" value="<{$smarty.const._SMALLWORLD_COMMENTBUTTONTEXT}>" id="<{$post.msg_id}>" class="smallworld_comment_button"/> + </form> + </div> + </div> + + </div> + + </div> + + <{/foreach}> + <div id = "smallworld_moremsg_ajax" style="display:none"> + <img src="images/loader.gif"/> + </div> + <a href="javascript:void(0)" class="smallworld_msg_counter" rel2 = "" rel="index" id="<{$post.msg_id}>"><{$smarty.const._SMALLWORLD_MOREBUTTONLINK}></a> + </div> + </div> + </td> + </span> + </tr> + </table> + </div> + <div id="friendInvitations_box" title="<{$smarty.const._SMALLWORLD_FRIENDSINVITATIONS}>"> + <table border="0" class="smallworld_invitetable" cellspacing="0" cellpadding="0"> + <{foreach item=post from=$friendinvitations}> + <tr> + <th><{$smarty.const._SMALLWORLD_REALNAME}></th> + <th></th> + <th><{$smarty.const._SMALLWORLD_DATERECIEVED}></th> + <th></th> + <th> <{$smarty.const._SMALLWORLD_ACTION}></th> + <th></th> + </tr> + + <tr> + <td></td> + <td></td> + <td></td> + <td></td> + </tr> + + <tr id="<{$post.cnt}>"> + <td><{$post.friendname}></td> + <td><{$post.friendimage}></td> + <td><{$post.frienddate}></td> + <td><{$post.accept}></td><td><{$post.deny}></td><td><{$post.later}></td> + </tr> + <{/foreach}> + </table> + </div> + <div id="smallworldStatsDiv" title="<{$smarty.const._SMALLWORLD_STATS}>" style="display:none;"></div> + <{else}> + <div id="smallworld_notyetregistered" title="<{$smarty.const._SMALLWORLD_NOTYETREGISTERED_TITLE}>"> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <tr> + <label for="register"></label> + <td><p id="smallworld_notyetusercontent"><{$notyetusercontent}></p></td> + </tr> + </table> + </div> + <{/if}> +<{/if}> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |