Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Thread Prefix
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #41
RE: Thread Prefix
(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.

04-09-2011 06:28 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #42
RE: Thread Prefix
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...

My Blog
04-09-2011 10:00 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #43
RE: Thread Prefix
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


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 07-18-2011 08:30 PM by leefish.)
07-18-2011 08:29 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #44
RE: Thread Prefix
Maybe something like this (the URL):

HTML Code
filtertf_key1=value_of_key1&filtertf_key2=value_of_key2


07-19-2011 03:50 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #45
RE: Thread Prefix
Excellent - that works perfectly - Thank you very much RateU.


[Image: leelink.gif]
MYBB1.6 & XThreads
07-19-2011 11:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #46
RE: Thread Prefix
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
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #47
RE: Thread Prefix
(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?


[Image: leelink.gif]
MYBB1.6 & XThreads
07-20-2011 04:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #48
RE: Thread Prefix
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).

07-21-2011 04:30 AM
Find all posts by this user Quote this message in a reply
WhiteEagle Offline
Member
***
Posts: 62
Joined: Sep 2011
Post: #49
RE: Thread Prefix
This will come in very handy for a future project, thanks!

I fold for team 52482. Do you fold?
MyBB powered sites: Leet Link FoodRatings
10-06-2011 05:15 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #50
RE: Thread Prefix
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.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 04-03-2012 02:45 PM by leefish.)
04-03-2012 12:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: