UBB.Dev
Posted By: IAmBodhi Title of Last Post for 6.1? - 11/07/2002 9:53 AM
I simply want the title of the Last post to appear in the "Last Post" column, and didn't know if i had to go through the lengthy coding changes that were shown in the "Finished Mods" forum.

It's strange to have to click on a name, not knowing what thread that name replied to! - UBB Classic automatically lists the title of the thread with the name and time...

Sincerely,
Keith
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/07/2002 9:58 AM
You are talking about on the Main Index?

The mod for that can be found here, but this will also be a standard feature in version 6.2.
Without the mod the title of the post isn't getting pulled....so out of the box it can't display the post title.

Posted By: IAmBodhi Re: Title of Last Post for 6.1? - 11/07/2002 10:04 AM
Yes, i'm talking about the Main Index. I just tried that mod, and it crashed the main page...i had errors everywhere.

I'll try it again now, and post the errors i received...

Sincerely,
Keith
Posted By: IAmBodhi Re: Title of Last Post for 6.1? - 11/07/2002 10:10 AM
The long mod just made "N/A" come up everywhere...so far so good, but when i added this:

$forum[$x][$y]['lastnumber'] = $lastnumber;

I GOT THIS:

SQL ERROR: Unable to do_query: SELECT B_Subject,B_Username,B_Icon FROM w3t_Posts WHERE B_Number = 10219
Table 'db0558.w3t_Posts' doesn't exist
Warning: Supplied argument is not a valid MySQL result resource in D:\...mywebsite...\mysql.inc.php on line 121

There were about a dozen of these in a row in a table at the top of the screen.

My new lines looked like this:


$forum[$x][$y]['time'] = $time;
$forum[$x][$y]['lastpost'] = $lastpost;
$forum[$x][$y]['modlist'] = $modlist;
$forum[$x][$y]['lastnumber'] = $lastnumber;
$y++;


I had already removed the "Moderator" column in an earlier hack...any ideas??? - Thanks!!!

Sincerely,
Keith
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/07/2002 10:18 AM
This might need to be tweaked a bit.

Are you using a custom database prefix (other than "w3t_")...

In the hack find this:

w3t_Posts


Change it to:

{$config['tbprefix']}Posts



That should do the trick....

The latest versions of threads offer a custom table prefix (defined in setup).... die hards used w3t_

That should fix it for you.

Posted By: IAmBodhi Re: Title of Last Post for 6.1? - 11/07/2002 10:21 AM
[]In the hack find this: w3t_Posts

Change it to: {$config['tbprefix']}Posts[/]

In which hack do i find this? It wasn't in ubbthreads.php,

and YES, my Table Prefix is "IAS_"

Sorry...i'm completely blind with this stuff...

Sincerely,
Keith
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/07/2002 10:24 AM
It'll be in the ubbthreads.tmpl template.

In the instructions for this hack....

Simply replace the w3t_ with either {$config['tbprefix']} or IAS_

It's trying to get the info from w3t_Posts which does not exist. We need to tell it to look in IAS_Posts instead.

Adding that config variable will make it work no matter what the prefix.

Hope that helps.
Posted By: IAmBodhi Re: Title of Last Post for 6.1? - 11/07/2002 10:27 AM
PERRRFECT!!!!

Dumb Question: How on Earth is this stuff so easy for you to do? It seems as though your repsonses are almost always from right off the top of your head...amazing.

Anyway, much appreciated; this was something else my die hard UBB Classic users were complaining about!

Peace & Mischief,
Keith
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/07/2002 5:15 PM
He he

I was once a newbie like you. I had no clue or no understanding of any of this.

But I hung around here, and dove in with both feet. Guess I've always been a fast learner.

After a while, you've seen alot and can kind of pinpoint where the error comes from etc...

And when I can't.... someone here smarter than me can.
Posted By: IAmBodhi Re: Title of Last Post for 6.1? - 11/08/2002 1:37 AM
The complaints from members keep coming in. Now that i have reversed the thread order, and added this mod, this was the most recent complaint:

"as it stands right now, when clicking on the name of a thread with new posts and multiple pages, you are sent to the last (oldest) page of posts and dropped off at the top of that page. i imagine this is a relic of the old sort order (viva la revolucion!). just thought i'd point it out."

Any ideas on how to fix this or why this might be happening? I there an easy way to drop a person off at the top of the most RECENT page instead of the very first page?

I immensely appreciate all the help. No programming experience, huh? Hmm.

Sincerely,
Keith
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/08/2002 4:18 AM
Well the way threads works normally..... when you have not reversed the order....

If the thread has 3 pages.... when you click into a thread that has new replies.... it should go directly to that page, and jump down specifically to the first unread post.

This is normal behavior.

So your reason to reverse the threads because users don't want to scroll, never really made sense. There shouldn't be a need to scroll to read new threads.

Not sure how this behaves when you reverse the order. The system that tracks the new posts is a bit more complicated than changing one word I'm sure.

I will have to put on a fresh pair of eyes and perhaps try and see how that is working this weekend.

My gut reaction is that each post has an anchor tag in it, and maybe it's jumping to the wrong end of that list... and there may be a way to reverse that.

But without looking I'm totally guessing. Even I was amazed at how easy reversing the order was (in flat anyway).... so maybe I will be surprised by simplicity here as well.

Let's hope.
Posted By: JoshPet Re: Title of Last Post for 6.1? - 11/08/2002 8:29 AM
[]Any ideas on how to fix this or why this might be happening? I there an easy way to drop a person off at the top of the most RECENT page instead of the very first page?[/]

The more I re-read this... and having seen your site.

Have them go to my home....
Edit Display Prefreences....
And change the Default sort order....

See if that satisfies them.

You might share this document with your users. Post it on your board if need be.....
They may not like your defaults... but can learn that they can customize the display preferences a great deal to suit their tastes.
© UBB.Developers