HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Gallerie issues

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#29464 (In Topic #6781)
Avatar

Community saint

I am trying to set up gallerie and now I have few problems.

1. Empty galleries are not shown. In some previous discussion there was proposed some code change; I did it, but id did not help.

2. How to have all children galleries in one page. And preferably not one per line but maybe three in the column or smth.

3. Now I have 7 galleries and 3 of them have one test picture each. When the parent's "Flow mode interface" is checked, it shows 3 filled galleries. But the button to the next page is active. Of course the second page is empty:



4. When the uploading of pictures or videos is not alowed to the certain gallery, there still is a link for adding a picture or video. And the link takes you to the page saying that the uploading is switched off. Is it possible not to have these links in that case?

5. sometimes the gallery is called Category. After you edit the gallery you get to the page where there are links "Edit this category", "View this category". And of course: add gallery, edit gallery. It is a bit confusing. Every so called category can be accessed form the list of galleries as well. So there is no need for definition "category"
Back to the top
 
Posted
Rating:
#29473
Avatar

1) This keeps coming up, so I'll make a hidden option for it and we'll consider making it a full option in v4.

Change line 372 of site/pages/modules/galleries.php from:

Code

         if (gallery_has_content($child['name']))
to:

Code

         if ((get_value('show_empty_galleries')=='1') || (gallery_has_content($child['name'])))

Then in OcCLE type:

Code

:set_value('show_empty_galleries','1');

2) Remove lines 356-360 of site/pages/modules/galleries.php:

Code

      if ($myrow['flow_mode_interface']==1)
      {
         $max=either_param_integer('max',5);
         $start=either_param_integer('start',0);
      } else

3) The empty galleries are confusing the page counters. I'd like to fix this, but I can't really do it efficiently without making database changes, so it'll have to stay as it is for v3.x.x.

4) Change lines 331-332 from:

Code

         $image_url=build_url(array('page'=>'cms_galleries','type'=>'ad','cat'=>$cat),get_module_zone('cms_galleries'));
         $video_url=build_url(array('page'=>'cms_galleries','type'=>'av','cat'=>$cat),get_module_zone('cms_galleries'));
to:

Code

         $image_url=($myrow['accept_images']==0)?new ocp_tempcode():build_url(array('page'=>'cms_galleries','type'=>'ad','cat'=>$cat),get_module_zone('cms_galleries'));
         $video_url=($myrow['accept_videos']==0)?new ocp_tempcode():build_url(array('page'=>'cms_galleries','type'=>'av','cat'=>$cat),get_module_zone('cms_galleries'));

5) We'll be reviewing the terms at some point in the v4 development process.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29551
Avatar

Community saint

1. I changed the lines, ran the line in occle, but still dont see the empty categories actually:-(

Back to the top
 
Posted
Rating:
#29554
Avatar

Is there a 'show_empty_galleries' row in your ocp2_values table? (that's what the OcCLE command should have created, but it's worth checking)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29607
Avatar

Community saint

Yes it was created. I just checked
Back to the top
 
Posted
Rating:
#29615
Avatar

Are these empty galleries subgalleries of a flow-mode gallery? Do they actually exist, or are they yet-uncreated personal galleries? Are you missing the links as subgallery links, or are you missing them on the list-of-galleries-page; in other words, are you having a problem showing empty subgalleries, or empty galleries on the flat gallery list?

I also noticed I should have said line 374 needs to be change from:

Code

            if (($myrow['flow_mode_interface']==1) || (($num_galleries>=$start) && ($num_galleries<$start+$max)))
to:

Code

            if ((is_null($max)) || (($num_galleries>=$start) && ($num_galleries<$start+$max)))


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29665
Avatar

Community saint

I did not find line

Code

if (($myrow['flow_mode_interface']==1) || (($num_galleries>=$start) && ($num_galleries<$start+$max)))

instead I found

Code

if (($myrow['flow_mode_interface']==0) || (($num_galleries>=$start) && ($num_galleries<$start+$max)))

I changed it as suggested, but nothing happened
Back to the top
 
Posted
Rating:
#29684
Avatar

Sorry, you're right - I got that line wrong.

However, answers to my questions in my last post might help me further understand your situation.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29714
Avatar

Community saint

Chris Graham said

Are these empty galleries subgalleries of a flow-mode gallery? Do they actually exist, or are they yet-uncreated personal galleries? Are you missing the links as subgallery links, or are you missing them on the list-of-galleries-page; in other words, are you having a problem showing empty subgalleries, or empty galleries on the flat gallery list?

These are subgalleries of the root gallery. I see them in admin interface, but they are not present in the page of subgallery links, nor in list-of-galleries-page.

And how could I have flat gallery list (without using root)?
Back to the top
 
Posted
Rating:
#29727
Avatar

I've now tested this, and there needs to be one more change. Please also change line 376 to:

Code

               $child=show_gallery_box($child,$root,true,get_zone_name(),get_value('show_empty_galleries')!='1');


To show a gallery list, use the site:galleries:list entry point. i.e. a URL like:
…/…/?page=galleries&type=list

This won't show empty galleries either. If you want it to, change lines 281-286 from:

Code

         $count=$GLOBALS['SITE_DB']->query_value('images','COUNT(*)',array('cat'=>$myrow['name']));
         if ($count==0)
         {
            $count2=$GLOBALS['SITE_DB']->query_value('videos','COUNT(*)',array('cat'=>$myrow['name']));
            if ($count2==0) continue;
         }
to:

Code

         if (get_value('show_empty_galleries')!='1')
         {
            $count=$GLOBALS['SITE_DB']->query_value('images','COUNT(*)',array('cat'=>$myrow['name']));
            if ($count==0)
            {
               $count2=$GLOBALS['SITE_DB']->query_value('videos','COUNT(*)',array('cat'=>$myrow['name']));
               if ($count2==0) continue;
            }
         }


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: