Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2006
Posts: 13
N
stranger
stranger
N Offline
Joined: Aug 2006
Posts: 13
This might be beyond the scope of this forum, but I'm curious about something. I run a football fan site and I have the roster listed on the site external from the forums obviously. The roster information is pulled in from another database. I was wondering if it might be possible to have the names of the players clickable and somehow pass that name to the search function of the Threads forum to show posts made about that particular player.

Like I said, this might beyond the scope of this forum and I don't have enough PHP knowledge to know, so I thought that I'd ask.

Thanks!

Joined: Aug 2006
Posts: 111
member
member
Joined: Aug 2006
Posts: 111
You can do it pretty simple by passing the info in the URL.

Go to your userlist and click on them and then click on "show all user's posts" and it will return something like this:

Code
 https://www.ubbcentral.com/boards/dosearch.php?Cat=0&Forum=All_Forums&Name=13944&Searchpage=0&Limit=25&&fromsearch=1&fromprof=1 


Copy that and then link it to the player.

Fred

Joined: Aug 2006
Posts: 13
N
stranger
stranger
N Offline
Joined: Aug 2006
Posts: 13
Great, you got me part of the way there. Here's what I have. I copied the url string from the Active Topics and replaced it with the following:

Code
http://www.mysite.com/ubbthreads/dosearch.php?Cat=0&Forum=All_Forums&Words=$player_firstname%20$player_lastname&Limit=25&topic=1&fromsearch=1

Unfortunately all that does is return the Active Topics again but at the top it says: Search Results for: Michael Robsinon

But the search results are still just the active topics. Any ideas?

Joined: Aug 2006
Posts: 111
member
member
Joined: Aug 2006
Posts: 111
Yes, don't use the search function. Use the user's posts function.

Notice what I typed and the URL.

To do this, go to the user list or click on a link to the user's profile. Once in the profile you will see a link that says something like "Show user's posts" or something like that.

That is the URL you want to copy.

Fred

Joined: Aug 2006
Posts: 13
N
stranger
stranger
N Offline
Joined: Aug 2006
Posts: 13
I did exactly what you said. Here's my code:

Code
http://www.nittanyfootball.com/ubbthreads/dosearch.php?Cat=0&Forum=All_Forums&Name=$player_firstname%20$player_lastname&Searchpage=0&Limit=25&&fromsearch=1&fromprof=1

The Name variable is replaced with the name of the player in the roster. I'm not sure what this is searching though because I just get a screen back that says No Matches. When I do a search for the same name in the regular search function it works fine.

Even using the URL string that you said to copy it looks like it's using the search function. Is that correct? I thought that the Name variable had to be the ID of a registered user on the board. That's not what I want. I want the names of players in posts and titles to be searched and displayed.

Joined: Aug 2006
Posts: 13
N
stranger
stranger
N Offline
Joined: Aug 2006
Posts: 13
Any more ideas on this Fred? The link is working great, but the query just doesn't pan out. Help!

Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
what version are you running? version 7 comes with a search content island that can be used on external pages:

<?php
define('UBB_MAIN_PROGRAM',1);
echo "<table width=\"100%\">";
include("/path/to/your/forums/cache/search.php");
echo "</table>";
?>


- Allen
- ThreadsDev | PraiseCafe
Joined: Aug 2006
Posts: 13
N
stranger
stranger
N Offline
Joined: Aug 2006
Posts: 13
I'm running 6.54 right now. I want to make sure I'm running a full release of 7, not the beta. I guess I'll just have to wait.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 815 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)