Thread Rating:
  • 1 Votes - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How do I create a custom link to search for prefixes?
dastaten Offline
Junior Member
**
Posts: 4
Joined: Feb 2013
Post: #1
How do I create a custom link to search for prefixes?
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.
02-22-2013 03:43 PM
Find all posts by this user Quote this message in a reply
Waleed Offline
Junior Member
**
Posts: 34
Joined: Feb 2013
Post: #2
RE: How do I create a custom link to search for prefixes?
Do you mean something like what I've done here? (Browse the Gallery) http://pik.gy
02-22-2013 10:20 PM
Find all posts by this user Quote this message in a reply
dastaten Offline
Junior Member
**
Posts: 4
Joined: Feb 2013
Post: #3
RE: How do I create a custom link to search for prefixes?
(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?

(This post was last modified: 02-23-2013 04:09 AM by dastaten.)
02-23-2013 04:06 AM
Find all posts by this user Quote this message in a reply
dastaten Offline
Junior Member
**
Posts: 4
Joined: Feb 2013
Post: #4
RE: How do I create a custom link to search for prefixes?
(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.

(This post was last modified: 02-23-2013 07:01 AM by dastaten.)
02-23-2013 06:49 AM
Find all posts by this user Quote this message in a reply
Waleed Offline
Junior Member
**
Posts: 34
Joined: Feb 2013
Post: #5
RE: How do I create a custom link to search for prefixes?
The following thread by RateU should do the trick; http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=555&highli
02-23-2013 08:18 AM
Find all posts by this user Quote this message in a reply
dastaten Offline
Junior Member
**
Posts: 4
Joined: Feb 2013
Post: #6
RE: How do I create a custom link to search for prefixes?
(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!!
02-23-2013 09:17 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: