English EN Pre Formatted Thread
 
#1
user avatar
Hasan
Kurucu Offline
tarih Dün, 12:38 PM
This is useful if we want our member to provide some info when they create a thread in a specified forum.
In this simple example, we will set a forum so when a member create a new thread in that forum, they need to fill a field with their Website URL, which is required, and optionally, they can fill a field with they Forum URL, which is not required.

Here is the simple setting for our XThreads:

1. XThreads Options in Forum settings:
  • Template Prefix: intro_
  • Show first post on every showthread page: Yes
2. Create a Custom Thread Fields with this settings:
  • Title: Your Website URL
  • Key: wwwurl
  • Description: Fill the field with your full site URL (required).
  • Applicable Forums: 'select a forum that we want the fields to be applied'
  • Input Field Type: Textbox
  • Editable by / Required Field?: Everyone (Required)
  • Display Format:
    Kod:
    <strong>Website URL: {VALUE}</strong><br />
3. Create another Custom Thread Fields with this settings:
  • Title: Your Forum URL
  • Key: forumurl
  • Description: Fill the field with your full forum url (not required).
  • Applicable Forums: 'select the same as the forum in point 2'
  • Input Field Type: Textbox
  • Editable by / Required Field?: Everyone
  • Display Order: 2
  • Blank Replacement Value:
    Kod:
    <strong>Forum URL: None</strong><br />
  • Display Format:
    Kod:
    <strong>Forum URL: {VALUE}</strong><br />
4. Create a new template in Global Template:
  • Template Name: intro_postbit_first
  • Template Content:
    Kod:

    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tbody>
    <tr>
    <td class="tcat">
    <div class="float_left smalltext">
    {$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    </div>
    {$post['posturl']}
    </td>
    </tr>

    <tr>
    <td class="trow1 {$unapproved_shade}">
    <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    <tr>
    <td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    {$post['useravatar']}
    </td>
    <td class="post_author">
    <strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    <span class="smalltext">
    {$post['usertitle']}<br />
    {$post['userstars']}
    {$post['groupimage']}
    </span>
    </td>
    <td class="smalltext post_author_info" width="165">
    {$post['user_details']}
    </td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td class="trow2 post_content {$unapproved_shade}">
    <span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

    <div class="post_body" id="pid_{$post['pid']}">
    {$GLOBALS['threadfields']['wwwurl']}{$GLOBALS['threadfields']['forumurl']}{$post['message']}
    </div>
    {$post['attachments']}
    {$post['signature']}

    <div class="post_meta" id="post_meta_{$post['pid']}">
    {$post['iplogged']}
    </div>
    </td>
    </tr>

    <tr>
    <td class="trow1 post_buttons {$unapproved_shade}">
    <div class="author_buttons float_left">
    {$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    </div>
    <div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    The template above based on the default postbit template. If we have a custom postbit template, copy paste the template content into intro_postbit_first template. Then add {$GLOBALS['threadfields']['wwwurl']} and {$GLOBALS['threadfields']['forumurl']} variables into the template.
  • Template Name: intro_postbit_first_classic
  • Template Content:
    Kod:

    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    <tr>
    <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    <span class="smalltext">
    {$post['usertitle']}<br />
    {$post['userstars']}
    {$post['groupimage']}
    {$post['useravatar']}<br />
    {$post['user_details']}
    </span>
    </td>
    <td class="{$altbg}" valign="top">
    <table width="100%">
    <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    <br />
    <div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    {$GLOBALS['threadfields']['wwwurl']}{$GLOBALS['threadfields']['forumurl']}{$post['message']}
    </div>
    {$post['attachments']}
    {$post['signature']}
    <div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    {$post['iplogged']}
    </div>
    </td></tr>
    </table>
    </td>
    </tr>
    <tr>
    <td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    <td class="{$altbg}" style="vertical-align: middle;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr valign="bottom">
    <td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}</span></td>
    <td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    Again, the template above based on the default postbit_classic template. If we have a custom postbit_classic template, copy paste the template content into intro_postbit_first_classic template. Then add {$GLOBALS['threadfields']['wwwurl']} and {$GLOBALS['threadfields']['forumurl']} variables into the template.

    Please remember that the key for this is, adding {$GLOBALS['threadfields']['wwwurl']} and {$GLOBALS['threadfields']['forumurl']} variables into the intro_postbit_first and/or intro_postbit_first_classic template.

Screenshots:

1. A member create a new thread in a specified forum:

[Resim: xc7x8m.jpg]

2. Result (Horizontal postbit layout):

[Resim: 2v2igq8.jpg]

3. Result (Classic postbit layout):

[Resim: 10xeovp.jpg]

4. Error message will be displayed when they didn't fill the "Website URL" field (required field):

[Resim: 33w8go1.jpg]

imza çizgisi
[Resim: dimza.gif]





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, hgidenler@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-2025 MyBB Group.
Copyright ©2024 - 2025 Gidenler®. All rights reserved.
GM v1.0.20 theme designed for MyBB
Basit Sürüm