News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Gallery

Started by SMFHacks.com Team, September 16, 2006, 07:13:02 PM

Previous topic - Next topic

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

kdmiller

Looks like great potential, one thing that would meet my needs exactly
is nested albums
ie:  Keith and Esther
        Our travels
        House remodel
        Wedding
        etc....

vbgamer45

Subcategories are a feature in the pro edition of the mod.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

txcas

I just installed this on SMF 2.1 RC4. When trying to upload pictures we get a "not a valid picture file" error. The SMF error log shows:
2: getimagesize(/home/creedmoo/public_html/gallery//img.tmp): failed to open stream: No such file or directory

vbgamer45

Copy this file to your Sources folder and see if it helps made a change.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

txcas

Quote from: vbgamer45 on January 23, 2022, 12:45:18 PMCopy this file to your Sources folder and see if it helps made a change.

I tested the new file and the SMF error is now:

2: getimagesize(/home/creedmoo/public_html/gallery/img.tmp): failed to open stream: No such file or directory

vbgamer45

Is the gallery folder writable? And check that the path is write under gallery settings that it is /home/creedmoo/public_html/gallery/

If so can you also if you can upload an attachment to a post.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

txcas

Quote from: vbgamer45 on January 23, 2022, 01:04:17 PMIs the gallery folder writable? And check that the path is write under gallery settings that it is /home/creedmoo/public_html/gallery/

If so can you also if you can upload an attachment to a post.
Yes the directory is writable. I just found that I have no problems uploading png files, but get the error with jpg files.

vbgamer45

Can you check your php settings/gd settings to see if jpg support is enabled.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mick.

Let's make the images mobile friendly.

Out of the box, the images are stretched out on mobile view:

You cannot view this attachment.

Let's create a class for the images. Open your theme's CSS file, at the bottom add:
.img_gallery {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: auto;
  display: block;
}

Let's add the class to the template. Open Gallery2.1.template.php and find:
<td align="center"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" /></td>
Replace with:
<td align="center"><div class="img_gallery"><img src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" /></div></td>
Turn off linking codes in gallery admin.

Boom!
You cannot view this attachment.



vbgamer45

Can I use a variation of this Mick in the release here?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mick.

Quote from: vbgamer45 on January 29, 2022, 11:15:14 AMCan I use a variation of this Mick in the release here?
Of course.

I started using SMF Gallery yesterday so I can host my images from within SMF instead of hosting them in a folder in my server every time I create a topic. Too much work. SMG Gallery just made my life much easier.  8)

I denied acces to Gallery to everyone. I use SMF Gallery to host all media like Wordpress lol. I now can go in, and select whatever images and create my blog post. Sweet.

Mick.

I'm now looking into how the images are displayed in columns. If I set it to 3 columns, it breaks the layout on mobile. Tables issue.  Imma try flexbox to tidy things up.

Mick.

vbgamer,
I loaded a webp image but is not showing. I figured is not available in the script even tho I added the allowed format in SMF attachment settings. Just a heads up for next release/update.  :P

You cannot view this attachment.

vbgamer45

Does SMF support webp images with thumbnails in attachments? If it does I can enable it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mick.

Quote from: vbgamer45 on January 30, 2022, 11:25:25 AMDoes SMF support webp images with thumbnails in attachments? If it does I can enable it.
Yup.

Arantor

There was a PR for adding WebP support to 2.1 but it would require PHP 7.1 for the bundled GD to support it and not every server has it :( I didn't think it had actually been merged, I saw the debate and I thought Albert closed it.

vbgamer45

Update
7.1
!Make main image display mobile friendly for SMF 2.1.x Thanks to Mick idesignsmf.com
!Start support for webp
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mick.

14 instances in Gallery2.php. Anywhere else? I ask because it's already there. I didn't upgrade.

random539

Thanks for the great mod!  It's working perfectly for me except on the add picture page the description text box is extremely wide, so much so that the Add Picture button isn't even displayed until I scroll quite a bit to the right.  Any ideas on how I could fix this?

Thanks!

edit - Perhaps I should include that I'm using SMF 2.0.19 and SMF Gallery Lite 7.1

Advertisement: