• Welcome to Simple Machines Community Forum. Please login or sign up.
October 26, 2021, 10:02:22 PM

News:

Wondering if this will always be free?  See why free is better.


Thumbnail on Topic Listing

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

Previous topic - Next topic

thananit

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?
$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();

vbgamer45

Change to

$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

thananit

Quote from: vbgamer45 on October 29, 2014, 09:45:17 AM
Change to

$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.
:) :) :)

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

tdguchi

hi, is there any way to modify this mod to use the first  [ img ] [ /img ] instead of the attachment?

thanks

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

tdguchi

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

vbgamer45

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

tdguchi

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?

Arantor

That would still require fudging $_FILES and is still not possible with createAttachment because it would fail PHP security checks.
No good deed goes unpunished
All helpful urges should be circumvented

tdguchi

Quote from: Arantor 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.

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

br360

Quote from: tdguchi 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

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.

vbgamer45

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

br360

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?

vbgamer45

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

br360

That'll work. Can I pm you about specifics and such?

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

roshaoar

Quote from: br360 on January 29, 2015, 02:03:58 AMThat 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?

roshaoar

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


vbgamer45

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

Advertisement: