Bugün çevirisini yapacağım makale ile xThreads ile "
Kitap İnceleme" uygulaması yapacağız. Tabi siz bunu oyun inceleme, uygulama inceleme gibi bir şey içinde kendinize göre düzenleme yaparak kullanabilirsiniz.
Uygulama Yazarı: leefish
Sürüm: MyBB 1.6.x, MyBB 1.8.x
Kurulum:
Öncelikle
Admin Panel
Forum Ayarları
Custom Thread Field üzerinden 4 alan oluşturacağız.
1. Konu Alanı
Burada kitap yazarını eklememizi sağlayacak kutucuğu ekliyoruz.
Title: Yazar
Key: book_author
Description: Yazarın Adı -
biçim, önce ad, ardından soyadıdır. Birden fazla yazarı | karakteri ile ayırın
Applicable Forums: 'uygulanacak forumu seçin'
Input Field Type: Textbox
Maximum Text Length: 200
(İsteğinize göre değiştirin. Açıklama için maksimum karakter sayısıdır.)
Field Input Width: 40
Editable by / Required Field?: Everyone (Required)
Display Parsing: Plain Text
Display Format: <strong>Author</strong> : {VALUE}
Allow multiple values for this field: No (Hayır)
Text Mask Filter: ^.*$
2. Kitap Türü
Burada kitabın türünü ekliyoruz.
Title: Kitap Türü
Key: bookcat
Description: Kitabınız için türü seçin (
birden fazla seçim yapabilirsiniz)
Applicable Forums: 'select the forum in point 1'
Input Field Type: Checkboxes
Values List
Kod:
Kurgu
Bilim
Gerilim
GenelKurgu
BilimKurgu
CizgiRoman
Editable by / Required Field?: Everyone (Required)
Display Order: 2
{$GLOBALS['threadfields']['bookcat']} etiketlerini temamıza ekleyeceğiz
Allow Filtering: Yes
Display Format:
Multiple Value Delimiter:
Formatting Map List:
Kod:
Kurgu{|}<a href="{$forumurl?}filtertf_bookcat=Kurgu"><span style="color: green;">Kurgu</span></a>
Bilim{|}<a href="{$forumurl?}filtertf_bookcat=Bilim"><span style="color: green;">Bilim</span></a>
Gerilim{|}<a href="{$forumurl?}filtertf_bookcat=Gerilim"><span style="color: blue;">Gerilim</span></a>
GenelKurgu{|}<a href="{$forumurl?}filtertf_bookcat=GenelKurgu"><span style="color: blue;">Genel Kurgu</span></a>
Bilim Kurgu{|}<a href="{$forumurl?}filtertf_bookcat=BilimKurgu"><span style="color: blue;">Bilim Kurgu</span></a>
CizgiRoman{|}<a href="{$forumurl?}filtertf_bookcat=CizgiRoman"><span style="color: blue;">Çizgi Roman</span></a>
3. İnceleme Puanı
Burada kitaba inceleme puanı ekliyoruz.
Title: Kitap Değerlendirmesi
Key: book_rating
Description: Kitapa bir puan verin en fazla 10 puan
Applicable Forums: 'uygulanacak forum/ları seçin'
Input Field Type: ListBox
Values List
Field Input Width: 40
Field Input Height: 1
Editable by / Required Field?: Everyone (Required)
Display Order: 3
Temada kullanılacak etiket {$GLOBALS['threadfields']['book_rating']}
Allow Filtering: Yes
Only accept uploaded images: No
Blank Replacement Value:
Kod:
<tr><td width="100%" align="right" color="white">Kitap Puanı (1 ile 10 arası)</td>
<td width="1">:</td>
<td>
<div class="tbar2" style="width: 250px;" font-color="white;" align="left";>
<span style="margin-left: 6px;"><strong> Değerlendirilmemiş</strong></span>
</div>
</td>
</tr>
Display Format
Kod:
<tr><td width="100%" align="right">Kitap Puanı (1 ile 10 arası)</td>
<td width="1">:</td>
<td>
<div class="tbar2" style="width: 250px;" align="left">
<div class="tbar" style="width: {VALUE}0%; white-space: nowrap;">
<span style="margin-left: 6px;"><strong> {VALUE}</strong></span>
</div>
</div>
</td></tr>
Allow multiple values for this field: No
Kullandığınız temanın global.css son satıra eklenecek kodlar
Kod:
.tbar {
background: #CC0033;
height: 14px;
color: #ffffff;
font-size: 10px;
}
.tbar2 {
background: #999999;
height: 14px;
color: #ffffff;
font-size: 10px;
}
.fancy {
background: #3887BA;
color: #ffffff;
height: 10px;
font-family: Arial;
font-size: 12px;
}
4. Kitap Kapağı
Burada incelediğimiz kitaba kapak fotoğrafı ekliyoruz.
Title: Kitap Kapağı
Key: book_jacket
Description: Lütfen tanıtımını yapacağınız kitabın kapağını ekleyin.
Applicable Forums: 'uygulanacak forumu ekleyin'
Input Field Type: File
Valid File Extensions: gif|png|jpg|jpeg
(İsteğinize göre değiştirebilir veya yeni bir uzantı ekleyebilirsiniz)
Maximum File Size: 1048576
Bu boyutuda istediğiniz gibi değişebilirsiniz ancak unutmayınız MyBB'nin maximum saydığı sınırı geçemezsiniz. Burada belirtilen dosya boyutunun byte olduğuna dikkat ediniz.
Editable by / Required Field?: Everyone (Required)
Display Order: 4
Only Accept Image Files: Yes
Minimum Image Dimensions: 160x120
Image Thumbnail Generation: 88x66|160x120|240x180|320x240|480x360|640x480
Display Format:
Bu alan için oluşturulan html etiketi
{$GLOBALS['threadfields']['book_jacket']} olduğunu biliniz.
5. Şimdi Forum ayarları içinde bulunan xThreads ayarlarını düzenleyelim. Bunun için Admin Panel

Forumlar ve Mesajlar

Seçtiğiniz Forum ayarlarına girin
Template Prefix: book_
Show first post on every showthread page: Yes
Thread Grouping : 0
Enable XThreads' Inline Forum Search: Yes
Override Threads Per Page: 2
Force Postbit Layout: Force Horizontal Postbit
6. Şimdi uygulamanın şablonlarını siteye ekleyeceğiz. Bunun için Admin Panel

Temalar ve Şablonlar

Şablonlar

Genel Şablonlar

Şablon Ekle diyerek aşağıdaki şablonları ekliyoruz
Şablon Adı: book_forumdisplay
Şablon İçeriği:
Please Note: This template contains the book picture that you can see on the screen shot (picture is included in extra content attachment). You will need to edit the location of the picture. Edit line 23.
Kod:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$moderatedby}
{$rules}
{$subforums}
<table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr>
<td valign="top" width="10%">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr><td class="thead"><strong>Books</strong></td></tr>
<tr><td class="fancy"></td></tr>
<tr><td class="trow1"><img src="http://your site/location of Image/bookmarksite.jpg" alt="books" /></td></tr>
<tr><td class="fancy"></td></tr>
<tr><td class="thead"><strong> </strong></td></tr>
</table>
</td>
<td valign="top">
{$threadslist}
</td>
</tr>
</table>
{$footer}
</body>
</html>
Şablon Adı: book_forumdisplay_threadlist
Şablon İçeriği:
Kod:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;"> <tr>
<td class="thead" colspan="{$colspan}" align="center">
<strong>{$foruminfo['name']}</strong>
</td>
</tr>
<tr><td class="fancy"></td></tr>
</table>
<br />
{$mbhattachment_gallery}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%;">
<tr>
<td valign="top" width="85%" colspan="{$colspan}">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
{$threads}{$nullthreads}
</table>
</td>
<td valign="top" width="15%">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr><td class="thead"><strong>Browse Books</strong></td></tr>
<tr><td class="fancy"></td></tr>
<tr><td class="trow1" align="center">
<form action="search.php" method="post">
<input type="text" class="textbox" name="keywords" /> {$gobutton}
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="forums" value="{$fid}" />
<input type="hidden" name="postthread" value="1" />
</form>
</td></tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr><td class="thead"><strong>Genre</strong></td></tr>
<tr><td class="fancy"></td></tr>
<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}"><span><strong>All</strong></span></a></td></tr>
<tr><td class="trow2"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=Fiction"><span><strong>Fiction</strong></span></a></td></tr>
<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=NonFiction"><span><strong>NonFiction</strong></span></a></td></tr>
<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=GeneralFiction"><span><strong>General Fiction</strong></span></a></td></tr>
<tr><td class="trow2"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=Comics"><span><strong>Comics</strong></span></a></td></tr>
<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=SciFi"><span><strong>Science Fiction</strong></span></a></td></tr>
<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&filtertf_bookcat=Thriller"><span><strong>Thriller</strong></span></a></td></tr>
</table>
</td>
</tr>
</table>
<br class="clear" />
<div class="float_left" style="margin: -8px 0px 15px 0px;">
{$multipage}
</div>
<div class="float_right" style="margin: -8px 0px 15px 0px;">
{$newthread}
</div>
<br class="clear" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="tcat">
<div class="float_left">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="fid" value="{$fid}" />
<select name="sortby">
<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
{$ratingsort}
<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
</select>
<select name="order">
<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
</select>
<select name="datecut">
<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
</select>
{$gobutton}
</form>
</div>
<div class="float_right">
{$forumjump}
</div>
{$inlinemodcol}
</td>
</tr>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="tfoot" align="center" colspan="{$colspan}">
<strong>Powered by : <a href="http://mybbhacks.zingaburga.com" target="_blank">XThreads</a> Coded By: <a href="http://mybbhacks.zingaburga.com" target="_blank">ZiNgA BuRgA - MyBB Hacks</a></strong>
</td>
</tr>
</table>
<br class="clear" />
<div class="float_left" style="text-align: left;">
{$usersbrowsing}
</div>
<div class="float_right" style="text-align: right;">
{$inlinemod}
</div>
<br style="clear: both" />
{$inline_edit_js}
* Template Name: book_forumdisplay_thread
* Template Content:
Kod:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="1" class="tborder">
<tr>
<td class="thead" colspan="{$colspan}">
<div><strong><a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong></div>
</td>
</tr>
<tr>
<td class="tcat" colspan="{$colspan}">
<span class="smalltext">
Reviewer: {$thread['profilelink']} | {$GLOBALS['threadfields']['bookcat']}
</span>
{$rating}
</td>
</tr>
<tr>
<td class="{$bgcolor}" width="100%" colspan="3">
<div class="post_body">
{$thread['postpreview']}
<a href="{$thread['threadlink']}"><span class="smalltext"><em>Read More</em></span></a></div>
<br class="clear" />
<span class="float_right smalltext">
<em>
{$thread['views']} {$lang->views},
<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} {$lang->replies},
<a href="{$thread['lastpostlink']}" title="{$thread['lastpostpreview']}">{$lang->lastpost}</a>: {$lastposterlink}, {$lastpostdate} {$lastposttime}
</em>
</span>
{$modbit}
<br class="clear" />
</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="2" cellpadding="1" class="trow1">
{$GLOBALS['threadfields']['book_rating']}
</table>
</td>
</tr>
</table>
* Template Name: book_postbit
* Template Content:
Please note: there is some fancy pants stuff going on in here; I have a link to a "Guest Avatar" to keep the layout looking nice. In this template it is called guestfish.gif and is stored in the images/avatars. See the line below. if you choose not to add this function then you will get the text guest instead of the mini avatar.
Kod:
<img src="{$mybb->settings['bburl']}/images/avatars/guestfish.gif" class="miniav" width="45" height="45" alt="guest" />
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">
<if $post['avatar'] then>
<img src="{$post['avatar']}" class="miniav" width="45" height="45" alt="avatar" />
<else>
<img src="{$mybb->settings['bburl']}/images/avatars/guestfish.gif" class="miniav" width="45" height="45" alt="guest" />
</if>
<strong>{$post['profilelink']}</strong>{$post['postdate']}, {$post['posttime']}
<div><span id="edited_by_{$post['pid']}"></span></div>
</div>
{$post['posturl']}
</td>
</tr>
<tr>
<td class="trow2 post_content {$unapproved_shade}">
<span class="smalltext"><strong>{$post['subject_extra']}</strong></span>
<div class="post_body" id="pid_{$post['pid']}">
{$post['message']}
</div>
{$post['signature']}
<div class="post_meta" id="post_meta_{$post['pid']}">
{$post['iplogged']}
</div>
</td>
</tr>
<tr>
<td {$post['mnhtd']}class="trow1 post_buttons {$unapproved_shade}">
<div class="author_buttons float_right">
{$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_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>
* Template Name: book_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">
<if $post['avatar'] then>
<img src="{$post['avatar']}" class="miniav" width="45" height="45" alt="avatar" />
<else>
<img src="{$mybb->settings['bburl']}/images/avatars/guestfish.gif" class="miniav" width="45" height="45" alt="avatar" />
</if>
<strong>{$post['profilelink']}</strong> : {$post['postdate']}, {$post['posttime']} <div><span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></div>
</div>
{$post['posturl']}
</td>
</tr>
<tr>
<td class="trow2 post_content {$unapproved_shade}">
<div class="tbar">{$GLOBALS['threadfields']['book_author']}</div>
<div class="tbar2">{$GLOBALS['threadfields']['bookcat']}</div>
<div style="text-align: justify; padding: 3px;">
<div class="float_left" style="margin: 5px 5px 0px 0px;">
<div align="left"><img src="{$GLOBALS['threadfields']['book_jacket']['url']}/thumb480x360" alt="{$thread['subject']} Screenshot" title="{$thread['subject']} Screenshot" width="{$GLOBALS['threadfields']['book_jacket']['thumbs']['480x360']['w']}" height="{$GLOBALS['threadfields']['book_jacket']['thumbs']['480x360']['h']}" />
</div></div>
<div class="post_body" id="pid_{$post['pid']}">
{$post['message']}
</div>
<div class="post_meta" id="post_meta_{$post['pid']}">
{$post['iplogged']}
</div>
</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_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>
* Template Name: book_showthread
* Template Content:
Kod:
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
var quickdelete_confirm = "{$lang->quickdelete_confirm}";
// -->
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=1400"></script>
</head>
<body>
{$header}
{$pollbox}
<div class="float_right">
{$newreply}
</div>
{$ratethread}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" style="clear: both; border-bottom-width: 0;">
<tr>
<td width="60%" valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
<tr>
<td class="thead" colspan="2">
<div style="float: right;">
<span class="smalltext"><strong><a href="showthread.php?mode=threaded&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&tid={$tid}&pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
</div>
<div>
<strong>{$thread['subject']}</strong>
</div>
</td>
</tr>
</table>
<div>
{$first_post}
</div>
<div align="center">
<strong>« <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> »</strong>
</div>
</td>
<td></td>
<td width="40%" valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-bottom-width: 0;">
<tr>
<td class="thead">
<div><strong>Comments</strong></div>
</td>
</tr>
</table>
<div id="posts">
{$posts}
</div>
<div class="float_right">
{$multipage}
</div>
</td>
</tr>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="tfoot" align="center" colspan="{$colspan}">
<strong>Powered by : <a href="http://mybbhacks.zingaburga.com" target="_blank">XThreads</a> Coded By: <a href="http://mybbhacks.zingaburga.com" target="_blank">ZiNgA BuRgA - MyBB Hacks</a></strong>
</td>
</tr>
</table>
<br style="clear: both;" />
{$threadexbox}
{$similarthreads}
{$quickreply}
<br />
<div class="float_left">
<ul class="thread_tools">
<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
<li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li>
<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&tid={$tid}&my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
</ul>
</div>
<div class="float_right" style="text-align: right;">
{$moderationoptions}
{$forumjump}
</div>
<br style="clear: both;" />
{$footer}
</body>
</html>
* Template Name: book_showthread_noreplies
* Template Content:
Kod:
<div id="xthreads_noreplies" align="center">
<em>There are no comments on this book review</em>
</div>
Extra Content:
PHP in Templates / Complex Templates (required). You can get the plug in
HERE
Picture for the books panel (optional - you can use your own picture or an ad block)
Plug in for the gallery display (optional) This plugin was created by RateU , updated for Xthreads by ZingaBurga and is shared by me. This plugin has NOT been reviewed by ZB.
EDIT. Further in this thread RateU points out that this particular plug in does run a global query which is not really necessary. If this is a concern for you, dont take the plugin.
.css edits (required for the ratings bar) add at the end of your global .css
Kod:
.tbar {
background: #CC0033;
height: 14px;
color: #ffffff;
font-size: 10px;
}
.tbar2 {
background: #999999;
height: 14px;
color: #ffffff;
font-size: 10px;
}
.fancy {
background: #3887BA;
color: #ffffff;
height: 10px;
font-family: Arial;
font-size: 12px;
}
İşlemler bu kadar. Siteye belki okuduğum kitapları tanıttığım bir bölüm eklerim. İyi Forumlar.
»
Son Düzenleme: 03-19-2025, 05:46 PM, Düzenleyen:
Hasan.