Previous Thread
Next Thread
Print Thread
Rate Thread
#235530 02/07/2003 1:40 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yet Another Search Mod 1.0

credits: chillin, DaLanTech and extremebikini

This will give you 3 new options while searching:
1. Display All Posts (standard and default)
2. Display Last Posts (like .classic I guess)
3. Display Main Posts (like something somewhere)


I had placed all of the changes into this post but it stretched way out and people (like myself) hate that so now the file's attached.


Enjoy
Attachments
67951-yasm.6.2.txt (0 Bytes, 245 downloads)

Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Installed

And now, a word from my users:


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL their welcome.

For my next trick I'm pulling two sites out of one database. Stay tuned.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
You've just one over hundreds of die hard Classic users with this one my friend: One of the number one complaints I get from Classic users centers around the lack of a Latest Threads display.

You rock!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
My users have JustDave for well over a year.

They love everything he's ever made for my site.

Sponsored Links
Daine #235535 02/16/2003 7:22 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This mod is in use here at threadsdev if you want to see it in action.

Daine #235536 02/16/2003 3:44 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Is there a mod that combines or is similar to this one, but also includes the ability to search by username AND subject (at the same time) like this one https://www.ubbdev.com/threads/php/showflat.php?Cat=&Board=finished&Number=64283? (Nobody needs to make one if there isn't, I'm just wondering. I prefer the ability to search by username and subject, but this is kinda neat too. )


[:"red"]Lisa[/]
JacquiL #235537 02/16/2003 6:48 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks Dave - very nice mod.

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #235538 02/16/2003 7:43 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Okay - am I confused by what this mod actually does, or is there an error?

When searching does this

a)
1. Display All Posts - shows every post that has the word
2. Display Last Posts - shows just the last post in any thread that contains the word
3. Display Main Posts - shows the first post in any thread that contains the word

or

b)
1. Display All Posts - shows every post that has the word
2. Display Last Posts - shows only the last post if that last post actually has the word in it.
3. Display Main Posts - shows only the first post if that first post actually has the word in it.

I assumed it was a) but it seems to be b) as I am getting some threads showing in the results on one option and not on another.

Could you clarify this for me.

Thanks



Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #235539 02/16/2003 7:53 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll have to do some seaches for words and see. Will let you know.

Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Search away......


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #235541 02/17/2003 9:53 PM
Joined: Jan 2003
Posts: 125
Journeyman
Journeyman
Joined: Jan 2003
Posts: 125
kewl, i got a shout out in a JustDave Mod! Definatley this is a must for .classic converts. the guy that i run my site with was crying for this one.

Gorlum #235542 02/17/2003 9:59 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
[]canvey said:
Okay - am I confused by what this mod actually does, or is there an error?

When searching does this

a)
1. Display All Posts - shows every post that has the word
2. Display Last Posts - shows just the last post in any thread that contains the word
3. Display Main Posts - shows the first post in any thread that contains the word

or

b)
1. Display All Posts - shows every post that has the word
2. Display Last Posts - shows only the last post if that last post actually has the word in it.
3. Display Main Posts - shows only the first post if that first post actually has the word in it.

I assumed it was a) but it seems to be b) as I am getting some threads showing in the results on one option and not on another.

Could you clarify this for me.

Thanks

[/]


It does both a and b depending on if your searching for words or not.

kwalenta #235543 02/17/2003 10:00 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Glad you like it. Maybe Rick will see this and add it in to 6.3

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
So, I'd like to set this up so that users can click a link and it automatically takes them to the 25 Last Posts within 1 day.....

Anyone know how I write that out? The search spits it out, but I don't know what string it is........


-peter

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Nevermind.....I figured it out!

-peter

Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Here's an interesting "glitch" that I've discovered in mine...

Page one of my search results gives me just the last post just like I've asked for but any subsequent pages (when I click the "next" button) defaults back to all posts.

Anyone? []http://www.americanconservatives.net/ubb/graemlins/shrug.gif[/]

Razin #235547 03/12/2003 10:18 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It seems to work fine here....

When you click "next" do you see the "displaytype" variable being passed in the URL?

Do you have a get_input function for displaytype in dosearch.php like this:

$displaytype = get_input("displaytype","both");


That should make it work.

Daine #235548 03/12/2003 10:45 AM
Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Nope. That's the issue. And then if I click on "previous", it disappears as well. Where and how can I fix this?

And yes, I do have that line in my dosearch.php file.

My board is in my sigline. The Latest Threads link is in the TopNews line if you would like to see for yourself.

Razin #235549 03/12/2003 11:25 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
So you don't see it in the URL?

Well then if that isn't in the URL.... then you missed the step in dosearch.php where you modify $prevlinkstart and $nextlinkstart.

I just checked the instructions... it's there. Check those instructions again.

Especially this part:

## Change this:


$prevlinkstart = "<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=$URLForum&Words=$URLWords&Match=$URLMatch&Searchpage=$prevpage&Limit=$Limit&Old=$Old">";


## to this:


$prevlinkstart = "<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&[:"red"]displaytype=$displaytype&[/]Forum=$URLForum&Words=$URLWords&Match=$URLMatch&Searchpage=$prevpage&Limit=$Limit&Old=$Old">";


## Change this:


$nextlinkstart = "<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=$URLForum&Words=$URLWords&Match=$URLMatch&Searchpage=$nextpage&Limit=$Limit&Old=$Old">";


## to this:


$nextlinkstart = "<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&[:"red"]displaytype=$displaytype&[/]Forum=$URLForum&Words=$URLWords&Match=$URLMatch&Searchpage=$nextpage&Limit=$Limit&Old=$Old">";



It should work fine to you once you get the variables to pass in the URL.

Daine #235550 03/12/2003 11:41 AM
Joined: Jan 2002
Posts: 266
Kel Offline
Member
Member
Offline
Joined: Jan 2002
Posts: 266
Hm! Very weird!... I remember changing that specifically because I remember wanting to make sure that I got the right line deleted and the right line copied and pasted. I KNOW I did it. But it's entirely possible that I was tired and didn't hit the save button before I closed the file. Who knows? Very weird that it worked on the first page but not the rest though. It works now on all pages. Thanks much...




Razin #235551 03/12/2003 11:44 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Well the first page gets passed from the script via POST and not in the URL... additional pages are passed in the URL via GET. So that's why it only worked on page 1.

sjsaunders #235552 03/16/2003 10:09 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Dave, what would it take to install this on a 6.1.1 version?

SELECT t1.B_Number,t1.B_Main,t3.U_Username,t1.B_Subject,t1.B_Posted,t1.B_Board,t3.U_Color,t1.B.....

That line is the only one that catches me as being odd, I hadn't ran into an t1,t2, or t3's ???

I intergrated this mod into the board, and got a massive query error in dosearch.php when I ran it. It seemed to be having a problem with that line.


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Hi Scott,

I don't know how I missed your reply, sorry.

Did you solve this for your install?

sjsaunders #235554 06/11/2003 12:02 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
FYI - this works in 6.3.

Daine #235555 06/15/2003 9:40 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
This seems to be broke here when trying to search for a display name. I can't recall but is there supposed to be an option "by display name" in the dropdown?

sjsaunders #235556 06/15/2003 11:11 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hmmmm....

That was an issue in 6.2 (username serach didn't work).

The option is there - but it doesn't work - maybe thid mod somehow captured the username search bug.

Daine #235557 06/16/2003 1:56 AM
Joined: Jul 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 15
There is another bug with YASM 1.0 in 6.3 :
"2. Display Last Posts (like .classic I guess)" does not work here, at ThreadsDev, and on my boards .
For instance, you can search for "links", and see many times in the dosearch.php : "Re: TLD Bv1.5 Released - Threads Links Directory"

nerdario #235558 06/18/2003 6:46 AM
Joined: Jul 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 15
Code
 if ($displaytype == "last") {<br />      $query = $query."\nAND B_Last_Post = B_Posted \nORDER BY B_Last_Post DESC";} 


does not work in dosearch.php, while :

Code
 elseif ($displaytype == "main") {<br />      $query = $query."\nAND B_Number = B_Main \nORDER BY B_Posted DESC";} 


works

#235559 06/18/2003 2:24 PM
Joined: Jun 2003
Posts: 131
Journeyman
Journeyman
Offline
Joined: Jun 2003
Posts: 131
I am really new at this, so a dumb question. I started trying to make the changes in the attachment, and doing the first one demonstrated that I don't really know how to edit .php files in windows.

If I open it in "notepad," it's a long single string and difficult to do anything with.

If I open it in Word, I can see the structure and insert the addition (as in the first item) or make chabges, but then when I save it as a php file, the result - as viewed again in notepad - has line breaks that Word added. I think this is OK, but want to be sure!?

Or is there some other way I should be editing these files? (The editing done to templates through threads itself takes care of this problem.)

I imagine I'm missing something obvious, but would appreciate some guidance. All of these files appear to basically be text files, but I'm worried because I don't know the potential significance of line breaks in the various types of files!

Thanks - Tony (very new)

BOOO_YAAA #235560 06/18/2003 4:00 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Hi,

I use UltraEdit32 - this will take the files in question, and then convert them to a dos format.

You can download a 30 day trial (I think) from their site www.ultraedit.com - there are other similar products available.

I know that with txt files if I am viewing the site in IE, it will open up the txt file also in IE. If this is the case then I cut and paste to UE and work on updating the files using that.

I also never tend to use threads to edit my templates - always prefer to do it outside.

I would never suggest using Word, or FrontPage or anything like that as it tends to think it knows what to do - and believe me with some of these files - it don't



Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
BOOO_YAAA #235561 06/19/2003 1:15 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I use CuteHTML for my text editing -very easy to use!

Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
I use Notetab a versitle little app. I'm using the Pro version but the free version is nice too.

BrokenToy #235563 08/12/2003 7:00 PM
Joined: Jun 2003
Posts: 131
Journeyman
Journeyman
Offline
Joined: Jun 2003
Posts: 131
I just went and had a look at NoteTab, and see that the pro version has different colors for identifying tags, etc, for html, and it also has a compare files capability, but in the light version you apparently can't put the files side by side.

Have you tried this capability? I tried Beyond Compare on some else's recommendation here, and it is excellent for comparing (i.e., putting the files side by side and highlighting differences in lines laid side by side...). For the couple of times I've needed a capability of this sort, I've REALLY needed it, and I'm just wondering if you know whether Note Tab would serve as well.

Thanks - Tony


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)