MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to stop new replies having the custom thread field? I only want it for the first post.

EDIT: I installed Template Conditionals and used this:

Code:
<if $postcounter == 1 then>
{$GLOBALS['threadfields']['forum_link']}
</if>


It seems to be working, but just wondering if it's ok to use?

It should be OK.
Note that you can use conditionals in the Display Format setting of each custom thread fields.
Also XThreads supports for creating postbit_first_* if you want the first post to be styled in a very different style.
Based on the Display Order of each custom thread fields applied in a forum, you can put the thread fields value to other thread fields that has higher display order.

For example:

Thread Fields 1 (Display Order: 1):
Title: Website Name
Key: wn
Display Format:

Code:
{VALUE}


Thread Fields 2 (Display Order: 2):
Title: Website URL
Key: wurl
Display Format:

HTML Code
<a href="{VALUE}" target="_blank" title="{$GLOBALS['threadfields']['wn']}">{$GLOBALS['threadfields']['wn']}</a>

{VALUE} refers to the Website URL (wurl) and {$GLOBALS['threadfields']['wn']} refers to the Website Name (wn -the value of the first thread field).

Just wanted to thank you guys again for providing all this stuff. I just upgraded my server from PHP 5.3 (I know, it took a while) to 5.5 and am still on MyBB 1.6.8. All I needed to do to get everything working again was download the latest versions of the plugins here and upload them. Smooth! I don't really plan on updating MyBB any time soon, so being able to still use these plugins on older versions and newer alike is like a godsend.
Hi, I created a file field that allows images only, set the following as the Image Thumbnail Generation value:

Code:
88x66|160x120|320x240=scale_max(320,240)->copy(newXTImg()->loadimage('images/playfulland_v3/pixel-logo.png')->scale(120,90),-2,-2)


Files are correctly uploaded to the server with the following names:
file_2_eaecba45_monster_jpg.160x120.thumb
file_2_eaecba45_monster_jpg.320x240.thumb
file_2_eaecba45_monster_jpg.88x66.thumb
file_2_eaecba45_monster_jpg.upload

Though the image link is correctly generated as ./xthreads_attach.php?file=2_1449778966_5258e46e/44833aea44667d56d5969d30c23d6b60/monster.jpg the image is not visible anyways.

I don't believe that is the issue, as at least modifying those values doesn't helps. I did modify the XTHREADS_ATTACH_USE_QUERY value with and without ARCHIVE_QUERY_STRINGS defined and it did not help.
Is it even not displayed by using this direct URL?
(12-11-2015 04:19 PM)Sama34 Wrote: [ -> ]./xthreads_attach.php?file=2_1449778966_5258e46e/44833aea44667d56d5969d30c23d6b60/monster.jpg
It is not. Not either directly accessing any of the other generated links modifying the settings mentioned previously. A blank page is displayed in all cases.
Did you try to rebuild the xtattachments? Does it happen to all XThreads attachments? Match the generated URL to values saved on your xtattachments table.
This is the data in the DB:

Code:
aid	downloads	tid	uid	field		posthash				filename		uploadmime	filesize	attachname				indir		md5hash					uploadtime	updatetime	thumbs	
1		0	228	1	review_cover	901bbe38be5f48fdefb735aee2128a43	review_movie_madmax.jpg	image/jpeg	389597		16b96aa8_review_movie_madmax_jpg.upload	ts_1434/	028b459df8314833b2f2d278662b0920	1434415750	1434415750	a:4:{s:4:"orig";a:3:{s:1:"w";i:1100;s:1:"h";i:1630;s:4:"type";i:2;}s:5:"88x66";a:4:{s:1:"w";d:45;s:1:"h";i:66;s:4:"type";i:2;s:4:"file";s:59:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.88x66.thumb";}s:7:"160x120";a:4:{s:1:"w";d:81;s:1:"h";i:120;s:4:"type";i:2;s:4:"file";s:61:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.160x120.thumb";}s:7:"320x240";a:4:{s:1:"w";d:162;s:1:"h";i:240;s:4:"type";i:2;s:4:"file";s:61:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.320x240.thumb";}}


And this is the full link path:

Code:
./xthreads_attach.php?file=1_1434415750_1b61bce3|028b459df8314833b2f2d278662b0920|review_movie_madmax.jpg


Everything seems correct to me and yes I did rebuild the attachments after every try.

I have two boards, script versions seem to vary so I will try to figure out if this is a script issue.

Reference URL's