Advertisement:

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

Offline thananit

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #360 on: October 29, 2014, 12:33:34 AM »
I'm sorry,my Englisg is not good but I try to explain.
I need help and suggestion.
I used SMF2.0.9 and download package of Thumbnail on Topic Listing's mod but index.php was fail.(I used mod of Pretty url before the Thumbnail on Topic Listing )
And I try to mod by manual that follow a guideline http://custom.simplemachines.org/mods/index.php?action=parse.
But the index page not run, it's blank page.
Please help to see my code in index.php, how to edit it to correct?
Code: [Select]
$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls']),
   $context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #361 on: October 29, 2014, 09:45:17 AM »
Change to
Code: [Select]
$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls'])
);

$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();
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 thananit

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #362 on: October 29, 2014, 11:05:15 AM »
Change to
Code: [Select]
$context = array('pretty' => array(
   'action_array' => unserialize($modSettings['pretty_action_array']),
   'board_urls' => unserialize($modSettings['pretty_board_urls'])
);

$context['photo_boards'] = isset($modSettings['photo_boards']) ? explode(',', $modSettings['photo_boards']) : array();

Thank you vey much.
 :) :) :)

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #363 on: October 29, 2014, 11:05:44 AM »
Glad to help
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 tdguchi

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #364 on: December 17, 2014, 01:49:54 PM »
hi, is there any way to modify this mod to use the first  [ img ] [ /img ] instead of the attachment?

thanks

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #365 on: December 17, 2014, 01:57:20 PM »
Not at the moment.
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 tdguchi

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #366 on: December 17, 2014, 02:08:28 PM »
ok....well i needed it, im using createpost to add posts to my forum.... and i dont know how to add attachments.... (i have read createttachment() but that is not working.... i will wait them to modify to use an img instead of attachment...

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #367 on: December 18, 2014, 08:54:36 AM »
Img part is somewhat tough...Since you have the scan the post for all the image tags which is harder/slower than attachments since attachments can easily be linked.
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 tdguchi

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #368 on: December 18, 2014, 09:21:03 AM »
a quick solution is to download the image (via script) and autoattach it to the newly created post automatically... do yo know how to attach via script a local file on the srrver?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,993
    • StoryBB/StoryBB on GitHub
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #369 on: December 18, 2014, 09:31:23 AM »
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline tdguchi

  • Semi-Newbie
  • *
  • Posts: 25
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #370 on: December 18, 2014, 12:17:56 PM »
That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.

ok... then I will wait for them to write the functionality to find the first image of the post ....

Offline br360

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,368
    • GenXcommunity
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #371 on: January 29, 2015, 02:03:58 AM »
hi, is there any way to modify this mod to use the first  [ img ] [ /img ] instead of the attachment?

thanks

That seems to be one of the most requested features to add to this mod, and something I would really like to see added as well.

@vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #372 on: January 29, 2015, 09:43:53 AM »
The issue with this is much slower to process. I would have to scan the post for the image.  Or when the post is created add the image into a table.
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 br360

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,368
    • GenXcommunity
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #373 on: January 29, 2015, 02:09:47 PM »
When you say much slower to process, are you referring to it becoming more resource heavy when pages are loaded? Maybe an option to enable or disable this feature for those that wouldn't want to use the extra resources and would be happy with just thumbnails?

I know this has been done and there are mods for this on vbulletin, xenforo and even phpbb. ( it shows the first pic in a topic on forum index, no matter if it's an img or attachment )

If you did have some time and were able to accept an offer for me to pay you to add this; maybe you could look at the coding for any of those mods to see how they were able to accomplish this, and if there was an easier way?

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #374 on: January 29, 2015, 03:05:16 PM »
Yes when ever the message index is loaded. I would have to grab the first post from the database. Search it for the first image tag extract that tag then place it on the message index quick and dirty I can do that for $75
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 br360

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,368
    • GenXcommunity
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #375 on: January 29, 2015, 03:16:38 PM »
That'll work. Can I pm you about specifics and such?

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #376 on: January 29, 2015, 03:18:47 PM »
Sure.
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 roshaoar

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #377 on: April 27, 2015, 08:36:21 PM »
That seems to be one of the most requested features to add to this mod, and something I would really like to see added as well. @vbgamer45, I would be happy to pay for this addition to the mod. Please feel free to pm me with costs if this is something you would be willing to do.

Maybe I've misunderstood this (I'm new here, sorry), but if it's for public offering I'd happy to chip in half as I'm in the long winded process of thrashing out a photography forum and, well, this could be rather nice... could it be a function that looks at the post and either posts the first image (if there's one) or if there's an attached image, post that thumbnail instead?

Offline roshaoar

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #378 on: May 01, 2015, 04:51:59 AM »
Just an addendum to this, and my offer still stands vbgamer45 :) Something I'm starting to learn as I play around with SMF is that the order of installing mods makes a difference. I couldn't for the life of me get this to work on my 5th testsmf install. But I now realise that some of the other mods had changed something that this mod looks for to pass its tests. On this install I stuck to much simpler mods and this installed just fine. Thanks again vbgamer45


Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,232
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2.0 Support Added!)
« Reply #379 on: May 01, 2015, 08:59:44 AM »
At this time I am very busy with other projects not looking to take on any other work.
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