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.


Gallery View Only Shows 1 Category on a Page

Login / Search

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

Well-settled

When I view my gallery it only shows 1 category on each page.  Once I finally drill down to where there is content it shows multiples, but not at the top levels.  Any ideas?  If you need a pic of my hierarchy I can provide it.

Thanks


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32742
Avatar

Screenshot please.


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:
#32783
Avatar

Well-settled

Ok here are the screen shots of the heirarchy and the gallery pages themselves.









ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32800
Avatar

Please try making the following change…

Change lines 384-387 of site/pages/modules/galleries.php from:

Code

               }
            }
            $num_galleries++;
to:

Code

                  $num_galleries++;
               }
            }


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:
#32809
Avatar

Well-settled

Here are my lines 379-385.  Since the lines you mentioned look to be correct, I wanted to verify that I had the right thing already or if I needed to put the "$num_galleries++;" into the if statement above it.

Code

                  if (!$children->is_blank()) $children->attach(do_template('BLOCK_SEPARATOR'));
                  $children->attach($child);
               }
            }
            $num_galleries++;
         }
      }

Thanks, Chris.


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32812
Avatar

Move the $num_galleries++; line up two lines please. So that it appears directly beneath the $children->attach($child); line.

I should have been more clear.


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:
#32814
Avatar

Well-settled

That works much better.  Thanks.

Is there a way to force them to be displayed in alphabetical order?  Currently, Miniatures appears above Anime.


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32816
Avatar

Change line 70 of the file from:

Code

      $rows_children=$GLOBALS['SITE_DB']->query_select('galleries',array('*'),array('parent_id'=>$cat),'ORDER BY add_date DESC');
to:

Code

      $order='add_date';
      if (get_value('gallery_name_order')=='1')
      {
         $order='name';
      }
      $rows_children=$GLOBALS['SITE_DB']->query_select('galleries',array('*'),array('parent_id'=>$cat),'ORDER BY '.$order.' DESC');

and then type this into OcCLE…

Code

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


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:
#32817
Avatar

Well-settled

I did that… but I don't know if my OcCLE is working right.  There is nothing telling me that the command worked or anything.  It just sits there staring at me with it's dark gaze.  :S


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32818
Avatar

Well-settled

Well… it looks liek OcCLE works in Firefox.  Stupid IE.  At least it goes down to the next line to ask for another command.  

However, the sorting is still like it was before.


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32819
Avatar

Some servers/browser-setups have trouble with OcCLE.

If you don't think it worked, you could go into phpMyAdmin (or whatever your server has) and put the following SQL command through:

Code

INSERT INTO `ocp2_values` ( `the_name` , `the_value` , `date_and_time` )
VALUES (
'gallery_name_order', '1', UNIX_TIMESTAMP( )
);

(if you didn't use ocp2_ as your table prefix, change it accordingly.


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:
#32820
Avatar

Well-settled

Alright.  I checked the database and it says that the value is set to 1.  I also cleared the caches just to make sure. Same thing.


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32821
Avatar

The ordering will be happening by gallery (code)name, not gallery title, if that makes a difference.

If not, please zip up and attach your modified code file so I can check it.


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:
#32822
Avatar

Well-settled

The code name and gallery title is the same minus the capital letters.  Here is the zipped up galleries.php.

Attachment
» Download: galleries.zip (9 Kb, 171 downloads so far)


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
Posted
Rating:
#32823
Avatar

Ok I've tried this myself and it didn't work. Here's some code that'll actually work ;)

Code

      $order='add_date DESC';
      if (get_value('gallery_name_order')=='1')
      {
         $order='name ASC';
      }
      $rows_children=$GLOBALS['SITE_DB']->query_select('galleries',array('*'),array('parent_id'=>$cat),'ORDER BY '.$order);


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:
#32890
Avatar

Well-settled

That works great.  Thanks, Chris.


ModelerX.com - Post your models in the gallery and chat about 'em in the forums.  Building the largest online community of modelers with your help.

Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: