The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with a Query - "View My Classifieds"
Hello,
I run a bowling forum, allBowling.com, with a forum for selling used bowling equipment: http://www.allbowling.com/forum/forumdisplay.php?f=9 I'd like to offer my users the ability to place in their sig something like "Click Here to View All My Classifieds". I'm thinking it would be a search string. Example: Seach all New Threads created by User within this Forum Is this possible? Thanks in advance! |
#2
|
|||
|
|||
You can pass requests directly to search.php
Imagine that this very forum we are in at vbulletin.org (#97) as your hypothetical classifieds area and the post above is an ad. This link will return all threads started by you, bamaster in the last year in just this forum, showing the results in reverse order as posts. You can try it by clicking on this: Find bamaster's Classified ads Here is the code for that link: Code:
https://vborg.vbsupport.ru/search.php?do=process&searchuser=bamaster&starteronly=1&exactname=1&searchdate=365&showposts=0&forumchoice[]=97 2. You can do whatever you want with this. Now, here, for example are all the threads I, memobug, started anywhere at vbulletin.org in the past month. This is something I might be able to use to catch up on stuff! Find memobug's threads started this month Code for that is here: Code:
https://vborg.vbsupport.ru/search.php?do=process&searchuser=memobug&starteronly=1&exactname=1&searchdate=30&showposts=0&forumchoice[]=0 There may be a problem that may or may not affect you. and this has always been a difficulty in using usernames in links, they can contain characters that can't be passed in URL. Stuff like the ampersand character or maybe spaces and semicolons and slashes that might prevent the posted form from getting all the data. Nevertheless, it will work for most usernames without changes. If you want it 100% right, there are some things you can do: Some workarounds: 1) If you wanted you could install a hack by a guy named Reynoldovb that keeps users from including illegal characters in their username. https://vborg.vbsupport.ru/showthread.php?t=73559&goto=newpost 2) Or you could simply (right, if you know html!) make your classifieds link into a simple form with a bunch of hidden fields that will pass the username using the POST method, without issue. You can just look at the html output of the search.php to find the right syntax and delete all the hidden fields you aren't going to use. That's pretty much what I did to get the link I used above. I can pretty much guarantee you that you can get this to work using that method. The search.php search form (be sure you look at what the html output that browser sees, not the raw code) starts with the line Code:
<form action="search.php" method="post" name="vbform"> Regards, Matt P.S. Due to a problem with the way the board parses BBCODE, I had to modify the search link to make it work in the forum. The CODE bit has it correct. Basically I just dropped the brackets [] in the first link, because they were getting clipped off by vbulletin's bbcode parser. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|