Example #1
0
	protected function _getURL($user, $sizex, $sizey)
	{
		$user = KunenaFactory::getUser($user);
		// Get CUser object
		 $avatar=AwdwallHelperUser::getBigAvatar51($user->userid);
		return $avatar;
	}
Example #2
0
 public function pushActivity($actor_id, $act_type, $act_subtype = '', $act_description = '', $act_link = '', $act_title = '', $act_access)
 {
     /*load jomwall core*/
     if (!class_exists('AwdwallHelperUser')) {
         require_once JPATH_SITE . DS . 'components' . DS . 'com_awdwall' . DS . 'helpers' . DS . 'user.php';
     }
     $linkHTML = '<a href="' . $act_link . '">' . $act_title . '</a>';
     $comment = $act_description . ' ' . $linkHTML;
     $attachment = $act_link;
     $type = 'text';
     $imgpath = NULL;
     $params = array();
     AwdwallHelperUser::addtostream($comment, $attachment, $type, $actor_id, $imgpath, $params);
     return true;
 }
Example #3
0
	public function onAfterThankyou($target, $actor, $message) {
	
			$username = KunenaFactory::getUser($actor)->username;
			$msg = AwdwallHelperUser::formatUrlInMsg($msg);			
			$wall 				=& JTable::getInstance('Wall', 'Table');						
			$wall->user_id		= $target;
			$wall->group_id		= NULL;
			$wall->type			= 'text';
			$wall->commenter_id	= JFactory::getUser()->id;
			$wall->user_name	= '';
			$wall->avatar		= '';
			$wall->message		= JText::sprintf( 'PLG_KUNENA_JOMWALL_ACTIVITY_THANKYOU_TITLE', $username );
			$wall->reply		= 0;
			$wall->is_read		= 0;
			$wall->is_pm		= 0;
			$wall->is_reply		= 0;
			$wall->posted_id	= NULL;
			$wall->wall_date	= time();
			if (!$wall->store()){				

			}
	}
Example #4
0
	function display($tpl = null) { 

	

		global $mainframe;
		$app = JFactory::getApplication('site');
		$albumModel = & $this->getModel('awdjomalbum');
		$Itemid=AwdwallHelperUser::getComItemId();
		$db		=& JFactory :: getDBO();

		$user =& JFactory::getUser();

		$albumid=$_REQUEST['albumid'];

		$pid=$_REQUEST['pid'];

		// checking privacy

		$albumview=isalbumviewable($albumid);	

		

		if(!$albumview)

		{
			$msg= JText::_('User has set privacy.');
			
			$app->Redirect(JRoute::_('index.php?option=com_awdwall&amp;view=awdwall&amp;layout=main&amp;Itemid='.$Itemid,false),$msg);

		}

		

		

		if($albumid!='' && $pid!='')

		{

			//load images related to one album id

			$albumid=$_REQUEST['albumid'];		

			$imagequery= 'SELECT * from #__awd_jomalbum_photos where albumid='.$albumid.' '.' and id='.$pid.' order by id';

		 	$db->setQuery($imagequery);

			$photorows=$db->loadObjectList();

			$photorow=$photorows[0];
			if(count($photorow)==0)
			{
				$msg="It seems that image deleted by user";
				$app->Redirect(JRoute::_('index.php?option=com_awdwall&amp;view=awdwall&amp;layout=main&amp;Itemid='.$Itemid,false),$msg);
 				exit;
			}
			$this->assignRef('photorow', $photorow);


			

			$sql= 'SELECT count(*) from #__awd_jomalbum_photos where albumid='.$albumid;

		 	$db->setQuery($sql);

			

			$totRecord=$db->loadResult();

			$this->assignRef('totRecord',$totRecord);

			

			

			$sql="select count(*) from #__awd_jomalbum_photos where id <= ".$pid." and albumid=".$albumid." order by id asc ";

			//echo $sql;

			$db->setQuery($sql);

			$curPosition=$db->loadResult();

			$this->assignRef('curPosition',$curPosition);

			

			//load user name and user id to one album id

			$sql="Select u.*,aj.name as albumname from #__users as u left join #__awd_jomalbum as aj on u.id=aj.userid where aj.id=".$albumid;

			$db->setQuery($sql);

			$userdatas=$db->loadObjectList(); 

			$userdata=$userdatas[0];

			

			$userid=$userdata->id;

			$username=$userdata->username;

			$albumname=$userdata->albumname;

			$this->assignRef('albumname', $albumname);  

			

			$this->assignRef('username', $username);  

			$this->assignRef('userid', $userid);  

		

		

			//set prev and next record

			

				$sql="SELECT  (SELECT MAX(id) FROM #__awd_jomalbum_photos ph1 WHERE ph1.id < ph2.id ) as PreviousID,  (SELECT MIN(id)    FROM #__awd_jomalbum_photos ph1  WHERE     ph1.id >  ph2.id ) as NextID FROM #__awd_jomalbum_photos  ph2 WHERE  id =".$pid;

			$db->setQuery($sql);

			$results=$db->loadobjectList();

			$result=$results[0];

			

			$next=$result->NextID;

			$prev=$result->PreviousID;

		

			$sql1="SELECT id from #__awd_jomalbum_photos where albumid=".$albumid." order by id ASC LIMIT 1";

			$db->setQuery($sql1);

			$firstRec=$db->loadResult();

			

			$sql2="SELECT * from #__awd_jomalbum_photos where albumid=".$albumid." order by id DESC LIMIT 1";

			$db->setQuery($sql2);

			$lastRec=$db->loadResult();





			if($pid==$firstRec)

			{

				$prev=$lastRec;

			}

			else if($pid==$lastRec)

			{

				$next=$firstRec;

			}

 			

			$this->assignRef('nextR', $next);  

			$this->assignRef('prevR', $prev);   

			

			

		//comments

		$commentqry='SELECT ajc.*, u.id as uid, u.name as cname,u.username  FROM  #__awd_jomalbum_comment as ajc left join #__users as u on ajc.userid=u.id where ajc.photoid='.$pid.' order by ajc.id desc limit 5';

	 	$db->setQuery($commentqry);

		$commentrows=$db->loadObjectList();

		$commentqry='SELECT ajc.*, u.id as uid, u.name as cname,u.username  FROM  #__awd_jomalbum_comment as ajc left join #__users as u on ajc.userid=u.id where ajc.photoid='.$pid.' order by ajc.id desc';

	 	$db->setQuery($commentqry);

		$totalcommentrows=$db->loadObjectList();

		

		$tagqry='SELECT * from #__awd_jomalbum_tags where photoid='.$pid;

	 	$db->setQuery($tagqry);

		$tagrows=$db->loadObjectList();

		
		
		$app = JFactory::getApplication('site');
		$config =  & $app->getParams('com_awdwall');
		$display_group = $config->get('display_group', 1);
		$display_group_for_moderators = $config->get('display_group_for_moderators', 1);
		$moderator_users = $config->get('moderator_users', '');
		$moderator_users=explode(',',$moderator_users);
		
		$this->assignRef('display_group', $display_group);
		$this->assignRef('display_group_for_moderators', $display_group_for_moderators);
		$this->assignRef('moderator_users', $moderator_users);
		

		//print_r($commentrows);

		$this->assignRef('totalcommentrows', $totalcommentrows); 

		$this->assignRef('commentrows', $commentrows); 

		$this->assignRef('tagrows', $tagrows); 

		$this->assignRef('pid', $pid); 

		

		

			

			parent::display($tpl);

		}

		else

		{

			echo JText::_('Opps! You are in wrong page');

		}



    }
Example #5
0
	   		jQuery('#post_but').attr({'disabled':'true'});
		var path="index.php?option=com_awdjomalbum&task=savecomment&photoid="+ <?php echo $_REQUEST['pid'];?> +"&albumid=" + <?php echo $_REQUEST['albumid'];?> +"&Itemid=<?php echo AwdwallHelperUser::getComItemId(); ?>" + "&comment=" + comm ;
			jQuery.ajax({
		   'url':path,'data':'comment='+comm,
		   'type':'POST',
		   'success':function(data)
		   {
			   if(data.length)
			   {
			   		document.getElementById('comm_input').value="";
					var string=data.split("^") ;
					var comment=string[0];
					var id=string[1];
				   var htm = '<div class="commentBox2" id="new_comment_table'+counter+'" >';
					htm += '<div  id="avtar"><a href="<?php echo $userprofileLinkCUser;?>"><img src="<?php echo $imgPathCUser; ?>" border="0" height="32" width="32" /></a></div>';
					htm += '<div class="commentDetail" ><div style="margin-bottom:10px;width:85%; text-align:justify;"><span class="cUser"><a href="<?php echo 		$userprofileLinkAWDCUser; ?>" class="authorlink"><?php echo AwdwallHelperUser::getDisplayName($user->id);?></a></span> <span class="comments">'+comment+'</span></div>';
					htm += '<div class="subcommentmenu"><span class="commentDate wall_date"><?php echo $cDatecUser; ?></span>';
					htm += '<span class="comment_del_but" id="'+counter+'" align="right""><a href="JavaScript:void(0);"> - Delete</a></span></div>';
					htm += '<input type="hidden" value="'+id+'" id="hid'+counter+'" />';
					htm += '</div>';
 					htm +='<div class="cDivider" id="new_comment_table1'+counter+'"></div>';
				   /*Append new ta#new_comment_hereble in predefined area*/
				   jQuery(htm).hide().prependTo("#new_comment_here").fadeIn("slow");
				  // jQuery('#new_comment_here').after(htm);
			   	   jQuery('#comm_input').removeAttr('disabled');
		   		   jQuery('#post_but').removeAttr('disabled');
				   counter++;
					 jQuery('#comm_row').slideUp();
				}
			}
			});
Example #6
0
			<a rel="nofollow" target="_blank"  href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(JRoute::_(JURI::root(). 'index.php?option=com_awdwall&view=awdwall&layout=main&wid=' . $this->wid . '&Itemid=' . $Itemid));?>&title=<?php echo urlencode($pageTitle);?>" title="<?php echo JText::_('LinkedIn');?>"><?php echo JText::_('LinkedIn');?></a>
			<br/>
			<a target="_blank" href="https://plus.google.com/share?url=<?php echo urlencode(JRoute::_(JURI::root(). 'index.php?option=com_awdwall&view=awdwall&layout=main&wid=' . $this->wid . '&Itemid=' . $Itemid));?>"><?php echo JText::_('Google Plus');?></a>
			<br/>
			<a   target="_blank" href="http://digg.com/submit?url=<?php echo urlencode(JRoute::_(JURI::root(). 'index.php?option=com_awdwall&view=awdwall&layout=main&wid=' . $this->wid . '&Itemid=' . $Itemid));?>"><?php echo JText::_('Digg');?></a>
			<br/>
			<a  target="_blank" href="http://www.stumbleupon.com/submit?url=<?php echo urlencode(JRoute::_(JURI::root(). 'index.php?option=com_awdwall&view=awdwall&layout=main&wid=' . $this->wid . '&Itemid=' . $Itemid));?>&amp;title=<?php echo urlencode($pageTitle);?>"><?php echo JText::_('Stumbleupon');?></a>
		</div>
		<div class="share-bottom"><div></div></div>
	</div>
<?php if($displayPm){?>		
		- <a href="javascript:void(0);" onclick="showPMBox('<?php echo JURI::base().'index.php?option=com_awdwall&view=awdwall&task=getpmbox&tmpl=component';?>', <?php echo $this->wid;?>, <?php echo $user->id;?>, <?php echo $this->wid;?>);"><?php echo JText::_('PM');?></a> 
<?php }?>
		- <a href="javascript:void(0);" onclick="openMsgDeleteBox('<?php echo JURI::base().'index.php?option=com_awdwall&view=awdwall&task=deletemsg&wid=' . (int)$this->wid . '&tmpl=component';?>', <?php echo $this->wid;?>);"><?php echo JText::_('Delete');?></a>
		<?php if(AwdwallHelperUser::checkOnline($user->id)){?>
	<img src="<?php echo AwdwallHelperUser::getOnlineIcon();?>" title="<?php echo JText::_('Online');?>" alt="<?php echo JText::_('Online');?>" style="vertical-align:middle;"/>
	<?php }?>	
		<p></p>
  <!-- start like box -->
<div id="like_<?php echo (int)$this->wid;?>">
</div>
<?php
	$whoLikes = $this->wallModel->getLikeOfMsg($this->wid);
	if(isset($whoLikes[0])){
?>
<script type="text/javascript">
getWhoLikeMsg('<?php echo 'index.php?option=com_awdwall&view=awdwall&task=getlikemsg&wid=' . (int)$this->wid . '&tmpl=component&Itemid='.$Itemid;?>', <?php echo $this->wid;?>);
</script>
<?php } ?>

	<!-- end like box -->
Example #7
0
</div>
<?php } else { ?> 
<?php echo JText::_('There are no albumn created by').'&nbsp;'. $username; ?>
<div style="clear:both; height:10px;"></div> 
<?php } 
if(count($photorows)>0)
{
?>
<div style="clear:both;">
<div  class="wallPhotos"><?php echo JText::_('Wall Photos'); ?></div>
	
<?php
	foreach($photorows as $photorow)
	{
		$imgpath=JURI::base()."images/".$userid."/thumb/".$photorow->path;
		$link 	=JRoute::_("index.php?option=com_awdjomalbum&view=awdwallimagelist&tmpl=component&wuid=".$userid."&pid=".$photorow->id."&Itemid=".AwdwallHelperUser::getComItemId());
 	?>
		<div class="wallImages"><a href="<?php echo $link;?>" class='awdiframe'>
		<img src="<?php echo $imgpath; ?>" width="112" height="84" border="0" align="absmiddle" />
		</a></div>
<?php }
?>
</div>
<?php
}
?>
<div style="clear:all;"></div>
	<input type="hidden" name="option" value="com_awdjomalbum" /> 
	<input type="hidden" name="view" value="awdalbumlist" />	
</form>
  </div>
Example #8
0
	function addlinkvideo($vLink){
		$user = &JFactory::getUser();		
		$wuid = JRequest::getInt('wuid', 0);
		$groupId = JRequest::getInt('groupid', NULL);
		if($groupId==0)
		$groupId =NULL;
		$itemId = AwdwallHelperUser::getComItemId();
		$db =& JFactory::getDBO();
		if($wuid == 0) $wuid = $user->id;
		if((int)$user->id){
			//$vLink = JRequest::getVar( 'vLink' , '');
			require_once (JPATH_COMPONENT . DS . 'libraries' . DS . 'avideo.php');
			if(!empty($vLink)){ 
				$AVideo 	= new AVideo($wuid);
				$videoObj 	= $AVideo->getProvider($vLink);				
				if ($videoObj->isValid()){
					require_once (JPATH_COMPONENT . DS . 'models' . DS . 'video.php');
					require_once (JPATH_COMPONENT . DS . 'models' . DS . 'wall.php');
					$video =& JTable::getInstance('Video', 'Table');						
					$video->title			= $videoObj->getTitle();
					$video->type			= $videoObj->getType();
					$videotype				= $videoObj->getType();
					$video->video_id		= $videoObj->getId();
					$video->description		= $videoObj->getDescription();
					$video->duration		= $videoObj->getDuration();
					$video->creator			= $user->id;						
					$video->created			= gmdate('Y-m-d H:i:s');										
					$video->published		= 1;						
					$video->thumb			= $videoObj->getThumbnail();
					$video->path			= $vLink;						
					
					// save into wall table first
					$wall = &JTable::getInstance('Wall', 'Table');
					$wall->user_id  = $wuid;
					$wall->group_id = $groupId;
					$wall->type			= 'video';
					$wall->commenter_id	= $user->id;
					$wall->user_name	= '';
					$wall->avatar		= '';
					$wall->message		= '';
					$wall->reply		= 0;
					$wall->is_read		= 0;
					$wall->is_pm		= 0;
					$wall->is_reply		= 0;
					$wall->posted_id	= NULL;
					$wall->wall_date	= NULL;
				
					// store wall to database
					if (!$wall->store()){			
						$this->setRedirect(JRoute::_('index.php?option=com_awdwall&&view=awdwall&layout=main' , false ), JText::_('Post Failed'));
					}
					$video->wall_id	= $db->insertid();
					$wall_id	= $video->wall_id;
					if (!$video->store()){					
						$url			= JRoute::_('index.php?option=com_awdwall&&view=awdwall&layout=main' , false);
						$message		= JText::_('Add video link failed');
						$this->setRedirect($url , $message);
					}
					require_once (JPATH_COMPONENT . DS . 'libraries' . DS . 'remote.php');
					$thumbData		= getContentFromUrl($video->thumb);
					if ($thumbData)
					{
						jimport('joomla.filesystem.file');
						require_once (JPATH_COMPONENT . DS . 'libraries' . DS . 'file.php');
						require_once (JPATH_COMPONENT . DS . 'libraries' . DS . 'image.php');			
						
						$thumbPath		= $AVideo->videoRootHomeUserThumb;							
						$thumbFileName	= genRandomFilename($thumbPath);
						$tmpThumbPath	= $thumbPath . DS . $thumbFileName;
					
						if (JFile::write($tmpThumbPath, $thumbData)){								
							$info		= getimagesize( $tmpThumbPath );
							$mime		= image_type_to_mime_type( $info[2]);
							$thumbExtension	= imageTypeToExt( $mime );
							
							$thumbPath	= $thumbPath . DS . $thumbFileName .$thumbExtension;
							JFile::move($tmpThumbPath, $thumbPath);
							
							// Resize the thumbnails
							imageResizep( $thumbPath , $thumbPath , $mime , $AVideo->videoThumbWidth , $AVideo->videoThumbHeight );
							$video->thumb = 'videos/' . $wuid . '/thumbs/' . $thumbFileName . $thumbExtension;
							$hvideothumb = 'videos/' . $wuid . '/thumbs/' . $thumbFileName . $thumbExtension;
							$video->store();
						}
						
					}

				// adding to com_hwdvideoshare
				
		if(file_exists(JPATH_SITE . '/components/com_hwdvideoshare/hwdvideoshare.php'))
		{
			
			// check wether wall video is there in hwdvideoshare or not if not then add.
		if(file_exists(JPATH_SITE . '/plugins/hwdvs-thirdparty/'.$videotype.'.php'))
		{

			$wallcatname='Wall Video';
			$query = "SELECT count(*) as wallvideocount FROM #__hwdvidscategories WHERE category_name='".$wallcatname."'";
			$db->setQuery($query);
			$wallvideocount = $db->loadResult();
			$query = "SELECT MAX(ordering) as catmaxordering FROM #__hwdvidscategories ";
			$db->setQuery($query);
			$catmaxordering = $db->loadResult();
			$catmaxordering=$catmaxordering+1;
			if($wallvideocount==0)
			{
			$sql = 'INSERT INTO #__hwdvidscategories(category_name, category_description,ordering,published) VALUES("'.$wallcatname .'","' . $wallcatname . '",' . $catmaxordering . ',1)';
			$db->setQuery($sql);
			$db->query();
				
			}
				$query = "SELECT id FROM #__hwdvidscategories WHERE category_name='".$wallcatname."'";
				$db->setQuery($query);
				$wallcatid = $db->loadResult(); // the hwdvideoshare cat id


				
				$query = "SELECT MAX(id) as videomaxid FROM #__hwdvidsvideos ";
				$db->setQuery($query);
				$videomaxid = $db->loadResult();
				$videomaxid=$videomaxid+1;

				$parsedurl= parse_url($vLink);
				$hvideo_type=str_replace('www.','',$parsedurl['host']);
				$hvideo_id=$videoObj->getId();
				$htitle=$videoObj->getTitle();
				$hdescription=$videoObj->getDescription();
				$hcategory_id=$wallcatid;
				$hdate_uploaded=gmdate('Y-m-d H:i:s');
				$huser_id=$user->id;
				$allow_comments=1;
				$allow_embedding=1;
				$allow_ratings=1;
				$approved 	='yes';
				$published=1;
				$hthumbnail='tp-'.$videomaxid.'.jpg';
			//	copy('images/'.$hvideothumb,'hwdvideos/thumbs/'.$hthumbnail);
				
			$sql = "INSERT INTO #__hwdvidsvideos(video_type, video_id,title,description,category_id,date_uploaded,allow_comments 	,allow_embedding,allow_ratings,public_private,thumbnail,approved,user_id,published) VALUES('".$hvideo_type ."','" . $hvideo_id . "','" . $htitle . "','" . $hdescription . "','" . $hcategory_id . "','" . $hdate_uploaded . "','" . $allow_comments . "','" . $allow_embedding . "','" . $allow_ratings . "','public','" . $hthumbnail . "','" . $approved . "','" . $user->id . "',1)";
			
			
			$db->setQuery($sql);
			$db->query();
			
			$sql = 'INSERT INTO #__awd_wall_videos_hwd(	wall_id, hwdviodeo_id) VALUES('.$wall_id .','.$videomaxid.')';
			$db->setQuery($sql);
			$db->query();
			
			} // if exist
		} // if exist


				}  
			}

			$this->setRedirect(JRoute::_('index.php?option=com_awdwall&&view=awdwall&layout=mywall&wuid=' . $wuid . '&Itemid=' . $itemId, false));

		}else{
			$this->setRedirect(JRoute::_('index.php?option=com_awdwall&&view=awdwall&layout=mywall&wuid=' . $wuid . '&Itemid=' . $itemId, false));
		}
		
		$tags = get_meta_tags($vLink);
		$description = $tags['description'];
		$description 	= ltrim($description);
		$description 	= rtrim($description);
		
		$d = 1;
		$img = '<img id='.$d.' class=no_hidden src='.JURI::base() . 'images/' . $video->thumb.' >';
		echo '{"type": "video","foo": "'.$file.'","img": "'.$img.'","count_img": "'.$d.'","error": "' . $error . '","msg": "' . $msg .  '","file": "<a href=' . $vLink . ' target=_blank>' . $vLink .  '</a>","wid_tmp": "' . $video->wall_id .  '","title": "' . $video->title .  '"}';
		return '{"type": "video","foo": "'.$file.'","img": "'.$img.'","count_img": "'.$d.'","error": "' . $error . '","msg": "' . $msg .  '","file": "<a href=' . $vLink . ' target=_blank>' . $vLink .  '</a>","wid_tmp": "' . $video->wall_id .  '","title": "' . $video->title .  '"}';
	}
Example #9
0
	}
	else
	{
		if($integration==0) //cb
		{
			$avatar=JURI::base() . "modules/mod_jomwallmember/tn51nophoto_n.png";
		}
		if($integration==1) //jomsocial
		{
			$avatar=JURI::base() . "modules/mod_jomwallmember/tn51user.png";
		}
	}
?>
                        <li>
                            <a href="<?php echo $url;?>">
                                <img src="<?php echo  $avatar;?>" title="<?php echo AwdwallHelperUser::getDisplayName($row->user_id);?>" alt="<?php echo AwdwallHelperUser::getDisplayName($row->user_id);?>"  />
                            </a>
                        </li>
<?php
	$i=$i+1;
	}
	
?>

    </ul>
</div>


				

Example #10
0
	function addphotowalllike()
	{
		$db		=& JFactory :: getDBO();
		$user =& JFactory::getUser();
		$photoid=$_REQUEST['photoID'];
		$uid=$_REQUEST['uID'];
		$sql="select count(*) from #__awd_jomalbum_photo_wall_like  where photoid=".$photoid." and userid=".$uid;
		//echo $sql;exit;
		$db->setQuery($sql);
		$totRec=$db->loadResult();
		if($totRec==0)
		{		
			$sql="insert into #__awd_jomalbum_photo_wall_like(photoid,userid) values($photoid,$uid)";
			$db->setQuery($sql);
			if (!$db->query()) {
			return JError::raiseWarning( 500, $db->getError() );
			}	
			
				// AUP POINTS
				$query='select wall_id from #__awd_wall_images where id='.$photoid;
				$db->setQuery($query);
				$wall_id = $db->loadResult();
				$query='select commenter_id from #__awd_wall where id='.$wall_id.' and wall_date IS NOT NULL';
				$db->setQuery($query);
				$commenter_id = $db->loadResult();
				if($commenter_id!=$user->id)
				{
					$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
					if ( file_exists($api_AUP)){				
						require_once ($api_AUP);
						
				$keyreference  = AlphaUserPointsHelper::buildKeyreference('plgaup_points4jomwallphotolike', $photoid );
				 AlphaUserPointsHelper::newpoints('plgaup_points4jomwallphotolike','', $keyreference);
						 
						 }
				}
			
		}
		
		
		$sql="select * from #__awd_jomalbum_photo_wall_like where photoid=".$photoid." order by id desc Limit 5";
		$db->setQuery($sql);
		$rows=$db->loadObjectList();
	
		$sql="select count(*) from #__awd_jomalbum_photo_wall_like where photoid=".$photoid;
		$db->setQuery($sql);
		$totLike=$db->loadResult();
		
		$link='index.php?option=com_awdwall&controller=colors';
		$db->setQuery("SELECT params FROM #__menu WHERE `link`='".$link."'");
		$params = json_decode( $db->loadResult(), true );
		for($i=1; $i<=14; $i++)
		{
			$str_color = 'color'.$i;			
			$color[$i]= $params[$str_color];
		}
		?>
		<div style="background-color:#<?php echo $color[12];?>;margin-bottom:5px;">
		<?php 
		$user =& JFactory::getUser();
		?>
		<div style="width:100%; text-align:left;padding-bottom:3px;"><span  class="likespan"><?php echo $totLike.'&nbsp;'.JText::_('People like this photo');?></span></div>
		<?php
		foreach($rows as $row)
		{
		$userprofileLinkAWDCUser=JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid='.$row->userid.'&Itemid='.AwdwallHelperUser::getComItemId());
				 $values=getCurrentUserDetails($row->userid);  
				 $avatarTable=$values[2];
				 $userprofileLinkCUser=$values[1];
			
			$values1=getUserDetails($row->userid,$avatarTable,$user->id); 
			$imgPath1=$values1[0];
			 
			?>
			<a href="<?php echo $userprofileLinkCUser; ?>" style="padding-right:5px;"><img  src="<?php echo $imgPath1; ?>" height="32" width="32" border="0"/></a>
			<?php
		}
		
		?></div><?php
		exit;
		}
Example #11
0
					
					<tr>
						<td><?php echo JText::_('Description :');?>&nbsp;</td>
						<td><textarea name="descr"  id="descr" value="" class="input_border" rows="1" cols="30"></textarea>
						<!--<input type="text" name="descr"  id="descr" value=""  maxlength="100" class="text_comment" ro/>--></td>
					</tr>
					<tr>
						<td><?php echo JText::_('Share album with:');?> &nbsp;</td>
						<td class="privacy"><select name="privacy" id="privacy" class="select">
							<option value="0"><?php echo JText::_('All');?></option>
							<option value="1"><?php echo JText::_('Friends Only');?></option>
							<option value="2"><?php echo JText::_('Friends Of Friends');?></option>
							<option value="3"><?php echo JText::_('Myself');?></option>
							</select>						</td>
					</tr>
					<tr><?php 	$link=JRoute::_('index.php?option=com_awdjomalbum&Itemid='.AwdwallHelperUser::getComItemId());?>
						<td></td>
					  <td align="right" valign="middle" style="padding-top:0px"><a href="<?php echo $link3; ?>" >
					   <input type="button" name="cancel" value="<?php echo JText::_('Cancel');?>" class="postButton_small" /> </a>
				      <input type="submit" name="submit" value="<?php echo JText::_('Create');?>" class="postButton_small" /></td>
					</tr>
				</table>
			</div>
			<div class="albumRight"></div>
		</div>
 	<input type="hidden" name="option" value="com_awdjomalbum" />
	<input type="hidden" name="task" id="task" value="savealbum" />
	<input type="hidden" name="view" value="createalbum" />
	<input type="hidden" name="id" value="<?php echo $_REQUEST['id'];?>" />
	<input type="hidden" name="userid" value="<?php echo $user->id; ?>" />
	<input type="hidden" name="firsttime" value="1" />
		
	$startd=explode(" ",$commentrow->submitted);
	$submittedtime=date('l,M j',strtotime($startd[0]));
	$commentdate=strtotime($commentrow->submitted);
$path=JURI::base(); 
$temp='plugins/content/loadjomwall/';
$message_walloriginal=str_replace($temp,'',AwdwallHelperUser::showSmileyicons($commentrow->comment));
	?>
	  <div class="loadjomwallinner" id="avatar">
	 <a href="<?php echo $profilelink;?>" alt="<?php echo $commentuserusername;?>" title="<?php echo $commentuserusername;?>"> <img src="<?php echo $avatar;?>"  border="0" alt="<?php echo $commentuserusername;?>" title="<?php echo $commentuserusername;?>" width="32" height="32"> </a>
	  </div>
	  <?php } ?>
					  
					  <div class="loadjomwallinner" id="comment-holder">
						<div id="text"><a href="<?php echo $profilelink;?>" ><?php echo $commentuserusername;?></a> <?php echo $message_walloriginal;?> </div>
						<div class="ago"><a href="javascript::void(0);" onclick="return showallcommentlike(<?php echo $commentrow->id;?>);" > <span id="commentlike<?php echo $commentrow->id;?>" class="show-more"><?php echo countlike($commentrow->id);?></span></a><?php if($user->id){?><a href="javascript::void(0);" onclick="return likecomment(<?php echo $commentrow->id;?>)"><?php echo JText::_('Like');?></a><?php } ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo  AwdwallHelperUser::getDisplayTime($commentdate);?></div>
					  </div>
					  <?php 
					  if($user->id)
					  {
					 
					  if($user->id==$commentrow->user_id || $can_delete==1 || ( in_array($user->id,$moderator_users)) ){?>
					  <a href="javascript::void(0)" onclick="return deletecomment(<?php echo $commentrow->id;?>)" class="loadjomwalldelete"></a>
					  <?php } } ?>
					  <br style="clear: both;">
</div>   
<?php
}
}
}
Example #13
0
	function getList(&$params)
	{ 
 	 
		$db			=JFactory::getDBO();
		$user		=JFactory::getUser();
		$userId		= (int) $user->get('id');
		//$Itemid		=AwdWallGroupsHelper::getComItemId();
        $Itemid = 677;
		$count		= (int) $params->get('count', 5);
		$ordering		= trim( $params->get('ordering1') );
	 	if(!empty($user->id))
		{
			$uid=$user->id;
			//$sql="Select * from #__awd_groups ";
            $sql="Select * from #__groupjive_groups ";
						
				if($ordering==0)
				{
				$order=" Order by id desc";
				
				} else {
				
				$order=" Order by rand()";
				
				}
			 $sql.=$order;
			 $db->setQuery($sql);
			 $grows = $db->loadObjectList();


			
			 $ids=array();
				foreach($grows as $row)
				{
					if($row->privacy==1)
					{
						$ids[]=$row->id;		
					}
					else
					{
					
						$sql="select group from #__groupjive_users where user_id=".$uid."  and group=".$row->id;
						 
						$db->setQuery($sql);
						$gid = $db->loadResult();
						if(!empty($gid))
						{
							$ids[]=$row->id;
							 
						}
					}
				}
			
			 if(count($ids>0))
			 {
			 	$gids=implode(",",$ids);
				if($ordering==0)
				{
				$order=" Order by id desc";
				
				} else {
				
				$order=" Order by rand()";
				
				}
	 			$sql="Select * from #__awd_groups where id in (".$gids.") ".$order;
				 $db->setQuery($sql, 0, $count);
				 $rows = $db->loadObjectList();

			 }
			
		}
		else
		{
			$sql="Select * from #__groupjive_groups ";
			
			if($ordering==0)
			{
				$order=" Order by id desc";
			
			} else {
			
			$order=" Order by rand()";
			
			}
			 $sql.=$order;
			 $db->setQuery($sql, 0, $count);
			 $rows = $db->loadObjectList();

		}
		 
		
		$i		= 0;
		$lists	= array();
		if($rows)
		{
			foreach ( $rows as $row )
			{
				if($row->image!='') {
					$lists[$i]->thumb = 'images/comprofiler/plug_cbgroupjive/2/'.$row->id.'/'.$row->image;
				}
				else
				{
					$lists[$i]->thumb = 'components/com_awdwall/images/group_thumb.jpg';
				}
				
				$lists[$i]->thumb = AwdwallHelperUser::getBigGrpImg133($row->logo,$row->id);
				$lists[$i]->title = $row->name;
				$lists[$i]->descr= $row->description;
				
				//$lists[$i]->link= 'index.php?option=com_awdwall&task=viewgroup&groupid='.$row->id.'&Itemid='.$Itemid;
                $lists[$i]->link= 'index.php?option=com_comprofiler&task=pluginclass&plugin=cbgroupjive&action=groups&func=show&grp='.$row->id.'&Itemid='.$Itemid;
					$i++;
			}
		}
		
		return $lists;
	}
Example #14
0
	function addtostream($message,$attachment,$type='text',$userid,$imgpath,$customparams=array())
	{ 
		require_once (JPATH_SITE.'/components/com_awdwall/models/wall.php');
		require_once (JPATH_SITE.'/components/com_awdwall/controller.php');
		$db 		= &JFactory::getDBO();
		
		$mainframe	=& JFactory::getApplication();
		$itemId = AwdwallHelperUser::getComItemId();
		$user 		= &JFactory::getUser($userid);	
		$receiverId = $user->id;	
		$groupId = JRequest::getInt('groupid', NULL);
		$title=$description=$fileName=$images_array1=$tags=$images_array=$link_root='';
		if((int)$user->id)
		{
			
			if($type=='link')
			{
			$link=$attachment;
					$file = @fopen($attachment, "r"); 
					if (!empty($file))
					{

					
					$data = '';
					while (!feof($file))
					{
						$data .= fgets($file, 1024);
					}
					if (!empty($data))
					{
					// get title
					$pattern =  "'<title>(.*?)<\/title>'s";		
					preg_match_all($pattern, $data, $matches);
					$title = $matches[1][0];
					$tags = get_meta_tags($link);
					$description = $tags['description'];
	
					$image_regex = '/<img[^>]*'.'src=[\"|\'](.*)[\"|\']/Ui';
					preg_match_all($image_regex, $data, $img, PREG_PATTERN_ORDER);
					$images_array = $img[1];
					
					preg_match("/^(http:\/\/)?([^\/]+)/i", $attachment, $link_root);
					$first_link = 'http://'.$link_root[2];
					
				$n = count($images_array);
				if ($n>0)
				{	
					for($k=0; $k<$n;$k++)
					{	
						$check = strrpos($images_array[$k], 'http');
						if((string)$check == "")
						{			
							$images_array[$k] = $first_link . $images_array[$k];
						}
						
						if(getimagesize($images_array[$k]))
						{
							list($width, $height) = getimagesize($images_array[$k]);			
							if($width >= 100) 
							{	
								$images_array1=$images_array[$k];
								break;
							}
						}				
							
					}
				}	
				}
					} 
					
			if(!empty($images_array1))
			{
					$wall = &JTable::getInstance('Wall', 'Table');
					$wall->user_id 		= $user->id;					
					$wall->type			= 'link';
					$wall->commenter_id	= $user->id;
					$wall->group_id		= NULL;
					$wall->user_name	= '';
					$wall->avatar		= '';
					$wall->message		= $message;
					$wall->reply		= 0;
					$wall->is_read		= 0;
					$wall->is_pm		= 0;
					$wall->is_reply		= 0;
					$wall->posted_id	= NULL;
					$wall->wall_date	= time();
					
					$title 			= ltrim($title);
					$title 			= rtrim($title);
					$description 	= ltrim($description);
					$description 	= rtrim($description);
					$fileName=$images_array1;
					// store wall to database
					if (!$wall->store()){				

					}
					$wallId = $wall->id;				
					$sql = 'INSERT INTO #__awd_wall_links(wall_id, title, link, path, description) VALUES("'.$wallId .'","' . $title . '", "' . $attachment . '", "' . $fileName . '","' . $description . '")';
					$db->setQuery($sql);
					$db->query();
					$feedsource = basename($imgpath, ".png");
					$query = "INSERT INTO #__awd_wall_social_feeds(wallid,type) VALUES(" . $wall->id . ",'".$feedsource."')";
					$db->setQuery($query);
					$db->query();
			}
			else
			{
					$wall = &JTable::getInstance('Wall', 'Table');
					$wall->user_id 		= $user->id;					
					$wall->type			= 'text';
					$wall->commenter_id	= $user->id;
					$wall->group_id		= NULL;
					$wall->user_name	= '';
					$wall->avatar		= '';
					$wall->message		= $message;
					$wall->reply		= 0;
					$wall->is_read		= 0;
					$wall->is_pm		= 0;
					$wall->is_reply		= 0;
					$wall->posted_id	= NULL;
					$wall->wall_date	= time();
					if (!$wall->store()){				

					}
					$feedsource = basename($imgpath, ".png");
					
					$query = "INSERT INTO #__awd_wall_social_feeds(wallid,type) VALUES(" . $wall->id . ",'".$feedsource."')";
					$db->setQuery($query);
					$db->query();
			}
				
			}
			else
			{
					$wall = &JTable::getInstance('Wall', 'Table');
					$wall->user_id 		= $user->id;					
					$wall->type			= 'text';
					$wall->commenter_id	= $user->id;
					$wall->group_id		= NULL;
					$wall->user_name	= '';
					$wall->avatar		= '';
					$wall->message		= $message;
					$wall->reply		= 0;
					$wall->is_read		= 0;
					$wall->is_pm		= 0;
					$wall->is_reply		= 0;
					$wall->posted_id	= NULL;
					$wall->wall_date	= time();
					if (!$wall->store()){				

					}
					$feedsource = basename($imgpath, ".png");
					
					$query = "INSERT INTO #__awd_wall_social_feeds(wallid,type) VALUES(" . $wall->id . ",'".$feedsource."')";
					$db->setQuery($query);
					$db->query();
					
			}
		
		}
	
	}
Example #15
0
 function getJomwallUserAvatar($userid)
 {
     if (!class_exists('AwdwallHelperUser')) {
         require_once JPATH_SITE . DS . 'components' . DS . 'com_awdwall' . DS . 'helpers' . DS . 'user.php';
     }
     $awduser = new AwdwallHelperUser();
     $uimage = $awduser->getAvatar($userid);
     return $uimage;
 }
Example #16
0
	function getList(&$params)
	{ 
 	 
		$db			=& JFactory::getDBO();
		$user		=& JFactory::getUser();
		$userId		= (int) $user->get('id');
		$Itemid		=JomWallGroupsHelper::getComItemId();
		$count		= (int) $params->get('count', 5);
		$ordering		= trim( $params->get('ordering1') );
		$topgroup=$params->get('topgroup', '');
	  $groupModel = new AwdwallModelGroup();
	 	if(!empty($user->id))
		{
			$uid=$user->id;
			$sql="Select * from #__awd_groups ";
			if($topgroup)
			{
				$sql=$sql." where id!=".$topgroup." ";
			}			
				if($ordering==0)
				{
				$order=" Order by id desc";
				
				} else {
				
				$order=" Order by rand()";
				
				}
			 $sql.=$order;
			 $db->setQuery($sql);
			 $grows = $db->loadObjectList();
			
			 $ids=array();
				foreach($grows as $row)
				{
					if($row->privacy==1)
					{
						$ids[]=$row->id;		
					}
					else
					{
					
						$sql="select group_id from #__awd_groups_members where user_id=".$uid." and status=1 and group_id=".$row->id;
						 
						$db->setQuery($sql);
						$gid = $db->loadResult();
						if(!empty($gid))
						{
							$ids[]=$row->id;
							 
						}
					}
				}
			
			 if(count($ids>0))
			 {
			 	$gids=implode(",",$ids);
				if($ordering==0)
				{
				$order=" Order by id desc";
				
				} else {
				
				$order=" Order by rand()";
				
				}
	 			$sql="Select * from #__awd_groups where id in (".$gids.") ".$order;
				 $db->setQuery($sql, 0, $count);
				 $rows = $db->loadObjectList();

			 }
			
		}
		else
		{
			$sql="Select * from #__awd_groups where privacy=1 ";
			if($topgroup)
			{
				$sql=$sql." and id!=".$topgroup." ";
			}			
			if($ordering==0)
			{
				$order=" Order by id desc";
			
			} else {
			
			$order=" Order by rand()";
			
			}
			 $sql.=$order;
			 $db->setQuery($sql, 0, $count);
			 $rows = $db->loadObjectList();
		}
		 
		
		$i		= 0;
		$lists	= array();
		if($rows)
		{
			foreach ( $rows as $row )
			{
				$nofPosts = $groupModel->countPostGrp($row->id);
				$nofMembers = $groupModel->countMemGrp($row->id) + 1;
				$lists[$i]->thumb = AwdwallHelperUser::getBigGrpImg133($row->image,$row->id); 
				$lists[$i]->title = $row->title;
				$lists[$i]->id = $row->id;
				$lists[$i]->descr= $row->description;
				$lists[$i]->nofPosts= $nofPosts;
				$lists[$i]->nofMembers= $nofMembers;
				$lists[$i]->created_date= $row->created_date;
				$lists[$i]->link= 'index.php?option=com_awdwall&task=viewgroup&groupid='.$row->id.'&Itemid='.$Itemid;
				$lists[$i]->memberlink= 'index.php?option=com_awdwall&task=grpmembers&groupid='.$row->id.'&Itemid='.$Itemid;
					$i++;
			}
		}
		
		return $lists;
	}
Example #17
0
        <li class="separator"> </li>
		<li class="no"> <a href="<?php echo JRoute::_('index.php?option=com_users&view=login&Itemid='.$Itemid, false);?>" title="<?php echo JText::_('Sign out');?>" ><img src="components/com_awdwall/images/logoutbutton.png" alt="<?php echo JText::_('Sign out');?>" title="<?php echo JText::_('Sign out');?>" class="imglogout" /></a> </li>
		<?php }?>
      </ul>
      <div class="searchWall">
         <form action="#" name="frm_auto_search" id="frm_auto_search" method="post">
          <input id="search_user" name="search_user" class="search_user ac_input" type="text" />
        </form>
      </div>
    </div>
  </div>
 <div class="awdfullbox fullboxtop  clearfix"> <span class="bl"></span>
<div style="width:100%;padding:20px;">
<form name="frmUploadAvatar" id="frmUploadAvatar" enctype="multipart/form-data" method="post" action="index.php?option=com_awdwall&view=awdwall">
<h3><?php echo JText::_('Upload Your Avatar');?></h3>
<p><label><?php echo JText::_('Current Avatar');?>:</label> <img src="<?php echo AwdwallHelperUser::getBigAvatar($this->user->user_id);?>" alt="Avatar" width="" height="" /></p>
<p><label><?php echo JText::_('New Avatar');?>:</label> <input type="file" name="avatar" id="avatar" /></p>
<p><strong><?php echo JText::_('Basic Information');?>:</strong></p>
<p><label><?php echo JText::_('Gender');?>:</label> 
<?php echo $this->listGender;?></p>
<p><label><?php echo JText::_('Birthday');?>:</label> <input type="text" name="birthday" id="birthday" maxlength="100" size="20" value="<?php echo $this->user->birthday;?>" />(<?php echo JText::_('DMY');?>)</p>
<p><label><?php echo JText::_('About Me');?>:</label> <textarea name="aboutme" id="aboutme" rows="5" cols="30"><?php echo $this->user->aboutme;?></textarea></p>
<br style="clear:both;"/>
<p class="submit"><input type="submit" name="submit" id="submit" value="Submit" /></p>
<input type="hidden" name="cbuser" id="cbuser" value="<?php echo $this->user->user_id;?>" />
<input type="hidden" name="task" id="task" value="saveAvatar" />
<input type="hidden" name="itemid" id="itemid" value="<?php echo $Itemid;?>" />
</form>
</div>
</div>
</div>
Example #18
0
//$Itemid = AwdwallHelperUser::getComItemId();
// get user object

?>
<div class="whitebox" id="c_block_<?php echo $this->wid;?>">
  <div class="clearfix">
    <div class="subcommentImagebox"><a href="<?php echo $profilelink;?>">
		<img src="<?php echo AwdwallHelperUser::getBigAvatar32($user->id);?>" alt="<?php echo AwdwallHelperUser::getDisplayName($user->id);?>" title="<?php echo AwdwallHelperUser::getDisplayName($user->id);?>"  height="32" width="32"  class="awdpostavatar" />
	</a></div>
    <div class="subcomment">
      <div class="rbroundbox">
        <div class="rbtop">
          <div></div>
        </div>
        <div class="rbcontent"><a href="<?php echo JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid=' . $user->id . '&Itemid=' . $Itemid, false);?>" class="authorlink"><?php echo AwdwallHelperUser::getDisplayName($user->id);?></a>&nbsp;&nbsp;<?php echo nl2br(AwdwallHelperUser::showSmileyicons($this->msg));?>
          <div class="subcommentmenu"> <span class="wall_date"><?php echo AwdwallHelperUser::getDisplayTime($this->postedTime);?></span>
          
<span id="commentlike_<?php echo $this->wid;?>">          
<?php
$canlike = $wallModel->getLikeOfMsgOfUser($this->wid,$user->id);
if($displayCommentLike){
	if(!$canlike){
?>
	&nbsp;&nbsp;
	<a href="javascript:void(0);" onclick="openLikeCommentBox('<?php echo JURI::base().'index.php?option=com_awdwall&view=awdwall&task=addlikemsg&wid=' . (int)$this->wid . '&cid=' .(int)$user->id.'&tmpl=component';?>', '<?php echo JURI::base().'index.php?option=com_awdwall&view=awdwall&task=getclikemsg&wid=' . (int)$this->wid . '&tmpl=component&Itemid='.$Itemid;?>', '<?php echo (int)$this->wid;?>');"><?php echo JText::_('Like');?></a> &nbsp;&nbsp;
<?php
	}
	else
	{
?>
	&nbsp;&nbsp;
Example #19
0
				},
				onClosed:function() {
					AWDminiprofile('html, body').css('overflow', ''); // page scrollbars on
				}
			});
	   }
	});

}

</script>
<div class="moduletable<?php echo $params->get('moduleclass_sfx'); ?>">
<a href="<?php echo $mywalllink;?>" >
<div style="width:100%; height:150px; overflow:hidden; background-image:url('<?php echo AwdwallHelperUser::getBigAvatar133($user->id);?>'); background-position:center; background-repeat:no-repeat; border:0px solid #FF0000;"></div>
</a>
<div style="height:40px; background: rgba(0, 0, 0, 0.5); margin-top:-30px; color:#ffffff; font-weight:bold; font-size:16px; padding:10px; width:inherit;"><span style=" width:80%; height:18px;line-height:18px; overflow:hidden; display:block; margin:0px; padding:0px;"><?php echo AwdwallHelperUser::getDisplayName($user->id);?></span><span style=" width:80%; font-size:9px;  display:block; margin:0px; padding:0px; line-height:11px;"><?php echo $userstatus;?></span>

<div id="awdmodmenu">
  <ul>
    <li> <a href="javascript:void(0)" id="awdmodlinknotification"> <img src="<?php echo JURI::base().'components/com_awdwall/';?>images/default/8.png"  /> <span id="mes"></span> </a>
      <ul class="awdmodsub-menu">
        <li class="awdmodegg">
          <div class="awdmodtoppointer"><!--<img src="<?php echo JURI::base();?>modules/mod_jomwallminiprofile/images/top.png" />--></div>
          <div id="awdmodtwo_comments">
          <div class="awdmodcomment_ui">
            <div class="awdmodcomment_text">
              <div  class="awdmodcomment_actual_text"><center><?php echo JText::_("No new Notice");?></center></div>
            </div>
          </div>
          </div>
        </li>
Example #20
0
                                <label for="form-name" class="form-label"><?php echo $colrow4->value;?></label>
                                <div class="form-input"><?php  echo nl2br($row->col5); ?></div>
                            </div>
                            <?php } ?>
                            
                            
              			</form>
              
              
              </div>
              <div class="hightlightboxright"> 
              
              
            <table  border="0" cellspacing="0" cellpadding="0" align="right">
  <tr>
    <td align="center"><img src="<?php echo AwdwallHelperUser::getBigAvatar133($_REQUEST['wuid']);?>" class="avtartool"  /></td>
  </tr>
  <tr>
    <td align="left"><br /><?php echo JText::sprintf('USERWALL',$usermywalllink, $username);?></td>
  </tr>
  <tr>
    <td align="left"><br /><?php echo JText::sprintf('USERGALLERY',$usergallerylink,$username);?></td>
  </tr>
</table>
				
			  
             
				
			 
              </div>
            </div>
Example #21
0
		}
?> 
  <div class="  awdlist-item" id="msg_block_<?php echo $this->users[$i]->id;?>">
      <div style=" width:55px; float:left;">	
      <a href="<?php echo $profilelink;?>">
	<img src="<?php echo AwdwallHelperUser::getBigAvatar51($this->users[$i]->id);?>"  title="<?php echo AwdwallHelperUser::getDisplayName($this->users[$i]->id)?>" border="0"  height="50" width="50" class="awdpostavatar"/>	  </a>	  </div>

    <div style="width:95px; float:right;">	
	<ul class="walltowall">
	<li style="white-space: nowrap !important;"><a style="font-size:12px;" class="awdtitle" href="<?php echo JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid=' . $this->users[$i]->id . '&Itemid=' . $Itemid, false);?>"><?php echo AwdwallHelperUser::getDisplayName($this->users[$i]->id);?></a>&nbsp;&nbsp;	</li>
	</ul>
  <div class="commentinfo"> <span class="add_as_friend" id="awd_invite_div_<?php echo $this->users[$i]->id;?>">
  <?php 
  if($result == 'invite'){
  ?>
  <a href="javascript:void(0);" onclick="openInviteBox('<?php echo 'index.php?option=com_awdwall&task=invite&groupid=' . $this->grpInfo->id . '&userid=' . $this->users[$i]->id;?>', '<?php echo JText::sprintf('Are you sure you want to invite this user', AwdwallHelperUser::getDisplayName($this->users[$i]->id));?>', '<?php echo JText::sprintf('Invite Confirm', AwdwallHelperUser::getDisplayName($this->users[$i]->id), AwdwallHelperUser::getDisplayName($this->users[$i]->id));?>', <?php echo $this->users[$i]->id; ?>);" title="<?php echo JText::_('Invite');?>"><?php echo JText::_('Invite');?></a>
  <?php }elseif($result == 'waiting'){?>
   <b><?php echo JText::_('Waiting for authorization');?></b>
  <?php }else{?>
  <?php echo JText::_('Invited');?>
  <?php }?>
  </span>
	<!--end pm box -->
		</div>
	 
	  
    </div>
  </div>
 <!-- end block msg -->
<?php 
	}// end for 
Example #22
0
 * @version 3.0
 * @package Jomwall-Joomla
 * @author   AWDsolution.com
 * @link http://www.AWDsolution.com
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * @copyright Copyright (C) 2009 AWDsolution.com. All rights reserved.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// include js and css
require_once(JPATH_COMPONENT . DS . 'js' . DS . 'include.php');
// get user object
$user = &JFactory::getUser();
$Itemid = AwdwallHelperUser::getComItemId();
//$Itemid = $_REQUEST['Itemid'];
$cbItemid = AwdwallHelperUser::getJsItemId();
$friendJsUrl = 'index.php?option=com_awdwall&task=friends&Itemid=' . $Itemid;
$groupsUrl = JRoute::_('index.php?option=com_awdwall&task=groups&Itemid=' . $Itemid, false);
$wallalbumfile = JPATH_SITE . '/components/com_awdjomalbum/awdjomalbum.php';
if (file_exists($wallalbumfile)) // if com_awdjomalbum install then only
{
	$showalbumlink=true;
	$infolink="index.php?option=com_awdjomalbum&view=userinfo&wuid=".$user->id."&Itemid=".$Itemid;
	$albumlink="index.php?option=com_awdjomalbum&view=awdalbumlist&wuid=".$user->id."&Itemid=".$Itemid;
}
else
{
	$showalbumlink=false;
	$infolink='';
	$albumlink="";
}
Example #23
0
<link href="<?php echo JURI::base();?>components/com_awdwall/css/jquery.popover.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/<?php echo $jqueryversion; ?>/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdjomalbum/js/functions.js"></script>
<script type="text/javascript">jQuery.noConflict();var siteUrl = '<?php echo JURI::base();?>';</script>
<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdwall/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdwall/js/jquery.autocomplete.js"></script>

<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdjomalbum/js/ui.notificationmsg.js"></script>

<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdjomalbum/js/jquery.colorbox.js"></script>
<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdjomalbum/js/jquery.loadmask.js"></script>
<script type="text/javascript" src="<?php echo JURI::base();?>components/com_awdwall/js/jquery.popover.js"></script>
<input type="hidden" id="select_temp" value="<?php echo $template; ?>"/>

<input type="hidden" id="Itemid" value="<?php echo AwdwallHelperUser::getComItemId(); ?>"/>
<form method="post" action="index.php?option=com_users&task=user.logout" name="awdlogoutfrm" >
<input type="hidden" value="<?php echo $mainlink;?>" name="return" />
<input type="hidden" value="1" name="<?php echo JSession::getFormToken();?>" />
</form>

<style>

.successbox, .warningbox, .errormsgbox {

	margin: 0px 0px;

	padding:5px 10px 5px 25px;

	background-repeat: no-repeat;
Example #24
0
{
$query= "SELECT *,#__awd_jomalbum_photos.id as pid FROM #__awd_jomalbum inner join #__awd_jomalbum_photos on  #__awd_jomalbum.id=#__awd_jomalbum_photos.albumid WHERE  privacy=1 and  #__awd_jomalbum.userid=".$userid." order by #__awd_jomalbum_photos.id desc limit ".$imagelimit;
}
if($privacy==2)
{
$query= "SELECT *,#__awd_jomalbum_photos.id as pid FROM #__awd_jomalbum inner join #__awd_jomalbum_photos on  #__awd_jomalbum.id=#__awd_jomalbum_photos.albumid WHERE  privacy=2 and  #__awd_jomalbum.userid=".$userid." order by #__awd_jomalbum_photos.id desc limit ".$imagelimit;
}
if($privacy==0)
{
$query= "SELECT *,#__awd_jomalbum_photos.id as pid FROM #__awd_jomalbum inner join #__awd_jomalbum_photos on  #__awd_jomalbum.id=#__awd_jomalbum_photos.albumid WHERE  privacy=".$privacy." and  #__awd_jomalbum.userid=".$userid." order by #__awd_jomalbum_photos.id desc limit ".$imagelimit;
}
$db->setQuery($query);
$puser_rows=$db->loadObjectList();
foreach($puser_rows as $puser_row)
{
$link 	=JRoute::_('index.php?option=com_awdjomalbum&view=awdimagelist&tmpl=component&pid='.$puser_row->pid.'&albumid='.$puser_row->albumid.'&Itemid='.AwdwallHelperUser::getComItemId());
$cquery= "SELECT count(*) FROM #__awd_jomalbum_comment where photoid=".$puser_row->pid;
$db->setQuery($cquery);
$commentcount=$db->loadResult();

?>
<div style="width:102px;margin:8px;   height:86px; float:left;">
<div  style="width:102px; height:76px; background-position:center; border:1px solid #CCCCCC; padding:4px; float:left;">
<a href="javascript::void(0)"  onclick="awdlighbox('<?php echo $link;?>');"><div style="background-image:url(<?php echo JURI::base();?>images/awd_photo/awd_thumb_photo/<?php echo $puser_row->image_name; ?>); background-repeat:no-repeat; width:102px; height:76px; background-position:center; float:left;"></div></a>
</div>
<div style="clear:both; height:5px;"></div>
<span style="width:100%; font-size:11px;"><?php if($commentcount){echo $commentcount.' '.JText::_('COMMENTS');}?></span>
</div>

<?php
}
Example #25
0
 <!-- end msg content --> 
 </div>
 
<div id="dialog_like_box" title="<?php echo JText::_('Like This Post');?>" style="display:none"> <?php echo JText::_('Are you sure you want to like this post');?> <br />
  <br />
  <span id="like_loader"></span>
  <input type="hidden" name="like_url" id="like_url" />
  <input type="hidden" name="who_like_url" id="who_like_url" />
  <input type="hidden" name="who_like_wid" id="who_like_wid" />
</div>
<div id="dialog_add_as_friend" title="<?php echo JText::_('Add as Friend');?>" style="display:none;"> <?php echo JText::_('Are you sure you want to add this people as Friend');?> <br />
  <br />
  <span id="add_as_friend_loader"></span>
  <input type="hidden" name="add_as_friend_url" id="add_as_friend_url" />
</div>
<div id="dialog_add_as_friend_msg" title="<?php echo JText::_('Add as Friend');?>" style="display:none;"> <?php echo JText::sprintf('ADD FRIEND CONFIRM', AwdwallHelperUser::getDisplayName($userWall->id), AwdwallHelperUser::getDisplayName($userWall->id));?> <br />
  <span id="add_as_friend_loader"></span> </div>
<div style="display: none;" id="awdlightbox-panel">
  <div id="awdlightcontentbox"></div>
  <p align="center;" style="clear:left; text-align:center;"> <a id="close-panel" href="JavaScript::void(0)" onclick="closelistbox();"><?php echo JText::_('Close');?></a> </p>
</div>
<div style="display: none;" id="awdlightbox"></div>
<script type="text/javascript">
// jQuery(".rbroundboxrighttop").height(jQuery(".awdfullbox").height());
<?php  if($template=='default') { ?>
if(jQuery(".rbroundboxrighttop").height() < jQuery(".rbroundboxleft_user").height())
{
 jQuery(".rbroundboxrighttop").height(jQuery(".rbroundboxleft_user").height());
 }
 
 
Example #26
0
$user =& JFactory::getUser();

$totLike=$this->totLike;

?>

<div style="width:100%; text-align:left;"><?php echo $totLike.'&nbsp;'.JText::_('People like this comment');?></div>

<?php

foreach($rows as $row)

{

$userprofileLinkAWDCUser=JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid='.$row->userid.'&Itemid='.AwdwallHelperUser::getComItemId());

		 $values=getCurrentUserDetails($row->userid);  

		 $avatarTable=$values[2];

		 

	

	$values1=getUserDetails($row->userid,$avatarTable,$user->id); 

	$imgPath1=$values1[0];

	 
Example #27
0
		$profilelink=JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid=' . $comment->commenter_id.'&Itemid=' . $Itemid, false);
?>
<div class="whitebox" id="c_block_<?php echo $comment->id;?>">
  <div class="clearfix">
    <div class="subcommentImagebox"><a href="<?php echo $profilelink;?>">
		<img src="<?php echo AwdwallHelperUser::getBigAvatar32($comment->commenter_id);?>" alt="<?php echo AwdwallHelperUser::getDisplayName($comment->commenter_id);?>" title="<?php echo AwdwallHelperUser::getDisplayName($comment->commenter_id);?>"  height="32" width="32" class="awdpostavatar" />
	</a></div>
    <div class="subcomment">
      <div class="rbroundbox">
        <div class="rbtop">
          <div></div>
        </div>
        <div class="rbcontent">
			<a href="<?php echo $profilelink;?>" class="authorlink"><?php echo AwdwallHelperUser::getDisplayName($comment->commenter_id);?></a>&nbsp;&nbsp;<?php echo stripslashes(AwdwallHelperUser::showSmileyicons($comment->message));?>
          <div class="subcommentmenu"> 
		  <span class="wall_date"><?php echo AwdwallHelperUser::getDisplayTime($comment->wall_date);?></span>
        <span id="commentlike_<?php echo (int)$comment->id;?>">          
        <?php
		if((int)$user->id ) {
        $canlike = $this->wallModel->getLikeOfMsgOfUser($comment->id,$user->id);
        if($this->displayCommentLike){
            if(!$canlike){
        ?>
            &nbsp;&nbsp;
            <a href="javascript:void(0);" onclick="openLikeCommentBox('<?php echo 'index.php?option=com_awdwall&view=awdwall&task=addlikemsg&wid=' . (int)$comment->id . '&cid=' .(int)$user->id.'&tmpl=component';?>', '<?php echo 'index.php?option=com_awdwall&view=awdwall&task=getclikemsg&wid=' . (int)$comment->id . '&tmpl=component&Itemid='.$Itemid;?>', '<?php echo (int)$comment->id;?>');"><?php echo JText::_('Like');?></a> &nbsp;&nbsp;
        <?php
            }
            else
            {
        ?>
            &nbsp;&nbsp;
Example #28
0
	<input type="hidden" name="c_delete_block_id" id="c_delete_block_id" />
</div>
<div id="dialog_like_box" title="<?php echo JText::_('Like This Post');?>" style="display:none;">
	<?php echo JText::_('Are you sure you want to like this post');?>
	<br />
	<br />
	<span id="like_loader"></span>
	<input type="hidden" name="like_url" id="like_url" />
	<input type="hidden" name="who_like_url" id="who_like_url" />
	<input type="hidden" name="who_like_wid" id="who_like_wid" />	
</div>
<div id="dialog_pm_delete_box" title="<?php echo JText::_('Delete Private Message');?>" style="display:none;">
	<?php echo JText::_('Are you sure you want to delete this PM');?>
	<br />
	<br />
	<span id="pm_delete_loader"></span>
	<input type="hidden" name="pm_delete_url" id="pm_delete_url" />
	<input type="hidden" name="pm_delete_block_id" id="pm_delete_block_id" />
</div>
<div id="dialog_add_as_friend" title="<?php echo JText::_('Add as Friend');?>" style="display:none;">
	<?php echo JText::_('Are you sure you want to add this people as Friend');?>
	<br />
	<br />
	<span id="add_as_friend_loader"></span>
	<input type="hidden" name="add_as_friend_url" id="add_as_friend_url" />	
</div>
<div id="dialog_add_as_friend_msg" title="<?php echo JText::_('Add as Friend');?>" style="display:none;">
	<?php echo JText::sprintf('ADD FRIEND CONFIRM', AwdwallHelperUser::getDisplayName($userWall->id), AwdwallHelperUser::getDisplayName($userWall->id));?>
	<br />
	<span id="add_as_friend_loader"></span>
</div>
Example #29
0
					<div style="display: none; " id="dropAlerts">
					  <div class="notiItemsWrap">
						<div class="txtWrap"><center><?php echo JText::_("No new Notice");?></center></div>
					  </div>
					</div>
				</li>
			</ul>  
		</li>
		<?php }?>
		
        <li class="no signout" style="float:right;"> <a href="javascript:void(0)" title="<?php echo JText::_('Sign out');?>"  onclick="awdsignout();"><img src="<?php echo JURI::base().'components/com_awdwall/';?>images/<?php echo $template;?>/logoutbutton.png" alt="<?php echo JText::_('Sign out');?>" title="<?php echo JText::_('Sign out');?>" class="imglogout" /></a> </li>
		<li style="float:right;" class="toolbaravtar">
        <a href="<?php echo JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&Itemid=' . $Itemid, false);?>" title="<?php echo JText::_('My Wall');?>"  <?php if($layout == 'mywall') {echo 'class="active"';} ?>>
        <div style="height:32px; margin-right:15px; ">
        <div style=" float:left; width:32px; height:32px;box-shadow: 0px 0px 3px #fff;"><img src="<?php echo AwdwallHelperUser::getBigAvatar32($user->id);?>" class="avtartool "  height="32" width="32"/></div>
        <div style=" float:left; width:auto; margin-left:6px;padding-top:3px; height:32px;"><?php echo AwdwallHelperUser::getDisplayName($user->id);?></div>
        </div>
        </a>
        </li>
        <?php }?>
      </ul>
    </div>
  </div>
 <div class="awdfullbox fullboxtop  clearfix"> <span class="bl"></span>
<div id="awd_newgroup">
<?php JHTML::_('behavior.formvalidation'); ?>
<script language="javascript">
function myValidate(f) {
   if(document.formvalidator.isValid(f)){      
      return true; 
   }
Example #30
0
</div>
<?php }?>
<!-- end file block -->

<!--start comment block -->

   <!-- start older comments-->
	</div>
	<!--end comment block-->	
    </div>
	</div>
</div>
</div><?php if(!$this->msgs[$i]->group_id){?>
<?php if(count($friends)){?>
<div style="clear:both; height:5px;"></div>
<span style="font-size:11px; font-weight:bold;">
<?php 
echo JText::sprintf('COM_COMAWDWALL_FRIEND_LIST', AwdwallHelperUser::getDisplayName($this->msgs[$i]->commenter_id));
?>
</span>
<div style="clear:both; height:5px;"></div>
<?php if(count($friends)){?>
<?php foreach($friends as $friend){?>
		  <a href="<?php echo JRoute::_('index.php?option=com_awdwall&view=awdwall&layout=mywall&wuid=' . $friend->connect_to .'&Itemid=' . $Itemid, false);?>" style="text-decoration:none;">
		<img src="<?php echo AwdwallHelperUser::getBigAvatar32($friend->connect_to);?>" alt="<?php echo AwdwallHelperUser::getDisplayName($friend->connect_to);?>" title="<?php echo AwdwallHelperUser::getDisplayName($friend->connect_to);?>" style="float:left;margin-top:0px;margin-right:3px;margin-left:3px;box-shadow: 0px 0px 3px #ccc;"  height="32" width="32"/></a>
<?php } ?>
<?php } ?>
<?php } ?>
<?php } ?>
<?php } }?>