English EN Thread Image
? Okuma Hesaplanıyor... Okuma: %0
Hasan Kurucu
tarih 03-19-2025, 06:01 PM
#1
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 :
    Kod:

    <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:
    Kod:
    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:
Kod:

<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:
Kod:

<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:
Kod:
{$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.

imza çizgisi
Çekirge 1 Sıçrar... 2 Sıçrar... 3 Sıçrar... 4 Sıçrar... 5 Sıçrar...
Sıçrar Yani Çekirge Sonuçta Bu aferin
Gidenler.Me · Forum





Konuyu Okuyanlar: 1 Ziyaretçi

 
Dikkat Edelim
Kurallar


Reklam
Reklam


Yasal Uyarı
Gidenler.Me, hukuka, yasalara, telif haklarına ve kişilik haklarına saygılı olmayı amaç edinmiştir. Gidenler.Me, 5651 Sayılı İnternet Ortamında Yapılan Yayınların Düzenlenmesi ve Bu Yayınlar Yoluyla İşlenen Suçlara Mücadele Edilmesi Hakkında Kanunda tanımlanan -Yer Sağlayıcı- olarak hizmet vermektedir. İlgili yasaya göre, Gidenler.Me yönetiminin hukuka aykırı içerikleri kontrol etme yükümlülüğü yoktur. Bu sebeple, Gidenler.Me -Uyar ve Kaldır- prensibini benimsemiştir. Telif hakkına konu olan eserlerin yasal olmayan bir biçimde paylaşıldığını ve yasal haklarının çiğnendiğini düşünen hak sahipleri veya meslek birlikleri, gidenlerme@gmail.com mail adresinden bize ulaşabilirler. Buraya ulaşan talep ve şikayetler incelenerek ihlal olduğu belirlenen içerikler Gidenler.Me 'den kaldırılacaktır. Ayrıca, mahkemelerden talep gelmesi halinde hukuka aykırı içerik üreten ve hukuka aykırı paylaşımda bulunan üyelerin tespiti için gerekli teknik veriler sağlanacaktır.



Türkçe Çeviri: MyBB, Yazılım: MyBB 1.6.x, © 2002-2026 MyBB Group.
Copyright ©2024 - 2026 Gidenler®. All rights reserved.
GM v3.0.0.8 Beta theme designed for MyBB
Basit Sürüm
Mobil Sürüme Geç!