Page 6 of 7

Re: PhocaGallery with Community Builder

Posted: 18 Sep 2011, 09:23
by zegi
hello
I wonder if there is a change from your last post.
joom gallery and is still in 1.5

Re: PhocaGallery with Community Builder

Posted: 22 Sep 2011, 23:15
by Jan
Hi, there was some CB plugin for Phoca Gallery in extensions.joomla.org - try to recheck it.

Jan

Re: PhocaGallery with Community Builder

Posted: 30 Oct 2011, 01:45
by hiya83
Hi,

I just tried to look for the CB plugin for phoca gallery on joomla extensions website and am unable to find it. Could you please direct me to it?

Thanks!

Re: PhocaGallery with Community Builder

Posted: 30 Oct 2011, 02:12
by hiya83
FYI, reason I am asking is cause the plugin's posted earlier on this thread are j1.5 only, and I am looking for something for J1.7

Thanks

Re: PhocaGallery with Community Builder

Posted: 02 Nov 2011, 01:10
by Jan
Hi, I didn't do this extensions so not followed it, but I think, it was there, maybe it was removed by JED administrators - I think, it was in area Phoca Gallery:
http://extensions.joomla.org/extensions ... extensions

Re: PhocaGallery with Community Builder

Posted: 22 Nov 2011, 15:32
by icatian
i'm looking too for that integration, but i'm still unable to find it :\

Re: PhocaGallery with Community Builder

Posted: 16 Jan 2012, 18:49
by icatian
any news about cb integration for phoca gallery?

nothing avaible on the web atm :(

Re: PhocaGallery with Community Builder

Posted: 16 Jan 2012, 19:58
by Jan
Hi, if there is no working on JED then still creating some integration is waiting as high priority tasks must be done first :-(

https://www.phoca.cz/phoca-needs-your-help/

:-(
Jan

Re: PhocaGallery with Community Builder

Posted: 17 Jan 2012, 19:27
by icatian
i've found this searching on the web

Code: Select all

<?php
/**
* Phoca Gallery CB user plugin with tab classes for handling display of latest photos on user profile.
* @version $Id: cb.connections.php 609 2006-12-13 17:30:15Z beat $
* @package Community Builder
* @subpackage phoca.php
* @author Vipindas V G. 
* @copyright (C) www.phoca.cz and www.joomlapolis.com [Respective]
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 1.0
*/

/** ensure this file is being included by a parent file */
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
JHtml::_('behavior.modal');
class getphocaTab extends cbTabHandler {
	/**
	 * Construnctor
	 */
	function getphocaTab() {
		$this->cbTabHandler();
	}
	/**
	 * Generates the HTML to display the user profile tab
	 * @param  moscomprofilerTab   $tab       the tab database entry
	 * @param  moscomprofilerUser  $user      the user being displayed
	 * @param  int                 $ui        1 for front-end, 2 for back-end
	 * @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
	 */
	function getDisplayTab($tab,$user,$ui) {
		$return = null;
		global $mainframe;
		$db   =& JFactory::getDBO();
		$user_log =& JFactory::getUser();
		
		//Taking parameters
		$params = $this->params; 		
		$is_phoca_plug_enabled = $params->get('hwPlugEnabled', "1");
		$phoca_tab_message = $params->get('hwTabMessage', "Phoca Gallery Plugin!");
		$hwPlugShowTitle = $params->get('hwPlugShowTitle', "1");
		$hwTabStripTitle = $params->get('hwTabStripTitle', "1");
        $hwTabStripTitleLength = (int)$params->get('hwTabStripTitleLength',10);
        $hwTabNoPhotoMessage = $params->get('hwTabNoPhotoMessage','Sorry no pictures available.');

		if ($is_phoca_plug_enabled != "0") {
			//Show the description
			if($tab->description != null) {
				$return .= "\t\t<div class=\"tab_Description\">"
					. $tab->description	
					. "</div>\n";
			}
			//Main query
			$query="SELECT photos.filename as filename, photos.title as title, cats.id as catid "
			. "\n FROM #__phocagallery as photos "
			. "\n JOIN #__phocagallery_categories as cats "
			. "\n ON cats.id = photos.catid "
			. "\n WHERE cats.published = 1 "	//Where the category is published?
			. "\n AND cats.approved= 1 "		//And the category is approved?
			. "\n AND photos.published= 1 "		//And the image is published?
			. "\n AND photos.approved= 1 "		//And the image is approved?
			. "\n AND cats.owner_id= ".$user->id	//Take the user
			. "\n ORDER BY photos.ordering ASC LIMIT 6";
			 
			$db->setQuery($query);			
			$pgitems=$db->loadObjectList();
	
			if(count($pgitems) >0 ){
				foreach($pgitems as $imageitem) {
					$photoTitle = trim($imageitem->title);
					$strippedTitle = $photoTitle;
					if($hwTabStripTitle != "0"){
						$strippedTitle = substr($photoTitle,0,$hwTabStripTitleLength);
						if($photoTitle!=$strippedTitle){
							$strippedTitle = $strippedTitle."...";
						}
					}
					
					if($hwPlugShowTitle != "0"){
					$return .='<div style="text-align: center; width: 100px; float: left;" >
									<a href="images/phocagallery/'.$imageitem->filename.'" class="modal"><strong>'.$strippedTitle.'</strong></a><br/>';
					}
					
					$return .='<div style="height: 60px;">
									<a href="images/phocagallery/'.$imageitem->filename.'" class="modal"><img src="images/phocagallery/'.$imageitem->filename.'"
									border="0" width="80" height="60" title="'.$photoTitle.'" alt="'.$photoTitle.'" /></a></div></div>';
				}
			}
			else{
				$return .='<div>'.$hwTabNoPhotoMessage.'</div>';
			}	

			if($user->id==$user_log->id) {
			$return .= '<div style="width:100%;float:left;text-align:center;"><a href="/upload" target="_blank" style="color:blue">Add pictures<a></div>';
			}
			$return .= '<div style="clear: both;"> </div>';
		}
		else{
			$return = "\t\t<div class=\"tab_Description\"> This plugin was not enabled.</div>";
		}
		return $return;
	}  
}  
?>
this plugin creates a new tab in the user's profile page, but it doesn't show the user's uploaded pictures...
maybe there is a mistake somewhere in the code, but i'm not able to find it.
hoping it will help you,
good luck and good work jan!

Re: PhocaGallery with Community Builder

Posted: 20 Jan 2012, 13:35
by icatian
zanmeitu wrote:Hi, thank you for this plugin.
ehm...
maybe you found a way to make that php work?
Because i'm not able to activate it...

Share with us! :P