MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just checked and initally the folder was chmod 755, so I went ahead and set it to 777 and tried again. The file uploaded fine and it's nestled in its folder. Am I allowed to insert the address here? I can show you what I'm looking at (I'll post screenshots in the meantime). See attachments
It is OK to insert the address here.
http://test.violentricity.com/index.php

I made a test user account:
user/password: testuser/testuser1
You probably already checked this I guess, but do you have that thumbnail size (320x240) defined in your custom thread field settings?

Hmm, I uploaded a pic, indeed, full link to image gives a deformed string, thumbs show no pic. I DID manage to upload a pic using the mybb attachments though, and that showed. So your board CAN show pics... how is the htaccess set for mybb attachment uploads?
Can you try this?
Open up cache/xthreads.php and add the following line to the bottom:

PHP Code:
define('ARCHIVE_QUERY_STRINGS', 1);


See if that helps.

(01-23-2011 10:11 AM)ZiNgA BuRgA Wrote: [ -> ]Can you try this?
Open up cache/xthreads.php and add the following line to the bottom:

PHP Code:
define('ARCHIVE_QUERY_STRINGS', 1);


See if that helps.


Zinga, you are the stuff!!! That definitely fixed the problem and the photos are showing up fine now. Thank you greatly for your help! Yipi
Updated to v1.40:
  • fix $forumurl variable being wrong in some cases on forumdisplay threads
  • add changes in v1.4 of the Template Conditionals plugin; note that the two added functions are named 'xthreads_phptpl_eval_expr' and 'xthreads_phptpl_eval_text' (to avoid conflicting with Template Conditionals plugin).  Note that these functions auto-global variables, whereas the ones in Template Conditionals doesn't
  • slightly more liberal with variable parsing
  • fix variable parsing with conditionals around single quoted strings
  • fix some sanitisation stuff with PHP expressions - thanks for RateU for finding
  • fix bug preventing xtattachment flood checking from working
  • add in MyBB's PHP max upload size warnings to edit thread fields when file input type is selected
  • also allow shorthand size inputs for file max size (eg '2m'); these are converted internally so it's a little "dirty" in that editing them will show the byte value
  • fix sanitize method with select/radio/checkbox inputs
  • add ability to change underlying datatype for thread fields; you probably shouldn't change it from the default "text" though, unless you have some specific reason for doing so
  • fix ampersands in xtattach filenames (thanks to leefish for reporting)
  • improve checking for bad text masks in ACP
  • add ability to sort by thread fields in forumdisplay.  This reuses MyBB's sorting system - just that the URL parameter is a little different.
    To sort by a thread field, prefix its key with 'tf_', for example, forumdisplay.php?fid=2&sortby=tf_myfield will sort the threads by 'myfield'.  File input fields are a bit different, they need to be prefixed with 'tfa_component_' where 'component' is either filename, filesize, uploadtime, updatetime or downloads.
    Although XThreads adds this ability transparently (and to the list of default sort bys in the AdminCP), it is up to you to add appropriate options to the forumdisplay sorter listbox, if you want to.
    As this uses MyBB's system, template variables will be the same, eg {$sortsel['tf_myfield']} will be selected="selected" if sorting by myfield.
    Note that this is not indexed, like MyBB's sorting options aren't.
  • following on from above, add more sorting fields: prefix, icon, lastposter, numratings and attachmentcount - these are added to the forumdisplay sorter
  • add ability to have language file prefixes on a per forum basis; these support variables/conditionals
  • add ability to have a default forumdisplay filter if no filter has been defined in the URL; variables and conditionals supported here
  • remove "additional forum filters" option (the filterxt_uid etc stuff) - these are now always enabled
  • add support for modifying custom thread fields using custom moderator tools; note that values here are NOT validated and permissions are NOT checked!
  • fix bug with some non-existent threadfields not being handled properly (thanks to RateU for pointing out the bug)
  • add $threadfields_x template variable - this is like the $threadfields[...] variable, but provides some other stuff.  The syntax is $threadfields_x['key']['valuename'] where valuename is one of the following:
    • title: displays the title given to the thread field
    • desc: displays the description given to the thread field
    • num_values: displays number of values in the field; will always be 1 for non-multivalue field or 0 if there's no value in the field
    • num_values_friendly: formatted version of above
    • value: just a reference back to the $threadfields['key'] array; only different for multivalued fields, where it's an array containing the individual values
  • ACP JS editor for "open fields", such as formatting map
  • support for variables and conditionals in template prefix
  • support for variables/conditionals in thread fields' default value
  • fix up admin logs text
  • fix bug with search pagination - thanks to RocketFoot for finding
  • escape sequence for newline in Format Map - the new editor implements it so you don't need to worry much about it
  • filtering and sorting by a threadfield is now disallowed if the current user is not listed in the list of 'viewable usergroups'
  • fix bgcolor bug with Hide Forum option (thanks to RocketFoot for reporting)
  • add a URI entry to list of Text Masks; also fix issue with the Text Mask listbox not responding to keyboard events
  • add support for PHP's MAX_FILE_SIZE feature

Note that this release changes some templates (forumdisplay_threadlist and forumdisplay_threadlist_sortrating) which the upgrader will automatically edit.
If you wish to patch templates manually (ie custom variants of these), follow these instructions:
forumdisplay_threadlist
Find:

HTML Code
<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>

Add before:

HTML Code
{$sort_by_prefix}

Find:

HTML Code
<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>

Add after:

HTML Code
					<option value="icon" {$sortsel['icon']}>{$lang->sort_by_icon}</option>
					<option value="lastposter" {$sortsel['lastposter']}>{$lang->sort_by_lastposter}</option>
					<option value="attachmentcount" {$sortsel['attachmentcount']}>{$lang->sort_by_attachmentcount}</option>
					{$xthreads_extra_sorting}

forumdisplay_threadlist_sortrating
At the very end, add:

HTML Code
<option value="numratings" {$sortsel['numratings']}>{$lang->sort_by_numratings}</option>


Note that these template edits are pretty much optional (if you don't do them, the new sorting options just won't appear in the forumdisplay page).

Thank you very much for the update, Yumi Smile
Wow, many features added.
Nice list, this one really jumped out at me:
...support for variables/conditionals in thread fields' default value
Thanks for the big update.  Smile
Excellent!  I'm going to upgrade now!

Will the upgrade effect any existing xthread forums?
Reference URL's