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 issues

Login / Search

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

Community saint

Galleries now…

Searched the forum for gallery matters, found what i was looking for.

Enabled member galleries in set-up wizard.
Created member galleries container, as sub-category of root.
Allowed submissions. allowed submissions everywhere i could find the thing.

1. Cant see the sub gallery.
Can't see it as member, can't see it as admin.
It exists, though. When I go to gallery edit in admin zone, it's there allright.
Accept image submission is ticked.
Member synchronize is ticked.
In permissions, view access is ticked for eveyone.
Submit and edit midrange content is yes for everyone.
Still can't see it when I click on galleries in the left menu.

2. Not seeing it can't add images. Logical.
Nevermind, go to admin zone, content, galleries, add image.
The gallery is there. Upload an image.
Page comes up and tells me Unfortunately this gallery does not support the submission of images.

Not funny.

www.precorp.fr

Last one to leave the country, please turn off the lights.
Back to the top
 
Posted
Rating:
#25611
Avatar

Community saint

I Know what problem your talking about and saw it on mine.
I noticed when there is not an image in the gallery it does not show it, how can members add to it if it does not show up.
 O_o

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#25635
Avatar

Empty galleries aren't shown, for a direct request by a previous customer. As this is clearly a problem for other customers, we'll introduce this as an option in version 4.
To manually remove this behaviour, change line 372 of site/pages/modules/galleries.php from:

Code

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

Code

//         if (gallery_has_content($child['name']))

I believe the second submission problem is that you're trying to submit an image to the container, rather than a personal gallery underneath. Submission of anything directly to the container is blocked. You should, however, see you can expand the container in the gallery selector (when you're on the form to add an image), and you should see the option for your personal gallery is there.


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

Community saint

Thx, found it.

wanted to upload image, (400ko, limit set to 1024)
got this

Code

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 4096 bytes) in /home/www/79b6e32e84e56429886f618842f9bf17/web/baseforumtest/ocpjps/sources/images.php on line 162
Server problem ?

www.precorp.fr

Last one to leave the country, please turn off the lights.
Back to the top
 
Posted
Rating:
#25641
Avatar

Community saint

Chris Graham said

Empty galleries aren't shown, for a direct request by a previous customer. As this is clearly a problem for other customers, we'll introduce this as an option in version 4.
To manually remove this behaviour, change line 372 of site/pages/modules/galleries.php from:

Code

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

Code

//         if (gallery_has_content($child['name']))

I believe the second submission problem is that you're trying to submit an image to the container, rather than a personal gallery underneath. Submission of anything directly to the container is blocked. You should, however, see you can expand the container in the gallery selector (when you're on the form to add an image), and you should see the option for your personal gallery is there.

Now I would like to know why back when I posted this issue you did not post that fix.
I know I said some thing about it before.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#25643
Avatar

Community saint

Did a bit of searching.
line 162 is the one with the number added.
from what i understand of it, resizing went ok, but it's the color sampling that created the problem.
so i guess just resizing the image won't help, right ?

Edit:
That's daft. If it doesn't need to be resized, it won't be resampled…
I'll try resizing it and see if it works.

Code

// Derive actual width x height, for the given maximum box (maintain aspect ratio)
   // ===============================================================================
   $sx=imagesx($source);
   $sy=imagesy($source);

   // If we're not sure if this is gonna stretch to fit a width or stretch to fit a height
   if (($width==-1) && ($height==-1))
   {
      if ($sx>$sy)
         $width=$box_width;
      else
         $height=$box_width;
   }

   if ((($width>$sx) || ($width==-1)) && (($height>$sy) || ($height==-1))) // Don't make things BIGGER in both dimensions
   {
      $_width=$sx;
      $_height=$sy;
   } else
   {
      if (($width!=-1) && ($height==-1))
      {
         if (($sx/$width)>($sy/$height))
         {
            $_width=$width;
            $_height=intval($sy*($width/$sx));
         } else
         {
            $_height=$height;
            $_width=intval($sx*($height/$sy));
         }
      }
      elseif ($height==-1)
      {
         $_width=$width;
         $_height=intval($width/($sx/$sy));
      }
      elseif ($width==-1)
      {
         $_height=$height;
         $_width=intval($height/($sy/$sx));
      }
   }
   if (($width>$sx) && ($only_make_smaller)) return;

   // Resample/copy
   $gd_version=get_gd_version();
   if ($gd_version>=2.0) // If we have GD2
   {
162 $dest=imagecreatetruecolor($_width,$_height);
      imagealphablending($dest,false);
      if (function_exists('imagesavealpha')) imagesavealpha($dest,true);
      imagecopyresampled($dest,$source,0,0,0,0,$_width,$_height,$sx,$sy);
   } else
   {
      $dest=imagecreate($_width,$_height);
      imagecopyresized($dest,$source,0,0,0,0,$_width,$_height,$sx,$sy);


Last edit: by moimaim

www.precorp.fr

Last one to leave the country, please turn off the lights.
Back to the top
 
Posted
Rating:
#25652
Avatar

Now I would like to know why back when I posted this issue you did not post that fix.
I know I said some thing about it before.

This isn't a bug, so we don't guarantee a 'fix'. As this is the second isolated report of the issue, and a second mention of it by yourself, I decided I'd make a special exception and post something longer.


This memory issue is occuring because ocPortal doesn't have enough memory to perform the operation. Unfortunately this is an unavoidable problem for ocPortal because it is purely unavoidably dependant on the sizes of the images involved and the memory the server is set to allow for usage. The resize needs to occur for the process of thumbnail generation to complete. There are three possible solutions:
  • use a smaller image
  • try and get the memory size raised (this can possibly by done using the .htaccess file – see the recommended.htaccess file for an example of how to raise PHP's memory limit)
  • tell ocPortal you do not have GD enabled, in your configuration – you'll then need to upload thumbnails manually


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

Community saint

hmmm
resized the image to 1023x767 (was 1600x1200 before)
size to display in the option is set to 1024.

accepted the image with no error message, and took me back to the content manager.

clicked on welcome page to see the result, and got this between the left and right panels.

Expand: Error message Error message


www.precorp.fr

Last one to leave the country, please turn off the lights.
Back to the top
 
Posted
Rating:
#25656
Avatar



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

Community saint

I would add this Fix to the documention, or that annoying thing that will not stay closed to the right in the admin zone.
I lost count of how many people I told that was a bug I was hopping would be fixed.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#25682
Avatar

Community saint

Confirmed and fixed indeed.

Works fine.
Even retrieved the member's avatar from phpbb (animated gif, too), and uses it as category image for the personal gallery.
Both in the gallery page AND in the most recently added galleries block.
Very visual, and extremely nice to look at.
Well done, Mr C&F  :thumbs:

 :offtopic:
True enough things hardly ever going as they should at the first attempt can (and sometimes do) generate quite a dose of frustration, but even in my maddest moods I can't help being impressed by the speed at which these guys can solve any problem we throw at them.
But on this one, I noticed it took C&F nearly seven minutes to find the bug and post a fix. I know it's saturday, but what took you so long ?  :cool:





www.precorp.fr

Last one to leave the country, please turn off the lights.
Back to the top
 
Posted
Rating:
#25683
Avatar

Community saint

yes I like that things are fixed fast too.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: