MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Its indeed awesome - I am now trying to get my image to show in my portal announcement..... :/

ZingaBurga Wrote:add portal support - you can now call {$threadfields...} from portal templates, and portal_announcement* templates will be affected if template prefixes are used (thanks to leefish for the suggestion)

But how???

I have a book_portal_announcement template, I know its being pulled to the forum (I put daft words in it to check - yup, it was the template) but I can't get my image to show.

Here is my code....

Code:
<table cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>{$icon}<a href="{$mybb->settings['bburl']}/showthread.php?tid={$announcement['tid']}">{$announcement['subject']}</a></strong></td>
</tr>
<tr>
<td class="tcat" align="right">
<span class="smalltext">{$lang->posted_by} <a href="{$mybb->settings['bburl']}/member.php?action=profile&amp;uid={$announcement['uid']}">{$announcement['username']}</a>  - {$anndate} {$anntime} {$numcomments}</span>
</td>
</tr>
<tr>
<td class="fancy" colspan="5"><span class="smalltext"></span></td>
</tr>
<tr>
<td class="trow1">
<table border="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr><td class="trow1"><p>{$message}</p><img src="{$GLOBALS['threadfields']['book_jacket']['url']}/thumb160x120" alt="gahhhh" /></td></tr>
<tr><td align="right" colspan="2" valign="bottom"><span class="smalltext"><a href="{$mybb->settings['bburl']}/printthread.php?tid={$announcement['tid']}"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/printable.gif" alt="" /></a>&nbsp;<a href="{$mybb->settings['bburl']}/sendthread.php?tid={$announcement['tid']}"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/send.gif" alt="" /></a></span></td></tr>
</table>
</td>
</tr>
</table>
<br />


Any help appreciated

Brr, I tested it against a MyBB 1.6 codebase, but didn't expect it to fail with 1.4.

Updated to v1.24:
  • fix bug which prevented portal integration from working on MyBB 1.4 (thanks to leefish for the find)
  • fix bug which caused the contents of a thread's first post if blank posts were allowed, and a moderator edited the title using inline title editing (thanks RateU)
Muwhahahaha......Xthreads images in announcements showing on the portal. Truly awesome.
I discovered what I think is an incompatibility issue with X threads and DennisTs RSS2Post plugin. (link to plugin - http://mods.mybboard.net/view/rss-to-post )

I am not getting my RSS feeds in my forum. I also tried the RSS post feed from http://www.mybbhacks.com , it also did not pull the RSS feeds.

I looked in the error log of the RSS2Post plugin and see the excerpt below:

Code:
Date: Tue, 06 Jul 2010 23:07:40 +0000
URL: http://mods.mybboard.net/syndication/latest-submissions
Forum ID: 20
User ID: 1
Strip HTML: 0
array(4) {
  ["title"]=>
  string(26) "Plugin: MyTwitter - 1.0 r1"
  ["link"]=>
  string(39) "http://mods.mybboard.net/view/mytwitter"
  ["description"]=>
  string(86) "This plugin allow you forum to update your twitter status when a new thread is posted."
  ["guid"]=>
  string(39) "http://mods.mybboard.net/view/mytwitter"
}
array(13) {
  [0]=>
  array(2) {
    ["error_code"]=>
    string(20) "threadfield_required"
    ["data"]=>
    string(9) "Game Type"
  }
  [1]=>
  array(2) {
    ["error_code"]=>
    string(20) "threadfield_required"
    ["data"]=>
    string(9) "Find Name"
  }
  [2]=>
  array(2) {
    ["error_code"]=>
    string(20) "threadfield_required"
    ["data"]=>
    string(5) "Image"
  }


Those are my xthreads fields that it is asking for. The forum I am trying to post to has no Xthreads functionality enabled. Of course, I want X-threads more than RSS plugins (I can always use a feeder and manually post) but I thought I should report it.

I haven't looked at this much, but from your log, it appears that XThreads is requiring certain stuff to be filled out, whereas the RSS posters obviously can't fill them out (because they aren't designed to).
This isn't an incompatibility, rather, you can't require certain fields to be filled out when the script can't do it.

The solution is to probably set those fields to not be required.
Its not a big deal, like I said, but maybe I was not clear. The destination forum for those RSS feeds has no Xthreads prefix. The required fields in the log are all my custom thread fields (for different forums on the board) with status required. But that means in order to get RSSto Post to work then I cant have any Xthreads with status required in other forums on my board. That would "break" my Xthreads in that I can no longer "force" my users to fill in fields.

I shall test by setting all my Xthreads to status not required Erf
Oh I see.
Sorry, I kinda have to go now, but can you see if this fixes it?  Replace your inc/xthreads/xt_updatehooks.php with this one.

Thanks
Yay it worked - thank you, now I can have RSS feeds and Xthreads.
Cool, thanks for testing Smile
Thanks zinga, I haven't upgraded to 1.2, can I upgrade directly to the latest version?
Reference URL's