UBB.Dev
Posted By: JustDave [6.2] YASM 1.0 - 02/07/2003 8:40 PM
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


Attached File
67951-yasm.6.2.txt  (245 downloads)
Posted By: Dalantech Re: [6.2] YASM 1.0 - 02/07/2003 9:40 PM
Installed

And now, a word from my users:

Posted By: JustDave Re: [6.2] YASM 1.0 - 02/07/2003 9:51 PM
LoL their welcome.

For my next trick I'm pulling two sites out of one database. Stay tuned.
Posted By: Dalantech Re: [6.2] YASM 1.0 - 02/07/2003 10:00 PM
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!
Posted By: JoshPet Re: [6.2] YASM 1.0 - 02/07/2003 10:56 PM
My users have JustDave for well over a year.

They love everything he's ever made for my site.
Posted By: JoshPet Re: [6.2] YASM 1.0 - 02/16/2003 2:22 PM
This mod is in use here at threadsdev if you want to see it in action.
Posted By: Lisa_P Re: [6.2] YASM 1.0 - 02/16/2003 10:44 PM
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. )
Posted By: Ian_W Re: [6.2] YASM 1.0 - 02/17/2003 1:48 AM
Thanks Dave - very nice mod.

Ian
Posted By: Ian_W Re: [6.2] YASM 1.0 - 02/17/2003 2:43 AM
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

Posted By: JustDave Re: [6.2] YASM 1.0 - 02/17/2003 2:53 AM
I'll have to do some seaches for words and see. Will let you know.
Posted By: Ian_W Re: [6.2] YASM 1.0 - 02/17/2003 3:00 AM
Search away......
Posted By: chillin Re: [6.2] YASM 1.0 - 02/18/2003 4:53 AM
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.
Posted By: JustDave Re: [6.2] YASM 1.0 - 02/18/2003 4:59 AM
[]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.
Posted By: JustDave Re: [6.2] YASM 1.0 - 02/18/2003 5:00 AM
Glad you like it. Maybe Rick will see this and add it in to 6.3
Posted By: Allusivekudos Re: [6.2] YASM 1.0 - 03/11/2003 12:30 AM
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
Posted By: Allusivekudos Re: [6.2] YASM 1.0 - 03/11/2003 12:56 AM
Nevermind.....I figured it out!

-peter
Posted By: Kel Re: [6.2] YASM 1.0 - 03/12/2003 4:48 PM
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[/]
Posted By: JoshPet Re: [6.2] YASM 1.0 - 03/12/2003 5:18 PM
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.
Posted By: Kel Re: [6.2] YASM 1.0 - 03/12/2003 5:45 PM
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.
Posted By: JoshPet Re: [6.2] YASM 1.0 - 03/12/2003 6:25 PM
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.
Posted By: Kel Re: [6.2] YASM 1.0 - 03/12/2003 6:41 PM
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...



Posted By: JoshPet Re: [6.2] YASM 1.0 - 03/12/2003 6:44 PM
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.
Posted By: ScottCargill Re: [6.2] YASM 1.0 - 03/17/2003 5:09 AM
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.

Posted By: JustDave Re: [6.2] YASM 1.0 - 06/11/2003 4:37 PM
Hi Scott,

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

Did you solve this for your install?
Posted By: JoshPet Re: [6.2] YASM 1.0 - 06/11/2003 7:02 PM
FYI - this works in 6.3.
Posted By: JustDave Re: [6.2] YASM 1.0 - 06/16/2003 4:40 AM
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?
Posted By: JoshPet Re: [6.2] YASM 1.0 - 06/16/2003 6:11 AM
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.
Posted By: zarathoustra Re: [6.2] YASM 1.0 - 06/16/2003 8:56 AM
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"
Posted By: zarathoustra Re: [6.2] YASM 1.0 - 06/18/2003 1:46 PM
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
Posted By: TonyN Re: [6.2] YASM 1.0 - 06/18/2003 9:24 PM
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)
Posted By: Ian_W Re: [6.2] YASM 1.0 - 06/18/2003 11:00 PM
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

Posted By: Dalantech Re: [6.2] YASM 1.0 - 06/19/2003 8:15 AM
I use CuteHTML for my text editing -very easy to use!
Posted By: slayer60 Re: [6.2] YASM 1.0 - 08/12/2003 10:45 PM
I use Notetab a versitle little app. I'm using the Pro version but the free version is nice too.
Posted By: TonyN Re: [6.2] YASM 1.0 - 08/13/2003 2:00 AM
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
© UBB.Developers