Welcome, Guest. Please login or register.
Did you miss your activation email?

Advanced search

22748 Posts in 6706 Topics- by 17591 Members - Latest Member: permsk

04-04-2020 16:53:02
  Show Posts
Pages: [1]
1  Archive / Interaction with other components / Re: plg_joomgallery > jomsocial on: 14-06-2010 01:17:00
Congrats You, Chraneco!

I tried this code:

$db = & JFactory::getDBO();
$query = "SELECT cid FROM #__joomgallery_catg WHERE owner = ".$userid." ORDER BY cid ASC LIMIT 1";
$catid = $db->loadResult();

above (earlier) I added this code:

define('_JOOM_ITEMID', '&Itemid=17');

and now
<a href="index.php?option=com_joomgallery&func=viewcategory&catid='.$catid._JOOM_ITEMID.'

the link to user's gallery working properly  Cool

Thanks a lot, Chraneco - one of our problems has been solved thanks to you!

Regards with respect: Burov

p.p.s - this joomGallery plugin (for jomSocial) was written under GNU/GPL licence, and is completely free!
2  Archive / Interaction with other components / Re: plg_joomgallery > jomsocial on: 12-06-2010 19:26:58
Hi, thanks for reply!

I tried this:
define('_JOOM_ITEMID', '&Itemid=X');

and this:
Please replace X with a valid Itemid of JoomGallery.
Additionally '$row1->cid' has to be replaced with the ID of the user's category.

I tried to replase default ('.$row1->cid._JOOM_ITEMID.') with "=viewcategory&catid='.$userid.", cuz our gallery has no user parent category:

<?php if (!$own && $params->get('showPublic', '1') == 0)
{ echo JText::_( '...' );  }
{ echo JText::_( '<a href="index.php?option=com_joomgallery&func=viewcategory&catid='.$userid._JOOM_ITEMID.'" title="Comming soon...">View all Pictures</a>' );  } ?>

and site returns me:

> where =17 is joomgallery menu Itemid - this is OK! (the link to gallery is /index.php?option=com_joomgallery&Itemid=17)
> where =74 is my own user id - this is OK too!

but... the gallery is not points me to my album and site said: access denied! u dont permission to view this!

gallery works perfect as i said before! im using ur plugin JoomAutoCat 1.5 BETA2 for users categories - Our site has no categories - each user has its own album

In administration of plugin JoomAutoCat (User - AutoCreation of Categories) settings are:
Parent Category = (empty) [not set cuz we have no user parent category!]   
Publish?    = YES
Access Level    = Public
Check on every login? = NO

in JoomGallery administration > Joomgallery > User Access Rights > User Upload:

Allow Userspace = YES
Admin Approval needed = NO
Allowed Category = EMPTY (not set)
Usercategories = YES
Allowed for usercategories = EMPTY (not set)
Allow users to change the acces level = YES
max. Usercategories = 1000
Upload images only on own categories = YES
Max number of images = 1000000
etc, etc.

we're using JoomGallery and Joomla 1.5.15 and JomSocial 1.7.21

Тhese days I downloaded from your site plugin for CB (CB GalleryTab 4) and examine it carefully - it is pretty and looks beautiful settings! Ok, thats right, but i dont like CB - I used a CB 2 years - yep it is a cool component but JomSocial gives us more freedom and allows us to set up a modern social network - YES it is a paid component - but from version 1.7.18 JomSocial is under GNU/GPL - this gives us the freedom to further develop it, isnt it? and the future is JomSocial too :)

My questions are:

1. would you please correct my design coded (all code is pasted in my first post)

2. Can you to customize your CB plugin so that it works with jomsocial?
how much will it cost me this service?

Thanks in advance and best regards: Burov [im not a programmer - just web designer, css coder]

p.s. our site is: http://Arteist.net - this is Bulgarian ART Community - sorry but site is only for bulgarians and it is only in bulgarian language at this moment!

anyway... i'll send u a donation soon :)

3  Archive / Interaction with other components / Re: plg_joomgallery > jomsocial on: 01-05-2010 22:32:14
huh, ok - how many dollars it cost to write a reply here :) i need ur help - if you want, I'll pay as much $ as you want - just write а reply here - is it possible or not - if not possible, i'll look different decision or a php programmer to solve my problem...

4  Archive / Interaction with other components / Re: plg_joomgallery > jomsocial on: 24-04-2010 14:00:48
Just need one answer - is it possible or not? my site is 98% complete and Your answer will help me finish the site 100%.

How can i get the Joom ITEMID? look at this:
<a href="<?php echo JRoute::_('index.php?option=com_joomgallery&func=viewcategory&catid='.$row1->cid._JOOM_ITEMID); ?>">

The site always returns me: www.mysite.com/index.php?option=com_joomgallery&func=viewcategory&catid=_JOOM_ITEMID

How to make link to Artist's Gallery?

Thanks in advance!
Regards: Burov
5  Archive / Interaction with other components / plg_joomgallery > jomsocial on: 11-04-2010 12:00:42

I try to put the hack-code in plg_joomgallery plugin to show "View more from this Artist" in JomSocial User Profile but have problems - I can not figure out how to bring out Itemid or link to the albums of artists.

I carefully consider all of the code and did many tests, but I can not make the connection to album - Can you direct me in the right direction?

Here's the entire code of this plugin:

defined('_JEXEC') or die('Restricted access');
require_once( JPATH_BASE .DS.'components' .DS.'com_community' .DS.'libraries' .DS.'core.php');
class plgCommunityJoomgallery extends CApplications
var $name = "Joomgallery";
var $_name = 'Joomgallery';
var $_path = '';
var $_user = '';
var $_my = '';
function plgCommunityJoomgallery(& $subject, $config)
$this->_path      = JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_joomgallery';
       $this->_imagepath = JPATH_BASE . DS . 'components' . DS . 'com_joomgallery'.DS.'images'.DS.'entries';
       $this->_user      = CFactory::getActiveProfile();
       $this->_my          = CFactory::getUser();
       parent::__construct($subject, $config);
function onProfileDisplay()
$document    =& JFactory::getDocument();
       $css        = JURI::base() . 'plugins/community/joomgallery/style.css';
       $params[0]  = $this->params->get( 'ads' );
       $params[2]  = $this->params->get('order');
       $params[3]  = $this->params->get('thumb');        
       if( !file_exists( $this->_path . DS . 'LICENSE.txt' ) ){
           $exist = 1;
           $pictures = $this->_getAds($params);
           $exist = 1;
           $pictures    = $this->_getAds($params);
       $cache =& JFactory::getCache('plgCommunityJoomgallery');
       $cache->setCaching($this->params->get('cache', 1));
       $callback = array('plgCommunityJoomgallery', '_getJoomgalleryHTML');
       $content = $cache->call($callback, $this->_user->id, $this->_user->getDisplayName(), $exist, $pictures);      
       return $content;
function Joom_GalleryHeader()
 global $func, $catid, $id;
 $config   = Joom_getConfig();
 $database = & JFactory::getDBO();
 $user     = & JFactory::getUser();
    function _getJoomgalleryHTML($userid, $username, $exist, $pictures){
       // Test if joomgallery really exists on this environment.
       if(!$exist) {
      //removed because of problems
       } else {
<div style="float:left;">
<?php echo JText::_( 'Showing '.$pictures[1][0].' of '.$pictures[1][1].' pictures from ' ); ?>
<strong><?php echo $username ?></strong>
<div style="float:right;">
<?php if ($_my->id) { echo JText::_( '...' );  } else { echo JText::_( '<a href="index.php?option=com_joomgallery&func=viewcategory&catid='.$row1->cid._JOOM_ITEMID.'" title="Comming soon...">View all Pictures</a>' );  } ?>
<div style="clear:both;margin-bottom:4px;"></div>
<div class="" style="overflow:hidden;">
<ul style="margin:0; padding:0; list-style:none;">      
//echo $pictures[1][2];
foreach($pictures[0] as $picture) {                              
//echo $picture->imgtitle;
//echo $picture->id;
//height="'.$pictures[1][3].'" - height of JoomGallery pictures
//width="'.$pictures[1][3].'" - width of JoomGallery pictures
//&Itemid='.$pictures[1][2]' - Itemid of JoomGallery pictures
<li style="display:inline; padding:0; background:none; margin:0 3px 0 0!important;">
       <a href="<?php echo JRoute::_('index.php?option=com_joomgallery&func=detail&id='.$picture->id.'&Itemid='.$pictures[1][2]);?>"><img class="jomTips" style="border:1px solid #fff;" title="<?php echo '<center>Title: '.$picture->imgtitle.'</center> ::' ;?><?php echo '<center>Autor: '.$username.'</center>' ;?>" src="<?php echo JURI::base().'images/img_thumbnails/'.$picture->catpath.'/'.$picture->imgthumbname; ?>"
alt="" <?php echo $picture->caption.'width="'.$pictures[1][3].'" height="'.$pictures[1][3].'"'; ?> onmouseover="this.style.border='1px solid #000';" onmouseout="this.style.border='1px solid #fff';" />
<?php } ?>
<?php }
       $content    = ob_get_contents();
       return $content;
       function _getAds($params)
       $db        =& JFactory::getDBO();
       $db->setQuery("SELECT id FROM #__menu WHERE link = 'index.php?option=com_joomgallery' AND published = 1");
       $Itemid = $db->loadResult();
       $container[2] =$Itemid;
       $limit    = $params[0];
       $query    = 'SELECT a.*,b.cid,b.catpath FROM '
               . $db->nameQuote( '#__joomgallery' ).' as a , ' . $db->nameQuote( '#__joomgallery_catg').' as b '
               . 'WHERE a.catid = b.cid and a.owner = '. $db->Quote( $this->_user->id ) . ' '
               . 'And a.published = 1'
               . ' ORDER BY id DESC ';
       $db->setQuery( $query );
       $result = $db->loadObjectList();
        switch ($params[2]) {
   case 0:
   case 1:
   case 2:
    $container[0] =$params[0];
    $container[1]=   count($result);
       $finalresult= array($result,$container);
       return $finalresult;

plg_joomgallery Plugin works perfectly but the link to albums released only as:


I consider carefully how joomgallery code makes reference to the albums, how joomgallery generating itemid but I could not find the decision...

Perhaps the link should be so:
<a href="<?php echo JRoute::_('index.php?option=com_joomgallery&func=viewcategory&catid='.$row1->cid._JOOM_ITEMID); ?>">

But... How to get the _JOOM_ITEMID? How to make link to Artist's Gallery?

Can you help me to improve this plugin to work?

REGARDS with RESPECT: Asen Burov

And here's how it looks on my site:

6  Archive / Interaction with other components / Topic for JoomTEAM: JoomGallery > JomSocial Activity stream & points Integration on: 27-02-2010 17:49:18
Hi JoomGallery TEAM - this topic is for U ;) Just read below...

This is JomSocial Czerdrill's hack.

(He and Me used JoomGallery and we don't need JomSocal's default photo system cuz JomGallery is more powerful and cool component).

JoomGallery is built in to allow linking to JomSocial profiles, but activity stream and points were not included.
So here's how you do it.

Open file: /components/com_joomgallery/classes/upload.class.php

Just scroll to the bottom, before the ?> and add:

//HEDTRIPS EDIT - Activity stream on JS Wall - HACK by Czerdrill

//JomSocial activity stream library
require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');

                       //New activity stream include
  $act = new stdClass();
  $act->cmd    = 'wall.write';
  $act->actor    = $user->get('id');
  $act->target    = 0; // no target
  $act->title    = JText::_('{actor} insert your verbiage here'); // title activity
  $act->content    = '';
  $act->app    = 'wall';
  $act->cid    = 0;
  CFactory::load('libraries', 'activities');

// JomSocial Rule - give points for new picture
$JomSocialCheck = JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'userpoints.php';
if ( file_exists($JomSocialCheck)) {
include_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'userpoints.php');
// End JomSocial Rule

In the above where it says "insert your verbiage here", just put whatever you want the thing to say. Czerdrill have it as "Actor uploaded a new pic to the contest".

IMPORTANT! Next, upload the attached file (jomsocial_rule.xml) to the components/com_joomgallery folder, and then run a rule scan in the backend of JomSocial (backend>Components>Jomsocial>User Points) - on the top right you'll see rule scan. Just hit that and it'll apply the new rules as per the attachment above.

This is the code of XML file:

<?xml version="1.0" encoding="utf-8"?>
 <name>Post a new picture in JoomGallery</name>
 <description>Give points when a registered user posts a picture in JoomGallery.</description>

It all works fine for me! I've tested!

QUESTION 01: It is posible to implement this hack in next version of JoomGallery? It seems simple :)

QUESTION 02: Tell me how to show the content of uploaded picture in code that i've posted above - It works fine I'd say but I want the massage in activity stream to show the picture i've ulpoaded - after text: "HEDtripS uploaded a new pic (it is posible this is to be a link or thumb from JoomGallery) to the contest".

Thanks in advance!

7  Archive / Frontend / Re: JoomAutoCat - How do I make member categories hidden until photos are added? on: 14-02-2010 16:22:04
HI all! What's new with this topic? I have a site for art with over 2700 pictures. But not all artists have uploaded their photos in albums - gallery looks ugly, huh  Sad

Is there a hack or trick how to hide empty categories?

Thank in advance!

This plugin is more than good :)

Regards: A. Burov (Arteist.net Dev Team & Web Support)
8  Archive / Addons / Re: router.php for joomgallery on: 09-11-2009 01:05:12
Thanks BrOncO, Great Job, man! - it work perfect in Cyrillic :) I found just 1 missing simbol (small letter 'а'=>'a',) in cyrilic and corrected it and now there's no problem with all cyrillic characters :)

Regards: Burov

see it in action: http://snc-art-visia.com ;) (Bulgarian language available only at this momment)
9  Archive / Addons / Re: router.php for joomgallery on: 22-10-2009 16:28:25
Hi All!

I added Cyrillic characters in the function replacespecial($string) and test it with 1-2 of mine variation, but there's no effect yet - in addressbar browser returns only mysite.com/gallery/????????.html or (gallery/%3F%3F%3F%3F%3F%3F%3F%3F%3F-%3F.html)

the file router.php is converted in UTF-8 (without BOM) but Cyrillic characters is not recognized Sad

a change the function $string = ereg_replace("[^A-Za-z0-9 ]", "", $string );
    to this one: $string = ereg_replace(array('/\s+/','/[^A-Za-z0-9\-]/'), array('-',''), $string);

and i try to add trim function for lowercase

      // lowercase and trim
      $string = trim(strtolower($string));
      return $string;

and Gallery returns me mysite.com/gallery/bbbbbbbb-b.html but with error message: You are not allowed to view this picture!

when i'm logging into the gallery, i still have no rights to view the pictures - all the pictures are there, and i see em, but there's no way to view detailed pictures

Can You take me to the right point? when i'm wrong?

(sorry for my bad english)

(this is the function with Cyrillic characters replacement)

function replacespecial($string)  { 
    $replace = array(
        'S'=>'S', 's'=>'s', '?'=>'Dj', 'Z'=>'Z', 'z'=>'z', 'C'=>'C', 'c'=>'c', 'C'=>'C', 'c'=>'c',
        'A'=>'A', 'A'=>'A', 'A'=>'A', 'A'=>'A', 'A'=>'A', 'A'=>'A', '?'=>'A', 'C'=>'C', 'E'=>'E', 'E'=>'E',
        'E'=>'E', 'E'=>'E', 'I'=>'I', 'I'=>'I', 'I'=>'I', 'I'=>'I', 'N'=>'N', 'O'=>'O', 'O'=>'O', 'O'=>'O',
        'O'=>'O', 'O'=>'O', 'O'=>'O', 'U'=>'U', 'U'=>'U', 'U'=>'U', 'U'=>'U', 'Y'=>'Y', '?'=>'B', '?'=>'Ss',
        'a'=>'a', 'a'=>'a', 'a'=>'a', 'a'=>'a', 'a'=>'a', 'a'=>'a', '?'=>'a', 'c'=>'c', 'e'=>'e', 'e'=>'e',
        'e'=>'e', 'e'=>'e', 'i'=>'i', 'i'=>'i', 'i'=>'i', 'i'=>'i', '?'=>'o', 'n'=>'n', 'o'=>'o', 'o'=>'o',
        'o'=>'o', 'o'=>'o', 'o'=>'o', 'o'=>'o', 'u'=>'u', 'u'=>'u', 'u'=>'u', 'u'=>'u','y'=>'y', 'y'=>'y',
        'y'=>'y', 'R'=>'R', 'r'=>'r', '?'=>'b',
'а'=>'a', 'б'=>'b', 'в'=>'v', 'г'=>'g', 'д'=>'d', 'е'=>'e', 'ж'=>'zh', 'з'=>'z', 'и'=>'i', 'й'=>'j',
'к'=>'k', 'л'=>'l', 'м'=>'m', 'н'=>'n', 'о'=>'o', 'п'=>'p', 'р'=>'r', 'с'=>'s', 'т'=>'t', 'у'=>'u',
'ф'=>'f', 'х'=>'h', 'ц'=>'tz', 'ч'=>'ch', 'ш'=>'sh', 'щ'=>'sht', 'ъ'=>'a', 'ь'=>'yo', 'ю'=>'yu', 'я'=>'ya',
'А'=>'A', 'Б'=>'B', 'В'=>'V', 'Г'=>'G', 'Д'=>'D', 'Е'=>'E', 'Ж'=>'ZH', 'З'=>'Z', 'И'=>'I', 'Й'=>'J',
'К'=>'K', 'Л'=>'L', 'М'=>'M', 'Н'=>'N', 'О'=>'O', 'П'=>'P', 'Р'=>'R', 'С'=>'S', 'Т'=>'T', 'У'=>'U',
'Ф'=>'F', 'Х'=>'H', 'Ц'=>'TZ', 'Ч'=>'CH', 'Ш'=>'SH', 'Щ'=>'SHT', 'Ъ'=>'A', 'Ь'=>'YO', 'Ю'=>'YU', 'Я'=>'YA',
$string = utf8_decode($string);
$string = strtr($string, $replace);
$string = ereg_replace("[^A-Za-z0-9 ]", "", $string );
/*$string = ereg_replace(array('/\s+/','/[^A-Za-z0-9\-]/'), array('-',''), $string);*/
    return  utf8_encode( $string );

regards: Burov

10  Archive / Frontend / Re: [Solved] Slimbox is so strange... on: 25-08-2009 14:06:48
Thanx, aHa - it works perfect :)

interesting option is Downsize pictures by Javascript :) sorry for my oversight :)
and yes - slimbox, not lightbox - lightbox is different script - my language mistake :)

Arteist.net | Privilege to Create ART
11  Archive / Modules / Re: Joomimg css issue. on: 24-08-2009 14:52:27
hi, rod6!
is your mod_joomimg modified or not? when i look at the thumbs - they are croped (like datso gallery module) not smacked down! default function of mod_joomimg is to resize thumbs, but not to crop it - how your module works so fine?
12  Archive / Frontend / [Solved] Slimbox is so strange... on: 22-08-2009 21:46:36
hi to all!

first excuse me for my bad english!

i am confused Sad all settings of my gallery is ok and gallery is working correctly, but i cannot explain what happens with lightbox function - ive uploaded picture with dimension 3000/2000px and from gallery settings 'Max Width and Height' is set to 3000px - when i click on picture to zoom it, and picture in lightbox is so smaller (1000/900).

look at screenshots and tell me what i am wrong?


( JoomGallery is - i am always up to date ;) )

regards: A. Burov

Arteist.net | Privilege to Create ART
13  Archive / Uploads / Re: Resizing and picture proportions on: 29-04-2009 23:33:53
hah! amazing Grin this mod works perfect for us - great jobs, man! thanks for sharing it!  Yes
our site is for art and this resizing method is very useful ;) (our site is arteist.net but now is offline for maintenance)

p.s. in the code ive commented you ;)

//begin mod resizing (Xendex's hack)..
 code here...
//end hack

cuz You're cool, buddy ;)

Regards: A. Burov

pps: sorry for bad english!
14  Archive / Uploads / Re: Resizing and picture proportions on: 28-04-2009 22:22:53
hi, xendex :)

can U share the solution? i try to modify modules.class.php .. can u take me to the right point :)

regards: A. Burov
Pages: [1]

Theme orange-lt created by panic

Bad Behavior has blocked 2013 access attempts in the last 7 days.