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: 43260
Total Topics: 7518
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 259
Total: 260

Author Topic: Quirks/Annoyances  (Read 4712 times)

0 Members and 1 Guest are viewing this topic.

Offline TWD

  • Member
  • *
  • Posts: 6
    • View Profile
Quirks/Annoyances
« on: March 07, 2007, 02:33:21 pm »
Please forgive me if this should be in a different forum.  I have SMF Gallery Pro and for the most part it's a nice package.  There are a few things about it that are kind of a pain for me, though.  If there are quick fixes for these, please tell me how to implement.  If not, please add them to the next version.

1. The galleries appear to auto sort from high to low.  I use mine almost exclusively for slideshows of football games and the sort order for the pictures should almost always be low to high (lower number pictures occurred earlier in the game).  Is there an easy way to change to sort order or (better) to manually sort?

2. The Next|Previous links are still displayed even when a user has reached the Beginning|End of the gallery.  Is there a way to keep a running count somewhere so that when one reaches the end of a gallery, the "Next" link is not displayed?

3. My galleries are stored by years.  I'll have a category of 2006 which contains maybe 12 subcategories - 1 for each game played in 2006.  When I create a new subcategory, I do a bulk import of all the pictures for that game and then go in and edit each picture to add the captions.  Problem is that after I edit a picture, I'm thrown back to a page containing all of the thumbnails from the entire category.  I want to go back to a page with all the thumbnails from just the SUBCATEGORY (or - ideally - I'd like to just have the option to EDIT the next photo in the subgallery).  Is there a way to do this?

Thanks.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Quirks/Annoyances
« Reply #1 on: March 07, 2007, 08:10:59 pm »
1. Not an option currently requires some code edits
Open Themes/default/Gallery.template.php
Find on line 104
Code: [Select]
//Show the pictures
$dbresult = db_query("SELECT p.ID_PICTURE, p.totalratings, p.rating, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE  p.ID_MEMBER = m.ID_MEMBER  AND p.ID_CAT = $cat AND p.approved = 1 ORDER BY ID_PICTURE DESC LIMIT $curpage," . $modSettings['gallery_set_images_per_page'], __FILE__, __LINE__);
$rowlevel = 0;
Change to
Code: [Select]
//Show the pictures
$dbresult = db_query("SELECT p.ID_PICTURE, p.totalratings, p.rating, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE  p.ID_MEMBER = m.ID_MEMBER  AND p.ID_CAT = $cat AND p.approved = 1 ORDER BY ID_PICTURE ASC LIMIT $curpage," . $modSettings['gallery_set_images_per_page'], __FILE__, __LINE__);
$rowlevel = 0;


2. Currently not an option built I could look into doing in the future. I looked at in the past saw no way to do so without extra queries.

3. That is something I will think about adding in the future.
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 TWD

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Quirks/Annoyances
« Reply #2 on: March 08, 2007, 08:45:08 am »
Thanks.  I was hoping I hadn't missed anything incredibly obvious! ;)

For #2 (the "Next | Previous" question) - and forgive my ignorance, as I'm very unfamiliar with mysql - is there a way to do a subquery inside of your initial "get all the pictures" query which would indicate that a picture is first or last on the list?  Something along the lines of:

SELECT pictable.picname, pictable.picdesc,
(select max(picname) from pictable) AS [first], (select min(picname) from pictable) AS [last])
FROM pictable
ORDER BY pictable.picname DESC;


Then when you display the links for next and previous, you'd put them into if statements (if [picname]<>[First] then display the previous link, etc).

Make any sense?  I did something very similar in .asp for an articles database and it worked great.



The edit next picture thing would be a huge blessing for me, but I guess I'll just get around it now by editing the database directly. 

Thanks again for the quick response.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Quirks/Annoyances
« Reply #3 on: March 08, 2007, 08:51:03 am »
SMF blocks subqueries since they are not used anywhere in SMF. I will take a look at it again see if I can come up with a better solution.
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
Quirks

Started by SBB « 1 2 » Bugs

15 Replies
15389 Views
Last post November 21, 2006, 10:58:05 am
by cubby61

+- Recent Topics

No thumbnails on new uploads by Tonyvic
Today at 06:26:18 am

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