Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Thread Image
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Thread Image
Requirement: XThreads
Just for XThreads users who want to achieve this with XThreads.

File field type for Image Upload.
Create a new custom thread fields with this settings:
  • Title : Thread Image
  • Key : timg
  • Description: Max file size: 10 KB. Max image size: 200x200. Min Image Size: 75x75. Image allowed: GIF, JPEG, PNG.
    Modify it as our needs. Depends on some settings bellow.
  • Applicable Forums : Select forum(s) where this will be applied
  • Input Field Type : File
  • Valid File Extensions : gif|png|jpeg|jpg
  • Maximum File Size : 1280
    Modify it as our needs. This is the maximum file size for image can be uploaded. ( in bytes). Related to the Description setting.
  • Editable by / Required Field? : Select which usergroup can use this feature. If more than one usergroups allowed to use this feature, but not for all usergroups, select Custom (specify usergroup). This will bring the additional setting:
    • Editable by Usergroups : Select which usergroup can use this feature
  • Only Accept Image Files : Yes
  • Minimum Image Dimensions : 75x75
    Modify it as our needs. It is the smallest image dimension can be uploaded. Related to the Description setting.
  • Maximum Image Dimensions : 200x200
    Modify it as our needs. It is the largest image dimension can be uploaded. Related to the Description setting.
  • Image Thumbnail Generation : 75x75
    Modify it as our needs. It is the thumbnail size that will be displayed in threadlist. Related to Display Format setting bellow.
  • Display Format :

    HTML Code
    <a href="{URL}" target="_blank"><img src="{URL}/thumb75x75" alt="{FILENAME}" title="Click to view this thread image in full size - {$GLOBALS['threadfields']['timg']['dims']['w']} x {$GLOBALS['threadfields']['timg']['dims']['h']}" style="margin: 3px; float: left;" /></a>

    If we modify the Image Thumbnail Generation setting with different thumbnail size, change this part of the code above:

    Code:
    75x75


It should be enough as a basic settings. If we want to enhance it a bit, try to play with the Blank Replacement Value, Viewable by Usergroups and Unviewable Value settings.

Now, open up our forumdisplay_thread template. Find:
1.4:

HTML Code
<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>


1.6:

HTML Code
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>


Add this variable at the beginning of the code above:

Code:
{$GLOBALS['threadfields']['timg']['value']}


That template edit should be enough as a basic. If we want to enhance it a bit, try to play more with the forumdisplay_thread template, and maybe (additional) forumdisplay_threadlist template, and combine it with our custom thread fields settings.



Attached File(s) Thumbnail(s)
   

(This post was last modified: 02-13-2011 03:16 AM by RateU.)
10-24-2010 06:18 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Thread Image - RateU - 10-24-2010 06:18 AM
RE: Thread Image - Flabaliki - 10-24-2010, 11:00 AM
RE: Thread Image - 1master1 - 10-25-2010, 12:26 PM
RE: Thread Image - 1master1 - 10-25-2010, 01:37 PM
RE: Thread Image - ZiNgA BuRgA - 10-25-2010, 04:07 PM
RE: Thread Image - 1master1 - 10-26-2010, 02:52 AM
RE: Thread Image - leefish - 10-26-2010, 03:13 AM
RE: Thread Image - Skatman - 04-23-2011, 04:49 AM
RE: Thread Image - RateU - 04-23-2011, 05:15 AM
RE: Thread Image - Skatman - 04-23-2011, 05:19 AM
RE: Thread Image - Skatman - 04-23-2011, 05:51 AM
RE: Thread Image - RateU - 04-23-2011, 05:55 AM
RE: Thread Image - Skatman - 04-23-2011, 06:06 AM
RE: Thread Image - RateU - 04-23-2011, 06:24 AM
RE: Thread Image - Skatman - 04-23-2011, 06:36 AM
RE: Thread Image - RateU - 04-23-2011, 06:47 AM
RE: Thread Image - Skatman - 04-23-2011, 07:09 AM
RE: Thread Image - RateU - 04-23-2011, 07:18 AM
RE: Thread Image - Skatman - 04-28-2011, 12:09 AM
RE: Thread Image - ZiNgA BuRgA - 04-28-2011, 07:27 AM
RE: Thread Image - Skatman - 04-28-2011, 07:54 AM
RE: Thread Image - lucasbytegenius - 05-01-2011, 07:08 AM
RE: Thread Image - leefish - 05-01-2011, 08:09 AM
RE: Thread Image - lucasbytegenius - 05-01-2011, 08:40 AM
RE: Thread Image - ZiNgA BuRgA - 05-01-2011, 09:05 AM
RE: Thread Image - lucasbytegenius - 05-01-2011, 10:35 AM
RE: Thread Image - ZiNgA BuRgA - 05-01-2011, 11:03 AM
RE: Thread Image - lucasbytegenius - 05-01-2011, 11:15 AM
RE: Thread Image - ZiNgA BuRgA - 05-01-2011, 01:06 PM
RE: Thread Image - lucasbytegenius - 05-01-2011, 01:08 PM
RE: Thread Image - Skatman - 05-30-2011, 09:52 PM
RE: Thread Image - RateU - 05-31-2011, 02:08 AM
RE: Thread Image - Skatman - 05-31-2011, 07:05 PM
RE: Thread Image - Joey_Pham - 08-13-2011, 03:19 PM
RE: Thread Image - Skatman - 09-14-2011, 05:43 AM
RE: Thread Image - ZiNgA BuRgA - 08-13-2011, 05:54 PM
RE: Thread Image - Joey_Pham - 08-19-2011, 02:51 PM
RE: Thread Image - ZiNgA BuRgA - 09-14-2011, 08:40 AM
RE: Thread Image - Skatman - 09-14-2011, 11:07 PM
RE: Thread Image - ZiNgA BuRgA - 09-15-2011, 08:44 AM
RE: Thread Image - Skatman - 09-15-2011, 07:50 PM
RE: Thread Image - ZiNgA BuRgA - 09-15-2011, 10:32 PM
RE: Thread Image - RateU - 09-17-2011, 02:59 AM
RE: Thread Image - Skatman - 09-20-2011, 09:07 PM
RE: Thread Image - Skatman - 10-08-2011, 08:04 PM
RE: Thread Image - RateU - 10-09-2011, 03:45 AM
RE: Thread Image - Glas - 10-09-2011, 09:29 AM
RE: Thread Image - ZiNgA BuRgA - 10-09-2011, 01:00 PM
RE: Thread Image - Glas - 10-09-2011, 02:28 PM
RE: Thread Image - ZiNgA BuRgA - 10-09-2011, 08:23 PM
RE: Thread Image - cacacolass - 11-15-2011, 07:39 AM
RE: Thread Image - ZiNgA BuRgA - 11-15-2011, 07:52 AM
RE: Thread Image - tesskyrim - 12-02-2011, 11:21 PM
RE: Thread Image - RateU - 12-03-2011, 05:36 AM
RE: Thread Image - ZiNgA BuRgA - 12-03-2011, 08:27 AM
RE: Thread Image - tesskyrim - 12-03-2011, 11:07 PM
RE: Thread Image - tesskyrim - 12-04-2011, 11:36 PM
RE: Thread Image - RateU - 12-05-2011, 09:59 AM
RE: Thread Image - ZiNgA BuRgA - 12-06-2011, 09:49 AM
RE: Thread Image - tesskyrim - 12-06-2011, 11:07 PM
RE: Thread Image - RateU - 12-07-2011, 01:30 AM
RE: Thread Image - tesskyrim - 12-07-2011, 02:56 AM
RE: Thread Image - RateU - 12-07-2011, 04:41 AM
RE: Thread Image - ZiNgA BuRgA - 12-07-2011, 08:52 AM
RE: Thread Image - tesskyrim - 12-07-2011, 08:08 PM
RE: Thread Image - ZiNgA BuRgA - 12-08-2011, 08:52 AM
RE: Thread Image - tesskyrim - 12-08-2011, 09:14 PM
RE: Thread Image - ZiNgA BuRgA - 12-09-2011, 09:26 AM
RE: Thread Image - davidedison - 03-15-2012, 12:24 AM
RE: Thread Image - ZiNgA BuRgA - 03-15-2012, 09:29 AM
RE: Thread Image - davidedison - 03-15-2012, 11:28 PM
RE: Thread Image - RateU - 03-16-2012, 04:26 AM
RE: Thread Image - ZiNgA BuRgA - 03-16-2012, 07:22 AM
RE: Thread Image - davidedison - 03-16-2012, 06:28 PM
RE: Thread Image - ZiNgA BuRgA - 03-16-2012, 06:53 PM
RE: Thread Image - davidedison - 03-18-2012, 03:53 AM
RE: Thread Image - ZiNgA BuRgA - 03-18-2012, 08:41 PM
RE: Thread Image - davidedison - 03-19-2012, 01:36 AM
RE: Thread Image - RateU - 03-19-2012, 05:18 AM
RE: Thread Image - ZiNgA BuRgA - 05-05-2012, 05:05 PM
RE: Thread Image - ArieKatz - 05-05-2012, 05:26 PM
RE: Thread Image - RateU - 05-06-2012, 03:32 AM
RE: Thread Image - ArieKatz - 05-06-2012, 04:03 AM
RE: Thread Image - ArieKatz - 05-06-2012, 04:41 PM
RE: Thread Image - RateU - 05-07-2012, 07:13 AM
RE: Thread Image - ArieKatz - 05-08-2012, 01:00 AM
RE: Thread Image - RateU - 05-08-2012, 06:28 AM
RE: Thread Image - ArieKatz - 05-08-2012, 07:22 PM
RE: Thread Image - RateU - 05-09-2012, 06:11 AM
RE: Thread Image - ArieKatz - 05-09-2012, 08:23 AM
RE: Thread Image - bogdan - 06-14-2012, 10:39 PM
RE: Thread Image - ZiNgA BuRgA - 06-14-2012, 10:52 PM
RE: Thread Image - bogdan - 06-14-2012, 11:08 PM
RE: Thread Image - ZiNgA BuRgA - 06-15-2012, 09:47 AM
RE: Thread Image - WINBOY - 11-17-2012, 07:03 PM
RE: Thread Image - ZiNgA BuRgA - 11-17-2012, 07:36 PM
RE: Thread Image - anhmjn - 08-21-2014, 05:12 PM
RE: Thread Image - nier3 - 08-21-2014, 09:26 PM
RE: Thread Image - anhmjn - 08-22-2014, 12:53 PM
RE: Thread Image - ZiNgA BuRgA - 08-22-2014, 04:59 PM
RE: Thread Image - anhmjn - 08-22-2014, 05:58 PM
RE: Thread Image - ZiNgA BuRgA - 08-25-2014, 03:47 PM
RE: Thread Image - umetkaran - 08-15-2015, 06:48 AM
RE: Thread Image - ZiNgA BuRgA - 08-15-2015, 05:47 PM
RE: Thread Image - TheGame7 - 02-14-2016, 07:20 AM
RE: Thread Image - ZiNgA BuRgA - 02-14-2016, 10:20 AM
RE: Thread Image - TheGame7 - 02-14-2016, 05:44 PM
RE: Thread Image - ZiNgA BuRgA - 02-15-2016, 09:28 AM
RE: Thread Image - TheGame7 - 02-16-2016, 03:02 PM
RE: Thread Image - ZiNgA BuRgA - 02-18-2016, 02:26 PM
RE: Thread Image - WINBOY - 06-22-2020, 12:07 AM
RE: Thread Image - RateU - 06-22-2020, 12:22 AM

 Standard Tools
Forum Jump: