XThreads
Author Message
My Spiel
XThreads is one of my larger plugins which I have been working on for a while.  Originally planned to release it inline with MyBB 1.6, but who knows when that'll be out.  It perhaps doesn't include everything I wanted it to, but does have most of the things (plus I want to move onto other projects).

What does it do?
Take a look at RateU's forum for some nice ideas of what it can do.  I also have some more basic examples here of what can be done with XThreads.  I'm pretty sure there are many other applications of this plugin, but those examples just give you some simple ideas.

The basic idea is giving you the ability to define custom fields for your threads, and providing methods to give you a lot of flexibility with customising forums.

Warning: I'm not going to bother with "beta" labels and so on.  I've done some testing on this myself, but it's by no means extensive.  Use this at your own risk.

Installation Instructions: standard installation procedures apply - you can find them in the announcement here.
You may need to CHMOD the uploads/xthreads_ul/ folder to 0777 after uploading the files (probably won't though).

Upgrade Instructions: unless stated otherwise, the general procedure for upgrades is to simply upload the new files, then visit your AdminCP.  In there, you'll be presented with a notice to run the upgrade - just follow what it says from there on.

Usage Instructions: this is a complex plugin, and unfortunately, you're probably going to have to figure this out yourself, depending on what you want to achieve with this plugin.  HTML and CSS knowledge is strongly recommended; you should also be familiar with MyBB's template system.  Some demonstrations can be found here - hopefully these will give you a good idea of how things work.  I suggest looking at the thread descriptions example, as this is fairly easy to understand (IMO).  If you can understand how everything works, there, perhaps try out the gallery example.

Known conflicting plugins
- MyPlaza Turbo -
If you are using MyPlaza Turbo, note that the author decided to use a particularly odd method to implement certain functionality, practically destroying compatibility with any plugin which hooks into the forum add/edit routines.  I've included a patch to address this issue - you need to replace inc/myplaza/myplaza_admin_plugin.php with the following file (it's unlikely that this will be committed as the author has decided to discontinue development)

.php  myplaza_admin_plugin.php (Size: 56.27 KB / Downloads: 2410)

- PL9 Forum Icons -
Affects certain functionality.  See here for a solution.

- PHP in Templates, v1.4 or older -
Similar to PL9 Forum Icons - solution is just to update to the latest version.

- MyAdvertisements - (update: older versions only, later versions may not conflict)
Affects some thread functionality, see here for a solution.

- Group Post CSS -
See here http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=378&pid=59

All bug reports, suggestions, criticisms are appreciated (though I may not always implement suggestions) so please feel free to post them.
If you find this plugin useful, I would be grateful if you could give some token of appreciation for the work that has gone into this, and perhaps post some example usages you've come up with in the XThreads forum to help others get an idea of what can be achieve with this plugin (and for my own interest's sake Tongue).


Github: https://github.com/zingaburga/XThreads-MyBB-Plugin
Note: do NOT use the Github version, unless you know what you're doing
Changelogs: v1.10, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.30, v1.31, v1.32, v1.337, v1.40, v1.41, v1.42, v1.43, v1.44, v1.45, v1.46, v1.47, v1.50, v1.51, v1.52, v1.53, v1.60, v1.61, v1.62, v1.63, v1.64, v1.65, v1.66, v1.67, v1.68
(This post was last modified: 12-25-2015 12:46 PM by ZiNgA BuRgA.)
Find all posts by this user
Quote this message in a reply
Download: xthreads-1.68.7z (114.53 KB)
Plugin Version: 1.68
Last Updated: 12-25-2015, 12:46 PM

Downloads: 8,437
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
MrBrechreiz Offline
Member
***
Posts: 69
Joined: May 2012
Post: #611
RE: XThreads
have you uploaded all the files in the correct folder and replaced? -->activated?
11-19-2012 08:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #612
RE: XThreads
yes...i had uploaded through plugin uploader and also activated.
11-19-2012 08:47 PM
Find all posts by this user Quote this message in a reply
MrBrechreiz Offline
Member
***
Posts: 69
Joined: May 2012
Post: #613
RE: XThreads
may be that you have no choice than to reinstall it
11-19-2012 08:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #614
RE: XThreads
You clearly don't read anything do you?
Upgrade instructions are bolded in the first post and you refuse to read it.

Although I suspect you've done something odd, I am somewhat interested in how you managed to cause XThreads to give that error.  Please post your cache/xthreads_evalcache.php file.

My Blog
11-19-2012 09:44 PM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #615
RE: XThreads
its here.

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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php /* this file caches preparsed versions of display formats - please do not modify this file */

		function xthreads_evalcache_timg($field, $vars=array()) {
			switch($field) {
				case 'dispformat': return "<a href=\"{$GLOBALS['threadurl']}\" target=\"_blank\"><img src=\"{$vars['URL']}/thumb75x75\" alt=\"{$vars['FILENAME']}\" title=\"Click to view this thread image in full size - {$GLOBALS['GLOBALS']['threadfields']['timg']['dims']['w']} x {$GLOBALS['GLOBALS']['threadfields']['timg']['dims']['h']}\" style=\"margin: 3px; float: left;\" /></a>";
			} return '';
		}
		function xthreads_evalcache_fupload($field, $vars=array()) {
			switch($field) {
				case 'unviewableval': return "<em>You don't have permission to download this file</em>";
				case 'dispformat': return "".(($GLOBALS['mybb']->user['postnum'] < 100)?"
<em>You need at least valuable 100 posts in forum to download this file</em>
":"
<form action=\"{$vars['URL']}\" method=\"get\">
<input type=\"submit\" value=\"{$vars['FILENAME']}\" />
</form>
")."";
			} return '';
		}
		function xthreads_evalcache_fdesc($field, $vars=array()) {
			switch($field) {
				case 'dispformat': return "{$vars['VALUE']}";
			} return '';
		}
		function xthreads_evalcache_fscr($field, $vars=array()) {
			switch($field) {
				case 'dispformat': return "<a href=\"{$GLOBALS['URL']}\">{$vars['FILENAME']}</a>";
			} return '';
		}
		function xthreads_evalcache_fcat($field, $vars=array()) {
			switch($field) {
				case 'dispformat': return "{$vars['VALUE']}";
			} return '';
		}
		function xthreads_evalcacheForums($fid) {
			switch($fid) {
				case 208: return array(
					'tplprefix' => array_map('trim', explode(',', "download")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
				case 29: return array(
					'tplprefix' => array_map('trim', explode(',', "dld_")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
				case 76: return array(
					'tplprefix' => array_map('trim', explode(',', "dld_")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
				case 70: return array(
					'tplprefix' => array_map('trim', explode(',', "dld_")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
				case 135: return array(
					'tplprefix' => array_map('trim', explode(',', "dld_")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
				case 209: return array(
					'tplprefix' => array_map('trim', explode(',', "dld_")),
					'langprefix' => '',
					'settingoverrides' => '',
				);
			} return array('tplprefix' => '', 'langprefix' => '', 'settingoverrides' => '');
		}
		
		function xthreads_evalcacheForumFilters($fid) {
			switch($fid) {
			} return array('defaultfilter_tf' => array(), 'defaultfilter_xt' => array());
		}
		function xthreads_input_generate_defhtml_0($field, &$vars) {
			return "<input type=\"text\" class=\"textbox\"{$vars['NAME_PROP']}{$vars['MAXLEN_PROP']}{$vars['WIDTH_PROP_SIZE']}{$vars['TABINDEX_PROP']}{$vars['REQUIRED_PROP']} value=\"{$vars['VALUE']}\" />";
		}
		function xthreads_input_generate_defhtml_1($field, &$vars) {
			return "<textarea{$vars['NAME_PROP']}{$vars['MAXLEN_PROP']}{$vars['HEIGHT_PROP_ROWS']}{$vars['WIDTH_PROP_COLS']}{$vars['TABINDEX_PROP']}{$vars['REQUIRED_PROP']}>{$vars['VALUE']}</textarea>";
		}
		function xthreads_input_generate_defhtml_2($field, &$vars) {
			if($field == 'formhtml_item')
				return "<option value=\"{$vars['VALUE']}\"{$vars['STYLE']}{$vars['SELECTED']}>{$vars['LABEL']}</option>";
			else
				return "<select style=\"{$vars['WIDTH_CSS']}\"{$vars['NAME_PROP']}{$vars['MULTIPLE_PROP']}{$vars['HEIGHT_PROP_SIZE']}{$vars['TABINDEX_PROP']}>
	{$vars['ITEMS']}
</select>";
		}
		function xthreads_input_generate_defhtml_3($field, &$vars) {
			if($field == 'formhtml_item')
				return "<label style=\"display: block;\"><input{$vars['NAME_PROP']} type=\"radio\" class=\"radio\" value=\"{$vars['VALUE']}\"{$vars['CHECKED']}{$vars['TABINDEX_PROP']} />{$vars['LABEL']}</label>";
			else
				return "{$vars['ITEMS']}";
		}
		function xthreads_input_generate_defhtml_4($field, &$vars) {
			if($field == 'formhtml_item')
				return "<label style=\"display: block;\"><input{$vars['NAME_PROP']} type=\"checkbox\" class=\"checkbox\" value=\"{$vars['VALUE']}\"{$vars['CHECKED']}{$vars['TABINDEX_PROP']} />{$vars['LABEL']}</label>";
			else
				return "{$vars['ITEMS']}";
		}
		function xthreads_input_generate_defhtml_5($field, &$vars) {
			if($field == 'formhtml_item')
				return "
	<![if gte IE 7]><div class=\"xta_file\" style=\"clear: both;\"><![endif]>
	<!--[if lt IE 7]><tr class=\"xta_file\"><![endif]-->
		<!--[if lt IE 7]><td><![endif]-->
		<div class=\"xta_file_link\"{$vars['ATTACH_MD5_TITLE']} style=\"padding-right: 6em;\"><input type=\"hidden\" name=\"xtaorder[]\" value=\"{$vars['ATTACH']['aid']}\" /><a href=\"{$vars['ATTACH']['url']}\" target=\"_blank\">{$vars['ATTACH']['filename']}</a> ({$vars['ATTACH']['filesize_friendly']})</div>
		<!--[if lt IE 7]></td><td><![endif]-->
		<![if gte IE 7]><span style=\"float: right; margin-top: -1.5em;\"><![endif]>
		<label class=\"xtarm_label\"".((("".$vars['REQUIRED']."") and !("".$vars['MULTIPLE'].""))?" style=\"display: none;\"":"")."><input type=\"checkbox\" class=\"xtarm\" name=\"xtarm_{$vars['KEY']}".((("".$vars['MULTIPLE'].""))?"[{$vars['ATTACH']['aid']}]":"")."\"".((!("".$vars['MULTIPLE'].""))?" data=\"xtarow_{$vars['KEY']}\"":"")." value=\"1\"{$vars['REMOVE_CHECKED']} />".((("".$vars['REQUIRED']."") and !("".$vars['MULTIPLE'].""))?"{$GLOBALS['lang']->xthreads_replaceattach}":"{$GLOBALS['lang']->xthreads_rmattach}")."</label>
		<![if gte IE 7]></span><![endif]>
		<!--[if lt IE 7]></td><![endif]-->
	<![if gte IE 7]></div><![endif]>
	<!--[if lt IE 7]></tr><![endif]-->
";
			else
				return "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
	<!--[if lt IE 7]><tbody class=\"xta_file_list\"><![endif]-->
	<![if gte IE 7]><tr><td class=\"xta_file_list\"><![endif]>
{$vars['ITEMS']}
	<![if gte IE 7]></td></tr><![endif]>
	<!--[if lt IE 7]></tbody><![endif]-->
</table>
<div id=\"xtarow_{$vars['KEY']}\" class=\"xta_input\">
	".((XTHREADS_ALLOW_URL_FETCH)?"
		".((!("".$vars['MULTIPLE'].""))?"
			<div class=\"xtasel\" style=\"display: none; font-size: x-small;\"><label style=\"margin: 0 0.6em;\"><input type=\"radio\" class=\"xtasel_opt\" name=\"xtasel_{$vars['KEY']}\" value=\"file\"{$vars['CHECKED_UPLOAD']} />{$GLOBALS['lang']->xthreads_attachfile}</label><label style=\"margin: 0 0.6em;\"><input type=\"radio\" class=\"xtasel_opt\" name=\"xtasel_{$vars['KEY']}\" value=\"url\"{$vars['CHECKED_URL']} />{$GLOBALS['lang']->xthreads_attachurl}</label></div>
		":"")."
		<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\"><tr class=\"xta_input_file_row\">
			<td class=\"xtasel_label\" style=\"vertical-align: top;\">{$GLOBALS['lang_xthreads_attachfile']}: </td>
			<td>
	":"")."
		".((("".$vars['MAXSIZE'].""))?"<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$vars['MAXSIZE']}\" />":"")."
			<div class=\"xta_input_file_container\"><div class=\"xta_input_file_wrapper\">
				<input type=\"file\" class=\"fileupload xta_input_file\"{$vars['NAME_PROP']}{$vars['WIDTH_PROP_SIZE']}{$vars['TABINDEX_PROP']}{$vars['MULTIPLE_PROP']}{$vars['ACCEPT_PROP']} /><input type=\"button\" class=\"button xta_input_file_clr\" value=\"{$GLOBALS['lang']->file_clear}\" style=\"display: none;\" />
			</div></div>
		".((("".$vars['MAXSIZE'].""))?"<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"0\" />":"")."
	".((XTHREADS_ALLOW_URL_FETCH)?"
			</td>
		</tr>
		<tr class=\"xta_input_url_row\">
			<td class=\"xtasel_label\" style=\"vertical-align: top;\">{$GLOBALS['lang_xthreads_attachurl']}: </td>
			<td>
				".((("".$vars['MULTIPLE'].""))?"<textarea name=\"xtaurl_{$vars['KEY']}\"{$vars['WIDTH_PROP_COLS']} rows=\"3\" class=\"xta_input_url\">{$vars['VALUE_URL']}</textarea>":"<input type=\"url\" class=\"textbox xta_input_url\" name=\"xtaurl_{$vars['KEY']}\"{$vars['WIDTH_PROP_SIZE']} value=\"{$vars['VALUE_URL']}\" />")."
			</td>
		</tr></table>
	":"")."
</div>
".((!$GLOBALS['tplvars']['xta_js_dragdrop_added'] and ("".$vars['MULTIPLE'].""))?"
	<script type=\"text/javascript\" src=\"{$GLOBALS['mybb']->settings['bburl']}/jscripts/scriptaculous.js?load=effects,dragdrop\"></script>
	".(($GLOBALS["tplvars"]["xta_js_dragdrop_added"] = (1))?"":"")."
":"")."
".((!$GLOBALS['tplvars']['xta_js_added'] and (("".$vars['ATTACH']['aid']."") or XTHREADS_ALLOW_URL_FETCH or ("".$vars['MULTIPLE']."")))?"
	<script type=\"text/javascript\" src=\"{$GLOBALS['mybb']->settings['bburl']}/jscripts/xthreads_attach_input.js\"></script>
	".(($GLOBALS["tplvars"]["xta_js_added"] = (1))?"":"")."
":"")."
";
		}

please bro help....


WAITING FOR YOUR REPLY DEAR ZINGA.
OTHERWISE I HAVE TO REINSTALL IT FOR TRY.
It open threads post normally if u go through last post but threrad list not shown and also new thread creation also not working.
check this link...its work when separate thread opened.
http://medishared.org/showthread.php?tid...http://medishared.org/showthread.php?tid=134&actio


but when go to xthread download than give that error.
http://medishared.org/forumdisplay.php?fid=209
(This post was last modified: 11-19-2012 11:21 PM by WINBOY.)
11-19-2012 11:01 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #616
RE: XThreads
Okay, that's arguably my fault.  Thanks for the file.

Updated to v1.61:
- Fix backwards compatibility with Display Format referencing itself via $threadfields[...] for file fields (thanks for WINBOY for finding)

My Blog
(This post was last modified: 11-20-2012 07:38 PM by ZiNgA BuRgA.)
11-19-2012 11:33 PM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #617
RE: XThreads
(11-19-2012 11:33 PM)ZiNgA BuRgA Wrote:  Okay, that's arguably my fault.  Thanks for the file.

Updated to v1.61:
- Fix backwards compatibility with Display Format referencing itself via $threadfields[...] for file fields

WOW...Thanks bro.
You r genius.
11-20-2012 12:04 AM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #618
RE: XThreads
There is problem while thread making as i have to fill all fields to post thread otherwise page is not loaded.if i not upload one of the image/ file upload field posting of thread in not occuring.
pls fix it.
what is meaning of "Allow multiple values for this field" in file upload custom thread field.??
can i upload more than one file in new thread with allowing multiple value???
(This post was last modified: 11-20-2012 12:52 AM by WINBOY.)
11-20-2012 12:44 AM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #619
RE: XThreads
Revertback to 1.53.....
sorry zinga.
1.61 creating above problems.
11-20-2012 04:03 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #620
RE: XThreads
(11-20-2012 12:44 AM)WINBOY Wrote:  There is problem while thread making as i have to fill all fields to post thread otherwise page is not loaded.if i not upload one of the image/ file upload field posting of thread in not occuring.
Riiiiight.
So I presume you haven't set the field to be required, and no error message displays?

Also, I'm not here 24/7 waiting for you to post your problems so please stop acting like an ass.  I don't fucking owe you anything.

My Blog
11-20-2012 08:10 AM
Find all posts by this user Quote this message in a reply


Forum Jump: