Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 202
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 162
Total: 162

Author Topic: Some questions  (Read 2555 times)

0 Members and 1 Guest are viewing this topic.

Offline VisiGod

  • Member
  • *
  • Posts: 7
    • 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: 16436
    • 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

  • Member
  • *
  • Posts: 7
    • 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: 16436
    • 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: 142
    • 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

  • Member
  • *
  • Posts: 7
    • 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: 16436
    • 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

  • Member
  • *
  • Posts: 7
    • 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: 16436
    • 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

  • Member
  • *
  • Posts: 7
    • 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: 142
    • 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: 142
    • 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
3085 Views
Last post June 16, 2009, 10:28:22 am
by ukmex
3 Replies
4460 Views
Last post March 13, 2010, 05:45:58 pm
by SMFHacks
1 Replies
4813 Views
Last post May 13, 2011, 11:57:34 am
by SMFHacks
2 Replies
14213 Views
Last post April 20, 2018, 04:34:17 am
by emilyturner
2 Replies
2892 Views
Last post December 30, 2016, 04:43:21 pm
by climber

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal