• Welcome to Simple Machines Community Forum. Please login or sign up.
December 04, 2021, 06:47:45 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Thumbnail on Topic Listing

Started by SMFHacks.com Team, April 04, 2008, 01:05:48 PM

Previous topic - Next topic

SMFHacks.com Team

April 04, 2008, 01:05:48 PM Last Edit: June 11, 2011, 09:19:35 PM by vbgamer45
Link to Mod

This modification takes a thumbnail attachment attached to the first post of the topic and shows this thumbnail on the topic listing page of a forum.

Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear

Version 3.0.1
!Fixed bug SMF 2.0.x not saving new board thumbnail topic settings

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
!Fixed showing an image if there was another attachment of a different type before it.
!Also fixed issue with posts disappearing.
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

dannbass

Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.

Great mod!

RoarinRow

Dang that is cool.  I'm just afraid what picture I'd see.  Knowing my members they will start a topic and put a funky picture up just to mess with me   >:(

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

GliG

Great modification. Thank you vbgamer45...

Only Develop

madman71

April 04, 2008, 05:16:35 PM #4 Last Edit: April 04, 2008, 06:53:05 PM by madman71
Just what I was almost looking for.  I think im gonna try it.  Just how bad does the server resources take a hit because of all of the queries??

How would one modify this to pick up hot linked images?
This is what im truly looking for ;D

madman71

one more thing.  Where in the script can i adjust the thumbnail size? They are quite large :)

dannbass

For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.

madman71

Quote from: dannbass on April 04, 2008, 07:11:54 PM
For that you'll need to go here /index.php?action=manageattachments and change the
Maximum width of thumbnails:     
Maximum height of thumbnails:

That should do it.

Hummm, that didnt work :(

It changed the size of the thumbnails inside  the thread but not outside.  Is this how you did it (assuming that you have this mod)?

madman71

NM, it works now.  Just took a bit  ;D

vbgamer45

Quote from: dannbass on April 04, 2008, 01:47:21 PM
Great! thanks for the mod! I have an idea, how about making it a board-based mod, so there one can choose where to put it in the ?action=manageboards section.

Great mod!
That's planned for the next 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

dannbass

Quote from: vbgamer45 on April 04, 2008, 10:25:58 PM
That's planned for the next release.

Fabulous! For now I'll get by with conditionals and $context['current_board'] and so on!

Thanks vbgamer45!

drHaus

I have eror

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11



when write this line modifitacion:
IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
            IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight

vbgamer45

I would need to see the whole query to see what is causing that error.
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

drHaus

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 11
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.





this si cod , where is problem on messageindex.php:


mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
            mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
            IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys



vbgamer45

Change this part

IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys

To

IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys


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

drHaus

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabl' at line 12
File: /home/phonedat/public_html/upoznavanje/Sources/MessageIndex.php
Line: 459

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php




part of cod:

mf.subject AS firstSubject, mf.icon AS firstIcon, mf.posterName AS firstMemberName,
            mf.ID_MEMBER AS firstID_MEMBER, IFNULL(memf.realName, mf.posterName) AS firstDisplayName,IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight,
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys
            LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys



vbgamer45

You have the same code repeated remove one of the

LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys
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

drHaus


madman71

Vbgamer,

Do you know what would cause this glitch?  When i uninstall the mod the posts show up, but if i reapply it they disappear.   If i do a search for these missing posts they do show up though.


vbgamer45

Quote from: madman71 on April 06, 2008, 08:57:06 PM
Vbgamer,

Do you know what would cause this glitch?  When i uninstall the mod the posts show up, but if i reapply it they disappear.   If i do a search for these missing posts they do show up though.


Not sure yet would need to do some more testing like what is contained in those posts?
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

Advertisement: