Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11839
Latest: BugginIn
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 42423
Total Topics: 7395
Most Online Today: 105
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 52
Total: 53

Author Topic: Some questions  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

Offline VisiGod

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 5
    • View Profile
Some questions
« on: July 17, 2022, 06:09:02 am »
Hello all,

I'm new to the SMF Gallery pro and I'm importing from my Coppermine 1.5 but I have some questions:

- How can I generate the thumbs and medium images after the import (I've imported using sql queries);
- Is it possible to have each gallery and subgallery on it's own folder?;
- How can I change the layout of the Gallery main page (number of galleries per row) and on the subgalleries?

Thanks for any help in advance

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16086
    • View Profile
Re: Some questions
« Reply #1 on: July 17, 2022, 11:55:30 am »
I have a coppermine convertor in https://www.smfhacks.com/index.php/topic,2839.0.html
But, if you did already and have moved the gallery files to the gallery folder. And have the database just the filename for each table in smf_gallery_pic

First make sure you have "Generate medium size images" enabled under gallery configuration settings
You can then use the regenerate thumbnails option for each main category page.


Quote
- Is it possible to have each gallery and subgallery on it's own folder?;
If you are talking about file storage the closest option we have is
"Enable multiple folders for picture storage" if enabled when uploads occurs it creates a new folder for every 1000 uploads.


In Gallery Pro  there are two types of galleries main page categories which are gallery admin created where users can upload to if they have the right permissions

The second type is user galleries where each user has their own mini gallery that they can create categories and upload to. This is found under the Memberies gallery link on the homepage of the gallery. Or if the user clicks the MyGallery button.

We have a setting that controls the number of images per page when inside a gallery 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/
Like Like x 1 View List

Offline VisiGod

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 5
    • View Profile
Re: Some questions
« Reply #2 on: July 18, 2022, 05:33:44 pm »
I've tried the coppermine converter but it seems it's for the 1.4 version and it times out using on the 1.5 version (have around 13k photos). I can share the sql I did for categories, subcategories (called albums in coppermine) and photos (didn't import the comments since I really don't use them).

I'll use a common gallery where the users can upload pictures and the the admins move them to the correct folder (after being approved).

Regarding the pages (and sorry if this is something more SMF related), can I change the layout (even if it is on the code) since the main page has around 54 categories (alphabet letters, # signal and user uploads) and inside each category I have all my subdivisions?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16086
    • View Profile
Re: Some questions
« Reply #3 on: July 19, 2022, 04:49:26 pm »
Good to know.
I am going to build out a feature to regenerate all thumbnails/medium for all categories.
Going to add the option to the regenerate thumbnails page.


Yes, you can change the layout just when updating make sure backup copies of files you edit. Then compare using software such as beyond compare.
Do you want to add paginating to the main page for categories?
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 mickjav

  • Full Member
  • ***
  • Posts: 133
    • View Profile
    • Database Dreams
Re: Some questions
« Reply #4 on: July 19, 2022, 06:33:46 pm »
I use pagging on mine

https://www.databasedreams.co.uk/charts/gallery/?cat=35


The code is here


https://www.databasedreams.co.uk/support/index.php?action=showcases;sa=view;id=56

This is a replacement for the function there is also another version but have stopped using that as needs some css which I'm no good at.

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.
Like Like x 1 View List

Offline VisiGod

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 5
    • View Profile
Re: Some questions
« Reply #5 on: July 20, 2022, 01:42:17 pm »
Thanks SMFHacks and mickjav.

I will only use pagination for the subcategories since the main category will have all the 54 subcategories in one page (that's why I wanted to change the main category page to accommodate all the subcategories).

I'll do some experiments this weekend and then will let you know how it went  ;D

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16086
    • View Profile
Re: Some questions
« Reply #6 on: July 20, 2022, 02:01:32 pm »
The main file is Gallery2.template.php in themes/default folder for SMF 2.0 or Gallery2.1.template.php in themes/default for SMF 2.1

In both the main function to check at the top is the template_mainview()  which controls the display of the main page.
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 VisiGod

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 5
    • View Profile
Re: Some questions
« Reply #7 on: July 29, 2022, 05:32:53 pm »
I've been having some fun customizing the main layout to my needs and made a simple function to display the number of subcats that can be of use to someone (or added to the core if you want):

Code: [Select]
function GetTotalSubCats($id_cat) {
    global $modSettings, $smcFunc, $subcats_linktree, $scripturl, $gallerySettings;

    $total = 0;

    $dbresult3 = $smcFunc['db_query']('', "
 SELECT count(ID_CAT) as total
 FROM {db_prefix}gallery_cat
 WHERE ID_PARENT = ".$id_cat);

    return $smcFunc['db_fetch_assoc']($dbresult3)['total'];
}

in the template, just add
Code: [Select]
echo '<td align="center" valign="middle" class="windowbg">'.GetTotalSubCats($row['id_cat']).'</td>'; to get the number of subcats to the main cat
Like Like x 1 View List

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16086
    • View Profile
Re: Some questions
« Reply #8 on: July 29, 2022, 05:34:34 pm »
Great tip!
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 VisiGod

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 5
    • View Profile
Re: Some questions
« Reply #9 on: July 29, 2022, 05:37:02 pm »
Forgot that in the table header, I've added the following:

Code: [Select]
    if(!isset($_GET[cat])) {
        echo '<th scope="col" class="smalltext" align="center">Total Bands</th>';
}

So it will only appear on the main gallery index

Offline mickjav

  • Full Member
  • ***
  • Posts: 133
    • View Profile
    • Database Dreams
Re: Some questions
« Reply #10 on: July 30, 2022, 03:20:26 am »
That's Interesting may implement it with my other mods.

If you interested I have built 2 php Block that relate to the Galleries One for the lastest gallerys, Ill have to check but think if would be a copy past into a php block, It's for the latest galleries "sub Galleries" To a gallery say Artists/Bands

The other would require a mod to the Cats table and the add/edit system it shows latest videos added.

Let me know and I'll post both blocks on my support site.

All the best mick

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline mickjav

  • Full Member
  • ***
  • Posts: 133
    • View Profile
    • Database Dreams
Re: Some questions
« Reply #11 on: July 30, 2022, 03:31:07 am »

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
2927 Views
Last post June 16, 2009, 10:28:22 am
by ukmex
3 Replies
4175 Views
Last post March 13, 2010, 05:45:58 pm
by SMFHacks
1 Replies
4549 Views
Last post May 13, 2011, 11:57:34 am
by SMFHacks
2 Replies
13820 Views
Last post April 20, 2018, 04:34:17 am
by emilyturner
2 Replies
2603 Views
Last post December 30, 2016, 04:43:21 pm
by climber

+- Recent Topics

Custom badges by Hatshepsut
August 18, 2022, 10:10:46 pm

Membergroup level by davejo
August 18, 2022, 02:13:49 am

Setting a single free download. by SMFHacks
August 16, 2022, 09:50:04 am

Quick moderation checkboxes in search result? by SMFHacks
August 08, 2022, 10:37:03 am

Contact Page Mod Not Working by SMFHacks
August 05, 2022, 12:19:43 pm

Issues with new Newsletter Pro installation by SMFHacks
August 05, 2022, 07:15:18 am

SMFBlog Mod by Nicole
August 03, 2022, 09:46:22 pm

Contact Page by Nicole
August 03, 2022, 09:45:42 pm

trader + classifieds by Nicole
August 03, 2022, 05:05:17 pm

Category Permissions List by SMFHacks
July 30, 2022, 07:53:24 am

Powered by EzPortal