MyBB Hacks

Full Version: How do I create a custom link to search for prefixes?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using XThreads in one of my MyBB forums to help create a blog-type section, and I'm using the thread prefix for the blog topics. I would like my visitors to be able to click the topic and that take them to a search results page listing all the other threads with that particular topic.

I've done this before, but my site crashed and I don't remember what the link was. In case I'm not explaining myself well, the link was something like http://mydomain.com/search.php?forums=2keywords=... Maybe that's pretty far off, but I hope it clarifies what I'm asking for.

Any help would be greatly appreciated.
Do you mean something like what I've done here? (Browse the Gallery) http://pik.gy
(02-22-2013 10:20 PM)Waleed Wrote: [ -> ]Do you mean something like what I've done here? (Browse the Gallery) http://pik.gy

Thank you for the reply, but that's not quite what I need. The link I need definitely goes to search.php. I just need to know how to insert the thread prefix into the search link. I believe it should be something like this:

Code:
<tr><td class="{$bgcolor}" width="70" style="padding-right: 0px;"><strong>{$title}</strong></td><td class="{$bgcolor}" style="padding-left: 0px;"><a href="search.php?forums=2&keywords={$value}">{$value}</a></td></tr>


The link in there is similar what I'm trying to add to that template. I'm sure it isn't right because I've tried it. But I think it's close to what I need.

For instance: I post a thread and select "Politics" as the thread prefix, which ends up displayed on the thread. Then when a user clicks the thread prefix on the page, in this case "Politics," it takes them to a search results page displaying all of the other threads containing the prefix "Politics."

Any thoughts?

(02-22-2013 10:20 PM)Waleed Wrote: [ -> ]Do you mean something like what I've done here? (Browse the Gallery) http://pik.gy

Actually, you're right. It was forumdisplay.php that I was using, not search.php. So the link should look something like:

Code:
<a href="forumdisplay.php?fid=2&thread_prefix={$value}">{$value}</a>


I'm fairly certain 'thread_prefix' is what I have wrong. Do you know what that should be?


My key is 'thread_topic' and the forum I'm wanting to display is '2,' so I'm trying:

Code:
<a href="forumdisplay.php?fid=2&thread_topic={$value}">{$value}</a>


But no luck.

(02-23-2013 08:18 AM)Waleed Wrote: [ -> ]The following thread by RateU should do the trick; http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=555&highli

You're my hero, man. I got it working. I was pretty far off on what I needed to do, but was able to figure it all out with that thread. Thanks!!
Reference URL's