Thumbnail on Topic Listing

Started by SMFHacks.com Team, April 04, 2008, 01:05:48 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

nend

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.
// 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.

Yahmez

Quote from: vbgamer45 on October 07, 2015, 02:58:28 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.

vbgamer45

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

nend

On a old site I started fresh again.

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

vbgamer45

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

Yahmez

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

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

Yahmez

#408
There actually is a setting for this, I just found it in mod settings.

Jade Elizabeth

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 career: Color With Jade/Patreon.

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

assemblytube

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.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

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

assemblytube

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.

vbgamer45

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

assemblytube

Thank you. Will give it a go.

Biology Forums

How does the new version differ from the old?

vbgamer45

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

Jade Elizabeth

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 career: Color With Jade/Patreon.

Advertisement: