Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Book Review System
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #1
Book Review System
Review Forum
With XThreads, we can create all kinds of forums. Here is a set up for a review forum. I used it for books, but you can use it for games or whatever

My set up uses:
4 Custom thread fields
an optional plug in to show latest reviews as images on Portal and Forumdisplay
PHP in Templates / Complex Templates
Thread Tooltip Preview
and
a .css edit.

1. First, we will create a field for the Author:
Create a Custom Thread Field with these settings:

    * Title: Author
    * Key: book_author
    * Description: Name of Author - format is first name followed by Last name. Separate multiple authors with a | character
    * Applicable Forums: 'select a forum '
    * Input Field Type: Textbox
    * Maximum Text Length: 200
      Modify it as you wish. It is the maximum characters for the description.
    * 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
    * Text Mask Filter: ^.*$


2. Now, we will set up a filter for our categories:
Create a Custom Thread Field with these settings:

    * Title: Book Genre
    * Key: bookcat
    * Description: Pick the genre for your book - you can have multiples.
    * Applicable Forums: 'select the forum in point 1'
    * Input Field Type: Checkboxes
    * Values List

Code:
1
2
3
4
5
6
Fiction
NonFiction
Thriller
GeneralFiction
SciFi
Comics

   * Editable by / Required Field?: Everyone (Required)
   * Display Order: 2
      To display the Genre, later, we need put {$GLOBALS['threadfields']['bookcat']} variable into our template.
    * Allow Filtering: Yes
    * Display Format:

Code:
Genre: {VALUE}

    * Multiple Value Delimiter: &nbsp;
    * Formatting Map List:

Code:
1
2
3
4
5
6
Fiction{|}<a href="{$forumurl?}filtertf_bookcat=Fiction"><span style="color: green;">Fiction</span></a>
NonFiction{|}<a href="{$forumurl?}filtertf_bookcat=NonFiction"><span style="color: green;">NonFiction</span></a>
Thriller{|}<a href="{$forumurl?}filtertf_bookcat=Thriller"><span style="color: blue;">Thriller</span></a>	
GeneralFiction{|}<a href="{$forumurl?}filtertf_bookcat=GeneralFiction"><span style="color: blue;">GeneralFiction</span></a>
SciFi{|}<a href="{$forumurl?}filtertf_bookcat=SciFi"><span style="color: blue;">SciFi</span></a>
Comics{|}<a href="{$forumurl?}filtertf_bookcat=Comics"><span style="color: blue;">Comics</span></a>




3. Then, we will create a Reviewers Rating Bar for our book review:
Create a Custom Thread Field with these settings:

    * Title: Reviewers Book Score
    * Key: book_rating
    * Description: Give the book a rating out of 10
    * Applicable Forums: 'select the forum in point 1 or 2'
    * Input Field Type: ListBox
    * Values List

Code:
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10

    * Field Input Width: 40
    * Field Input Height: 1
    * Editable by / Required Field?: Everyone (Required)
    * Display Order: 3
      To display the rating, later, we need put {$GLOBALS['threadfields']['book_rating']} variable into our template.
    * Allow Filtering: Yes
    * Only accept uploaded images: No
    * Blank Replacement Value:

Code:
1
2
3
4
5
6
7
8
9
<tr><td width="100%" align="right" color="white">Book Rating (out of 10)</td>
<td width="1">:</td>
<td>
<div class="tbar2" style="width: 250px;" font-color="white;" align="left";>
<span style="margin-left: 6px;"><strong> No score given</strong></span>
</div>
</td>
</tr>
	

   * Display Format

Code:
1
2
3
4
5
6
7
8
9
<tr><td width="100%" align="right">Book Rating (out of 10)</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

IMPORTANT: You need the .css edits in the code below. Add them at the end of your global css stylesheet

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.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;
}



My thanks to RateU for the original Profile Forum Xthreads example which is where I lifted the above code from Smile

4. Now, we will create a screenshot for our Book Review:
Create a Custom Thread Field with these settings:

   * Title: Book Jacket
   * Key: book_jacket
   * Description: Please post a picture of the book jacket
   * Applicable Forums: 'select the forum in point 1 or 2'
   * Input Field Type: File
   * Valid File Extensions: gif|png|jpg|jpeg
Modify it as you wish.
   * Maximum File Size: 1048576
Modify it as you wish. Like the title says, it is a maximum image file size (in bytes) that can be uploaded.
    * 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:

Code:
{VALUE}


     To display this formatting list, we need put {$GLOBALS['threadfields']['book_jacket']} variable later in our template.



5. Now, XThreads Options in Forum settings (the forum in the settings 1, 2, 3 and 4 above):

    * 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. Create new templates in Global Templates:

    * Template Name: book_forumdisplay
    * Template Content:
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.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<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>&nbsp;</strong></td></tr>
      </table>
    </td>
    <td valign="top">
        {$threadslist}
    </td>
   </tr>
</table>	
        {$footer}
</body>
</html>


    * Template Name: book_forumdisplay_threadlist
    * Template Content:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<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}&amp;filtertf_bookcat=Fiction"><span><strong>Fiction</strong></span></a></td></tr>
				<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&amp;filtertf_bookcat=NonFiction"><span><strong>NonFiction</strong></span></a></td></tr>
				<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&amp;filtertf_bookcat=GeneralFiction"><span><strong>General Fiction</strong></span></a></td></tr>			
				<tr><td class="trow2"><a href="forumdisplay.php?fid={$fid}&amp;filtertf_bookcat=Comics"><span><strong>Comics</strong></span></a></td></tr>
				<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&amp;filtertf_bookcat=SciFi"><span><strong>Science Fiction</strong></span></a></td></tr>
				<tr><td class="trow1"><a href="forumdisplay.php?fid={$fid}&amp;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:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<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.

Code:
<img src="{$mybb->settings['bburl']}/images/avatars/guestfish.gif" class="miniav" width="45" height="45" alt="guest" />


Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{$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:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{$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:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<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&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;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>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</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>
&nbsp;              </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&amp;tid={$tid}&amp;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:

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

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.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;
}

Screenshots:

1. User creates a thread:

   

2. User views the post:

   

3. Thread List:

   

Or you can view it on a live forum: http://www.leefish.nl/mybb/forumdisplay.php?fid=16



Attached File(s)
.rar  extra content.rar (Size: 36.38 KB / Downloads: 459)


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 05-04-2012 10:30 AM by leefish.)
07-05-2010 01:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Book Review System
Great, Lee Smile Thanks for sharing.

If I'm allowed to give some suggestion, I think we should remove the first css closing tags (" } ") in the custom css. So, the css will be like this:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.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;
}


Sorry if I'm wrong Biggrin


(This post was last modified: 07-05-2010 07:51 AM by RateU.)
07-05-2010 07:50 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Book Review System
Oh yes, thanks for that RateU. I shall edit the post Smile

Thank you for the plugin BTW, that little gallery really makes the review forum POP.


[Image: leelink.gif]
MYBB1.6 & XThreads
07-05-2010 08:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Book Review System
May I know what option you choose for displaying the Books Review in that plugin, Lee? Do you choose All Pages?
Ah, yes, for book_forumdisplay_threadlist template, I think we need to use new filtering url, Lee, some thing like this:

HTML Code
<a href="{$forumurl_q}filtertf_key=Option">Option</a>


That is a new feature from XThreads.

Example:

HTML Code
<a href="{$forumurl_q}filtertf_bookcat=Fiction"><span><strong>Fiction</strong></span></a>


07-05-2010 08:31 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #5
RE: Book Review System
I guess we could, but in the post from ZB he did say that the "old" stuff still worked - which it does. Its certainly an option though Smile

For the book review plug in I chose all pages - this means that I can also display on the portal ... very handy plug in indeed.

Speaking of portal, did you see my post over in Xthreads? I am trying to get a portal announcement to show using the image from the post...no luck so far.


[Image: leelink.gif]
MYBB1.6 & XThreads
07-05-2010 08:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Book Review System
(07-05-2010 08:43 AM)leefish Wrote:  For the book review plug in I chose all pages

I suggest to recode the plugin if you want to display it in portal and forumdisplay only, Lee. Choosing All Pages means the query will be loaded in all page (there is one query in this plugin). You can make it custom.

(07-05-2010 08:43 AM)leefish Wrote:  Speaking of portal, did you see my post over in Xthreads? I am trying to get a portal announcement to show using the image from the post...no luck so far.

Me too Biggrin I don't know what variable we should use to display it.

07-05-2010 08:59 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #7
RE: Book Review System
(07-05-2010 08:59 AM)RateU Wrote:  I suggest to recode the plugin if you want to display it in portal and forumdisplay only, Lee. Choosing All Pages means the query will be loaded in all page (there is one query in this plugin). You can make it custom.

Hmm, I looked in the plug in, the options are portal, portal index, index or global. I do have an alternative file, but its not as neatly integrated into the header.  I can just remove the file though, or warn users that it causes the queries. My intention was to share the thing I had, which I have done, as a thanks to you guys here on mybbhacks for all the help you have given me so far.

I don't really want to spend a lot of time tweaking this - I have other priorities on my forum -  I have to make all the none mybb related sims stuff too. That takes a lot of my time and my users want sims stuff, not mybb plugins Biggrin

I hope you understand Smile


[Image: leelink.gif]
MYBB1.6 & XThreads
07-05-2010 09:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Book Review System
Ah, yes. I can understand (I think Biggrin)

(This post was last modified: 07-05-2010 09:54 AM by RateU.)
07-05-2010 09:51 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #9
RE: Book Review System
That looks nice leefish, thanks for sharing Smile

My Blog
07-05-2010 01:12 PM
Find all posts by this user Quote this message in a reply
sanjananb Offline
Junior Member
**
Posts: 5
Joined: Feb 2011
Post: #10
RE: Book Review System
i love this book review system...can you create this as a mybb mod...then we can download as 1 folder...i dont know much about coding...i love mybb
02-16-2011 03:50 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: