Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4274
Latest: kellanphil
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43648
Total Topics: 7571
Most Online Today: 55
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 51
Total: 51

Author Topic: Figuring out settings  (Read 569 times)

0 Members and 1 Guest are viewing this topic.

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Figuring out settings
« on: January 08, 2025, 02:43:03 pm »
Hi, Iv been playing around with setting up gallery pro and I have a few questions and confusions: Firstly my aim is to create something loosely analogous to Deviant Art in the early 00s.



The key feature are:
  • The main page of the gallery should be an overview of recently uploaded images
  • On the left there should be a categories list (This I think can be done by modding the Gallery2.template.php)
  • When someone uploads, it should be added into a predefined public category AND into a user category if they have one. (This is the part that's confusing me, Gallery Pro is just creating duplicate images instead of assigning them to multiple categories) - so I need multiple category support per image.
  • When you click someones name, it should take you to a page that shows all of their recent uploads, and the categorizes on the left should show only the categorizes they have uploaded too, along with their personal categorizes.

The biggest issue I'm having is that Gallery Pro seems to be treating personal galleries and general categories as totally separate galleries, when I want them to act more like filters or tags.
Modifying PHP is not a big issue for me; but I wanted to find out what the best approach to this is.

I would also like to disable the entire Approval system; its not needed for me.
« Last Edit: January 08, 2025, 02:47:13 pm by melon »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #1 on: January 08, 2025, 05:13:27 pm »
Quote

The main page of the gallery should be an overview of recently uploaded images
Admin -> Gallery Configuration -> Settings -> Layout ->
Then check "Show the most recent items on the main page"

Quote
    On the left there should be a categories list (This I think can be done by modding the Gallery2.template.php)
For SMF 2.1 it would be the Gallery2.1.template.php and for both would be in function template_mainview() function

Quote
    When you click someones name, it should take you to a page that shows all of their recent uploads, and the categorizes on the left should show only the categorizes they have uploaded too, along with their personal categorizes.
That would be editing function template_myimages()


Quote
    When someone uploads, it should be added into a predefined public category AND into a user category if they have one. (This is the part that's confusing me, Gallery Pro is just creating duplicate images instead of assigning them to multiple categories) - so I need multiple category support per image.

The biggest issue I'm having is that Gallery Pro seems to be treating personal galleries and general categories as totally separate galleries, when I want them to act more like filters or tags.
In your case I would disable personal galleries under membergroup permissions and gallery settings. Personal galleries allow a user to create their own mini gallery where they can create their own categories and organize items.

Instead I think you should just create top level/main gallery categories


Quote
I would also like to disable the entire Approval system; its not needed for me.
That can be done with permissions under each membergroup set the  membergroup to autoapprove gallery items/comments
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Re: Figuring out settings
« Reply #2 on: January 09, 2025, 11:38:28 am »
Thanks for the info!

Quote
create their own categories and organize items.
This is still be semi-desirable though; for example I think a common situation will be where someone wants to upload an image to the "drawings" category, but they will also want to organise that drawing as a sketch, or as part of a series, or mark it as a commission. So I really think the overall categories need to be supplemented with user created subcategories or tags.

There does seem to be a feature called "Keywords" that might replicate this? However I would need a way to include keywords in my custom category list, and clicking them would essentially need to be a keyword search that is limited to the user who's gallery you are viewing.
e.g. When viewing a users "action=gallery;sa=myimages;u=x" it shows a list of all the keywords user x has used; you click one, and it brings you to search results for any images that have that keyword and are also created by user x.
Is there a clean way to get filtered lists of keywords like this, and to embed pre-defined searches as links?

Quote
That can be done with permissions under each membergroup set the  membergroup to autoapprove gallery items/comments
I don't love this solution because as an admin it makes it very unclear to me what features are functional and what ones are non functional (because admins have all permissions) - its liveable, just not ideal.

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Re: Figuring out settings
« Reply #3 on: January 09, 2025, 07:32:35 pm »
Other questions:
When I try and upload a 1.1mb image with a 2000x3000 dimension I get an nginx error page saying "413 Request Entity Too Large" - This is well under the 4mb PHP limit, and I have "resize large images" enabled in the settings. Im on a test MAMP environment so it may just be a quirk that wont happen in live, but I thought Id mention it.

Secondly; the bulk uploader does not seem to make a lot of sense; I upload some images, and it shows thumbnails of them, but there are no buttons to do anything after that, other then "return to gallery"; if I do that nothing has been uploaded. Am I missing something here?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #4 on: January 09, 2025, 08:13:37 pm »
For the 413 error its an nginx config issue you have edit the config client_max_body_size

https://stackoverflow.com/questions/24306335/413-request-entity-too-large-file-upload-issue


The bulk uploader should upload should automaticlly upload the files after selected. It should upload then place them in the category.

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Re: Figuring out settings
« Reply #5 on: January 09, 2025, 08:34:45 pm »
Ah I see, thanks!

Re bulk upload:
I was able to fix it by setting "use local cookies" on my test site because the cookie was not being set.. and the upload seems to depend on reading the cookie; this is definitely not an issue on the live site, so I'll chalk it up to weird MAMP behaviour.. MAMP is just a pain ::)

As a general update; so far things seem to be going well; the biggest change Iv had to make is converting the image displays from tables to lists that can be better CSS styled; this has been pretty painless though! The 15k line Gallery2.php is quite intimidating; but your code is well organised and really easy to work with, I really appreciate that!

Like Like x 1 View List

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #6 on: January 09, 2025, 08:42:45 pm »
Glad you have it working.

I will say my code is old school. It is mostly just if/loops and basic php functions with MySQL statements. I hardly ever use more advanced language features as it just makes code harder to maintain. Mainly between new PHP versions when features are changed/removed.

It is harder than ever to keep modern scripts going: with composer, OOP, it is way easier to keep an older script. There is just so many more components and things to know.

I try to keep things easy few files. I do my php development in PHP Storm. And I honestly do agree with on maintaining old then starting from scratch again, hard when you have a custom site with many features, a custom theme etc.  I do not see myself doing much with SMF 3.0 just don't have energy to rewrite everything for not much gain/killer new feature.

I still have phpbb2 sites running, SMF 1.1.x on PHP 8.1
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Re: Figuring out settings
« Reply #7 on: January 11, 2025, 09:37:08 am »
Ok so I've run into a few minor bugs;
  • Images smaller than the thumbnails (such as 32x32 game sprites) actually get expanded by thumbnails. If an image is smaller than the thumbnail size, it should not need to generate a thumbnail.
  • Webp images don't seem to be supported by the thumbnail generator.

I honestly do agree with on maintaining old then starting from scratch again, hard when you have a custom site with many features, a custom theme etc.  I do not see myself doing much with SMF 3.0 just don't have energy to rewrite everything for not much gain/killer new feature.

If I had unlimited energy I would love to launch a 2.0 fork that:
  • Cut chicken fat; like IE support, and generally cleaned up the code.
  • Back ported some of the best 2.1 features, such as SCEditor.
  • Included a library of functions aimed at maintaining compatibility for older mods and core SMF features on newer PHP versions.
  • Only released updates when absolutely necessary for PHP functionality.
After that I would focus all my energy on making great documentation that encouraged new mod makers and themers to get involved and make cool stuff.

In reality, I don't have the time to do that, I have my own projects! However it might be something you could consider! You have the skills and knowledge, plus maintaining an active older SMF fork would mean your older mods could continue to have value, without needing major updates  ;D

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #8 on: January 11, 2025, 09:46:10 am »
1. Shouldn't do that but will double check.

2. Webp images thumbnails have to look into either change resizeImageFile in SMF to support it or make a new version of that function and use in the gallery.


I did have a fork called ezforum.com the idea was to include the fixes/back port changes in 2.0.x and include some major free mods built in. Again not enough interest/time to market. And forum market smaller. All this is just a hobby for me. I manage/run other companies so not a ton of time.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #9 on: January 12, 2025, 10:17:21 am »
webp coming to 2.1 eventually https://github.com/Sesquipedalian/SMF/commit/33f1686f992315e2a2cc0818cb87c5147c057ac5

But can backport to smf 2.0.x
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #10 on: January 12, 2025, 11:45:48 am »
Posted and update that should help
10.2.1
+Webp thumbnail support added for SMF 2.0.x and SMF 2.1.x
!Don't resize image if smaller than the height/width of the image
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline melon

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 6
    • View Profile
Re: Figuring out settings
« Reply #11 on: January 12, 2025, 03:39:16 pm »
Posted and update that should help
10.2.1
+Webp thumbnail support added for SMF 2.0.x and SMF 2.1.x
!Don't resize image if smaller than the height/width of the image

Ah that was snappy, however it does not seem to be working for me. Thumbs are still oversized for small gifs. I do have a lot of edits to my Gallery2.php (I just replaced the new 10.2.1 with my copy since I could not see any major edits related to this issue in a diff comparison) - is there an edit in there I might have missed?

Also a heads up; you have an error in your code 10.2.1 modifier code.
Code: [Select]
<add><![CDATA[static $default_formats = array(
'1' => 'gif',
'2' => 'jpeg',
'3' => 'png',
'6' => 'bmp',
'15' => 'wbmp'
'18' => 'webp',
);

require_once($sourcedir . '/Subs-Package.php');
@ini_set('memory_limit', '900M');]]></add>

The comma is missing after 'wbmp' - it causes an error when trying to regenerate thumbs  ;)

EDIT: Also this post is related to 10.2.2 - the version number in Gallery/2 is incorrect ^^
« Last Edit: January 12, 2025, 03:47:12 pm by melon »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • View Profile
Re: Figuring out settings
« Reply #12 on: January 12, 2025, 04:56:14 pm »
Thanks for headsup.


I edited Gallery2.php function CreateThumbnail

with
Code: [Select]
// don't resize just copy the file
if ($width > $sizes[0] && $height > $sizes[1])
{
copy($filename,$filename . '_thumb');
return true;
}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
9 Replies
7257 Views
Last post July 16, 2007, 05:55:59 pm
by reczey
1 Replies
3667 Views
Last post November 30, 2007, 07:33:08 am
by SMFHacks
1 Replies
5168 Views
Last post June 08, 2009, 04:12:38 pm
by SMFHacks
settings

Started by RC Storick « 1 2 » Support

21 Replies
11051 Views
Last post December 30, 2012, 06:23:00 pm
by SMFHacks
2 Replies
3962 Views
Last post March 25, 2017, 10:15:59 am
by Darkshadow

+- Recent Topics

RESOLVED: Store Not Logging Transactions or Sending Emails by SMFHacks
January 23, 2025, 06:24:27 pm

Ability to exclude categories from ezPortal SMF Gallery random image ezblock by Alistair
January 22, 2025, 08:20:13 am

How to move SMF to new server by SMFHacks
January 21, 2025, 08:45:53 pm

Figuring out settings by SMFHacks
January 12, 2025, 04:56:14 pm

Filesizes incorrect by SMFHacks
January 12, 2025, 02:02:47 pm

December 2024 Sale! by SMFHacks
December 02, 2024, 10:30:38 pm

Denying members some admin settings by rickk
November 17, 2024, 12:02:55 pm

Weird setup by SMFHacks
November 07, 2024, 06:37:41 am

Restoring a deleted photo by Monocero
November 01, 2024, 04:23:56 am

Gallery Pro reinstalation by Lirorobert
October 14, 2024, 01:43:43 am

Powered by EzPortal