MyBB Hacks

Full Version: Thread Prefix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(04-09-2011 03:56 AM)duhol Wrote: [ -> ]Can I create selectbox in index? I know that filtering is OK, but it's limited to one forum, isn't it? How to make that the results of chosen "prefix 1" in selectbox was from fid=4, and fid=5, and fid=9 for example?

Do you mean by the 'index' is index.php?
I think we can't do that (only my personal opinion).
The best person to answer the question is Yumi/ZiNgA. I think you need to wait Yumi to reply.
XThreads doesn't support searching at the moment (there's some difficulty with fields which may not be enabled across all forums).
MyBB's thread prefix system can be searched.

Interestingly, it appears that the list doesn't filter out prefixes only applicable to hidden forums (there is some permissions filtering, but one would think that it's a bit whack since it just filters out what the current user can't set, not what they can see).
http://community.mybb.com/search.php - don't recall seeing [recruitment] [status] or [away] appearing - wonder if it's used in some staff forum lol...
I have a question on how I can "add" two prefixes together to filter on two prefixes.

For example, I have a custom threadfield, Prefix. There are two options - "prefix1" and "prefix2". I have another custom threadfield, Category, with three options, "build", "buy" and "CAS". How would I make a filter url that would pick up only the category "buy" that also had the prefix "prefix1"? I hope to use this in my forumdisplay_threadlist and in this application
Maybe something like this (the URL):

HTML Code
filtertf_key1=value_of_key1&filtertf_key2=value_of_key2

Excellent - that works perfectly - Thank you very much RateU.
If there are to many possibilities of values to be selected, you can try to create a filter form to make it more flexible for users to select the prefix and the category.

You can take a look at the forumdisplay_searchforum_inline template in trading forum example application as an example.

Or, if it's a plain text link, you can try to use the {$filters_set['my_thread_field']['urlarga']} things of variable.
(07-20-2011 08:51 AM)RateU Wrote: [ -> ]Or, if it's a plain text link, you can try to use the {$filters_set['my_thread_field']['urlarga']} things of variable.

Thats a good tip - thank you RateU. What do you mean by the [urlarga] variable? Is there an xthreads example that uses this?
We can read the explanation for those kinds of XThreads variables in the XThreads Documentation from XThreads package.

Or, we can read this update post:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=288&pid=30

We have a XThreads example application that uses that kinds of variable. You can take a look at Music Gallery example application, in msc_forumdisplay_threadlist template (line #33 - #34).
This will come in very handy for a future project, thanks!
Hello, I have various prefixes set up on my board, but I am having a problem with displaying the value of a particular prefix.

The prefiix is set to allow users to select several prefixes from one overall category. I found that if I had that setting then my prefixes did not show in the first post.

Here is an example thread >> http://www.leefish.nl/mybb/thread-3130.html

You will see in the first post that there is a Game Type,  a Game Category (in this case Mods and Hacks) and an EPs Required . There is no value next to the EP's required yet I know it is filled in and I can filter on it - I just can't display it. I use this field in various areas of the board and it does not display in any areas where I expect it to.

In the custom thread fields the settings are as so:

Title: EPs required
Key: dld_ep_prefix
Description: Choose category for this article (required). You can choose more than one category.
Applicable Forums: These are correct - I can filter on these values just fine.
Input Field Type: Listbox
Field Input Height: 5
Values List:

Code:
Base Game
University


Editable by / Required Field?: Everyone (required)
Display Order: 2
Allow Filtering: Yes
Display Format:

Code:
{VALUE}

Allow multiple values for this field: Yes

Formatting Map List:

HTML Code
Base Game{|}<a href="{$forumurl?}filtertf_dld_ep_prefix=Base Game">TS2 Base</a>
University{|}<a href="{$forumurl?}filtertf_dld_ep_prefix=University"><span>University</span></a>


Post bit html snippet:

HTML Code
<tr>
	<td valign="top">EPs Required</td>
									<td width="1" valign="top">:</td>
									<td valign="top">{$GLOBALS['threadfields']['dld_ep_prefix']}</td>
</tr>


What I did find was as soon as I set this field to NOT allow multiple values it became visible.

Can anyone advise how I can get this data to display?

Thank you.

Pages: 1 2 3 4 5 6
Reference URL's