Advertisement:

Author Topic: Thumbnail on Topic Listing  (Read 168486 times)

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #400 on: October 07, 2015, 02:58:28 PM »
Attached updated file.
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

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Thumbnail on Topic Listing
« Reply #401 on: October 07, 2015, 04:25:44 PM »
Wow, if I knew this existed before, lol.

Just got finished finalizing my source and theme edits and came on SMF to see the recent topics and seen this.

Mines a little different first I started off with Aeva images, then I had to keep going as you can see.
Code: [Select]
// Thumbnails
if (preg_match('[smg id=([0-9]+)(.*)]', $row['first_body'], $match)) {
$row['aeva_thumb'] = $scripturl . '?action=media;sa=media;in='.$match[1].';thumb';
} else if (!empty($row['id_thumb']) && $row['id_thumb'] != 0) {
$row['aeva_thumb'] = $scripturl . '?action=dlattach;topic='.$row['id_topic'].';attach='.$row['id_thumb'].';image';
} else if (preg_match('#\[img(.*)\](.*)\[\/img\]#Ui', $row['first_body'], $match)) {
$row['aeva_thumb'] = $match[2];
} else if (!empty($row['filename'])) {
$row['aeva_thumb'] = $modSettings['custom_avatar_url'] . '/' . $row['filename'];
} else if (!empty($row['avatar'])) {
$row['aeva_thumb'] = $row['avatar'] = 'gravatar' ? get_gravatar($row['email_address']) : $row['avatar'];
}

First load Aeva, if none then load attachment thumb, if none then load first image in the post, if none then load gravatar, if none then just fall through to the user avatar. Then in the template if nothing back then just display the generic board icon.

Offline Yahmez

  • Sr. Member
  • ****
  • Posts: 798
  • -_-
Re: Thumbnail on Topic Listing
« Reply #402 on: October 07, 2015, 05:21:05 PM »
Attached updated file.
That did it! Thanks.

I am going to update my copy of the mod now.

I really appreciate your help. Kudos.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #403 on: October 07, 2015, 05:59:14 PM »
Looks good nend what site do you use it on?
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

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Thumbnail on Topic Listing
« Reply #404 on: October 08, 2015, 01:33:11 AM »
On a old site I started fresh again.

Here is one of the boards.
http://www.sicomm.us/photography/

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #405 on: October 08, 2015, 10:26:24 AM »
Wow that is amazing you really did customize it. I can't even tell it is SMF based. Well that shows you the power of the SMF core. I myself use it for whole websites I make or parts.
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

Offline Yahmez

  • Sr. Member
  • ****
  • Posts: 798
  • -_-
Re: Thumbnail on Topic Listing
« Reply #406 on: October 13, 2015, 10:10:15 AM »
Hello again vbgamer,

I reinstalled your new update to this mod (October 7th update) and love how it now grabs images that are not attached, but the images are all huge (ones not attached) and are breaking the layout of the forum. Is there an option to limit the size of these images on the topic listing?

Thanks,
Yahmez

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #407 on: October 13, 2015, 11:07:03 AM »
There is no setting for that
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

Offline Yahmez

  • Sr. Member
  • ****
  • Posts: 798
  • -_-
Re: Thumbnail on Topic Listing
« Reply #408 on: October 13, 2015, 11:18:04 AM »
There actually is a setting for this, I just found it in mod settings.
« Last Edit: October 13, 2015, 11:41:21 AM by Yahmez »

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Thumbnail on Topic Listing
« Reply #409 on: January 11, 2016, 06:50:45 AM »
Thank you SO MUCH for this mod!! It's absolutely fantastic! :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #410 on: January 11, 2016, 09:18:10 AM »
Glad you enjoy 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

Offline assemblytube

  • Semi-Newbie
  • *
  • Posts: 24
Re: Thumbnail on Topic Listing
« Reply #411 on: March 01, 2016, 06:25:09 AM »
Parsing Problems with Version 1.2 of this mod.

I want to uninstall version 1.2 of this mod so that I can install the latest version. I get errors with running uninstall so I tried parsing the mod to do a manual removal.
When I try parsing it I get lots of errors like this:

Warning: SimpleXMLElement::__construct(): Entity: line 34: parser error : Opening and ending tag mismatch: file line 7 and operation in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

Warning: SimpleXMLElement::__construct(): </operation> in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

Warning: SimpleXMLElement::__construct(): ^ in C:\inetpub\wwwroot\smfhacks\packageparser\package.php on line 1200

and no details of the file edits appear.

I attach the version I am trying to parse. Can anyone advise me on how to parse this old version of the mod?

Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: Thumbnail on Topic Listing
« Reply #412 on: March 01, 2016, 08:30:24 AM »
When you see the errors in the uninstall screen, there will be a little pencil icon next to each edit... click the icon for the sections that have errors in the auto-process...   fix those and then finish the package manager uninstall to get the rest.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #413 on: March 01, 2016, 08:55:13 AM »
Also assemblytube that is a very old version. Check out the latest one is version 3.0.
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

Offline assemblytube

  • Semi-Newbie
  • *
  • Posts: 24
Re: Thumbnail on Topic Listing
« Reply #414 on: March 01, 2016, 09:00:22 AM »
Thanks for the tip Kindred. I didn't realise you could do that.

Thanks for the feedback vbgamer45. I was intending to use the latest version of the mod but I could not uninstall the old version due to not being able to parse the code of the old mod to carry out the manual edits needed. If I can do the uninstall I will use the new version. Thanks.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #415 on: March 01, 2016, 09:21:05 AM »
The edits should be nearly the same check new version for the parse instructions.
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

Offline assemblytube

  • Semi-Newbie
  • *
  • Posts: 24
Re: Thumbnail on Topic Listing
« Reply #416 on: March 01, 2016, 09:22:47 AM »
Thank you. Will give it a go.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: Thumbnail on Topic Listing
« Reply #417 on: March 01, 2016, 09:29:50 AM »
How does the new version differ from the old?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #418 on: March 01, 2016, 11:26:05 AM »
List of changes from all versions
Version 3.0
+Added support for img tags inside the first forum post for SMF 2.0 thanks to br360
Setting to control height width found under Modification Settings. Use zero in both values to disable it.
!Fixed board level permissions to hide thumbnails

Version 2.0
Big thanks to dougiefresh for this update.
+Adds an interface in the manage boards area to checkbox if the board has the thumbnail topic system enabled for it or not.

Version 1.1.1
!Fixed a bug with multiple attachments in a post not showing all topics in a forum

Version 1.1
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.

Version 1.0 Intial Release
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

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Thumbnail on Topic Listing
« Reply #419 on: March 01, 2016, 12:48:52 PM »
Wow I have the worst timing. I just edited this mod significantly to make it more gallery like on my forum.

What do you mean by posts disappearing?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.