MyBB Hacks

Full Version: [XThreads] Thread Link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well, I'd like to use XThreads to create threads that link to websites and stuff, with no extras like the Link Directory tutorial has.

Basically, I'd like it to work like this plugin does.
If what you want is exactly what that plugin gives, why not use it?

Otherwise, it's just a matter of making a thread field and editing your template to use the value of the thread field as a link.
Well the problem is that plugin is broken, so I can't use it xD.

And I'm not sure how to do that :/
And with your detailed explanation of the issues you're having, I'm not sure how to help you :/
Alright, basically I'd like a guide written up on how to add the ability to make threads link to something else, using XThreads. Then the guide could be added to the XThreads Example Applications list for other lazy people like me Biggrin

Or I could just take apart the link directory, find out how to remove the redirect, and make my own. But I think that guide would help people.

  1. Create a new thread field that requires a optional http url with key 'thread_link'.
  2. Add something like this to your showthread template (using template conditionals):

    HTML Code
    <if $mybb->usergroup['cancp'] != '1' then>
    <meta http-equiv="refresh" content="0; url={$threadfields['thread_link']}">
    </if>



Maybe there is a better way to do it tough...
(12-11-2011 05:13 AM)Sama34 Wrote: [ -> ]
  1. Create a new thread field that requires a optional http url with key 'thread_link'.
  2. Add something like this to your showthread template (using template conditionals):

    HTML Code
    <if $mybb->usergroup['cancp'] != '1' then>
    <meta http-equiv="refresh" content="0; url={$threadfields['thread_link']}">
    </if>



Maybe there is a better way to do it tough...

It just results in the thread refreshing over and over.
Edit your forumdisplay_thread template (I don't know whether you need a template prefix or not). Replace the {$thread['threadlink']} with {$GLOBALS['threadfields']['thread_link']}.

Edit your thread_link custom fields. Put {$GLOBALS['threadurl']} in the Blank Replacement Value (I don't know whether you want it a required field or not).
Select some usergroups in the Viewable by Usergroups setting (exclude Administrator). And put the {$GLOBALS['threadurl']} variable in the Unviewable Value setting.
RateU's method sounds better, mine was just a quick way I found after I drop the plugin you mentioned.
(12-10-2011 04:02 PM)lucasbytegenius Wrote: [ -> ]for other lazy people like me Biggrin

Or I could just take apart the link directory, find out how to remove the redirect, and make my own. But I think that guide would help people.
Just FYI, I don't give two sh**s about lazy people.
Pages: 1 2
Reference URL's