PDA

View Full Version : Last Active Thread Display


fastforward
05-24-2001, 10:00 PM
This is for vB 2.01

This little hack allows the display of the last active thread on the forums pages. This is the 'UBB like' feature. You can see an example at http://dbforums.com.

NOTES
It requires two extra column to be added in the forum table a few code additions and then the thread title and iconid can be referenced using the variables $forum[lastactivethread] and icon$forum[lastactiveiconid].gif. Instructions are in the attachment.

This was originally part of my usenet hack and due to popular request ( all two of them :D ) I'm releasing it seperately.

eva2000
05-25-2001, 05:34 AM
nice but what happesn with very long thread titles ?

h4p3
05-25-2001, 06:53 AM
I think they are cut off, if they are too long.

Degen
05-25-2001, 07:20 AM
Looks like an awesome hack, and I really want to get it going, but I have no idea how to :

1) Run the following SQL statement:

ALTER TABLE forum ADD lastactivethread VARCHAR (64);

Is their an easy way to do this?

Thanks

eva2000
05-25-2001, 07:26 AM
Originally posted by Degen
Looks like an awesome hack, and I really want to get it going, but I have no idea how to :

1) Run the following SQL statement:

ALTER TABLE forum ADD lastactivethread VARCHAR (64);

Is their an easy way to do this?

Thanks you can run that via phpmyadmin you can get it from www.phpwizard.net

nuno
05-25-2001, 10:21 AM
great hack fastforward
any chance to show last post icon also?:D
tx

h4p3
05-25-2001, 11:39 AM
Hm, i noticed that it doesn't work correctly at dbforums.com. If you click on the last post icon, you will get only a blank page.

fastforward
05-25-2001, 12:30 PM
Originally posted by h4p3
Hm, i noticed that it doesn't work correctly at dbforums.com. If you click on the last post icon, you will get only a blank page.
That's a template issue. It has nothing to do with the hack. All the hack does is create a new variable that can be accesed via the forum home pages.

fastforward
05-25-2001, 12:33 PM
Originally posted by eva2000
nice but what happesn with very long thread titles ?
The default length of the title is 45. This is controlled by the variable $lastactivethread_length.

If you want it longer, add a line to your config_inc.php that reads

$lastactivethread_length=64;

or whatever. If you need it longer than 128, you will also need to increase the table column width.

eva2000
05-25-2001, 12:36 PM
Originally posted by fastforward

The default length of the title is 45. This is controlled by the variable $lastactivethread_length.

If you want it longer, add a line to your config_inc.php that reads

$lastactivethread_length=64;

or whatever. If you need it longer than 128, you will also need to increase the table column width. thanks gonna try this out locally first :)

h4p3
05-25-2001, 12:46 PM
Originally posted by fastforward

That's a template issue. It has nothing to do with the hack. All the hack does is create a new variable that can be accesed via the forum home pages.

Ok, i just wanted to mention it ;)

h4p3
05-25-2001, 03:47 PM
Tested it on my local server and it works fine.

Thx fastforward!

Hm, one suggestion: if you move/delete a Topic, then you will see still the Title on the main site, or the wrong one if you have moved it.

Perhaps you can improve it a little :)

fastforward
05-25-2001, 04:48 PM
Originally posted by h4p3
Tested it on my local server and it works fine.

Thx fastforward!

Hm, one suggestion: if you move/delete a Topic, then you will see still the Title on the main site, or the wrong one if you have moved it.

Perhaps you can improve it a little :)
Yeah... this is a problem with the location of the call to the indexpost() function from the move thread vB functions. I actually moved the call on my setup but that was with RC3 I was hoping it may not be an issue with the release version. I didn't move it on the hack release because I'm not sure what other implications it may have. I'll do some more testing and see if it's safe to move the function call.

h4p3
05-25-2001, 04:51 PM
Great! :D

*waiting*

fastforward
05-25-2001, 04:53 PM
Originally posted by nuno
great hack fastforward
any chance to show last post icon also?:D
tx
I knew someone was going to ask for that :)

The reason it's not there already is because I wanted to keep this as simple as possible, but mainly because I didn't want to cause the thread listings to generate any more queries than other than the standard vB ones.

Having said that, it wouldn't be too difficult to add an additional column containing the icon reference that could be called from the template in the same way as the title. The trouble is, with every column added and every extra line of code there's more to go wrong :)

I'll provide optional additions to the existing hack that will allow the title icon this weekend. That way people will have a choice of whether to implement it.

amykhar
05-25-2001, 06:13 PM
I am seeing a bug. It is consistantly displaying the title of the post one post BEFORE the last post. It worked the first time through, meaning that the first post that was made after the hack was installed registered correctly. Now, it is consistantly one behind.

Amy

fastforward
05-25-2001, 08:27 PM
Originally posted by amykhar
I am seeing a bug. It is consistantly displaying the title of the post one post BEFORE the last post. It worked the first time through, meaning that the first post that was made after the hack was installed registered correctly. Now, it is consistantly one behind.

Amy
:confused:

Anybody else seeing this? I can't seem to reproduce it.

h4p3
05-26-2001, 06:21 AM
Nope, don't noticed such a problem.

nuno
05-26-2001, 12:06 PM
fastforward
this shouldnt show private forums threadtitles :confused:

h4p3
05-26-2001, 01:18 PM
Originally posted by nuno
fastforward
this shouldnt show private forums threadtitles :confused:

If you enable "Private forum (Invisible to all except moderators and admins; user access masks must be on!) - YES", then only Mods, Admins and authorized Users can view the forum and so the thread titles.

nuno
05-26-2001, 01:43 PM
Originally posted by h4p3


If you enable "Private forum (Invisible to all except moderators and admins; user access masks must be on!) - YES", then only Mods, Admins and authorized Users can view the forum and so the thread titles.

yup, but i dont want to hide them, i just want to hide threadtitles

h4p3
05-26-2001, 01:44 PM
Hm, maybe fastforward will think of this for the next updated release :)

fastforward
05-26-2001, 03:47 PM
I never actually considered this as I don't use private forums. But, I agree, they shouldn't be shown. I'll add the option this weekend.

h4p3
05-26-2001, 04:28 PM
fastforward is tha man! :D

nuno
05-26-2001, 04:30 PM
tx ;)

antilife
05-26-2001, 04:41 PM
I've had some luck installing a few other hacks but I can't work out what you mean by running a SQL statement. Could you explain again how to set this hack up for a novice.

Cheers

h4p3
05-28-2001, 04:26 PM
Hm, still waiting for an updated version ;)

nuno
06-01-2001, 07:11 PM
Originally posted by h4p3
Hm, still waiting for an updated version ;)
yup me too :D

fastforward
06-01-2001, 07:37 PM
OK.. OK! I'll do something this weekend. I can't remember what I was supposed to be doing though :rolleyes:

Someone remind me.

h4p3
06-01-2001, 07:42 PM
Hehe,

Correct displaying of the last replied Thread on the forum main site, if a thread was deleted or moved.

Someone wanted the feature with the right icons too, i think.

nuno
06-01-2001, 08:36 PM
- posticons (new feature) :D
- hide private forums threadtitles (fix) :confused:

huythuy
06-03-2001, 12:44 AM
I find error . Whenever users edit their post subject it won't update the lastthread . Any workaround?

fastforward
06-03-2001, 01:56 AM
Originally posted by huythuy
I find error . Whenever users edit their post subject it won't update the lastthread . Any walkaround?
There is a work round, but it will complicate the hack unnecesarily. At the moment, it simply updates whenever vB re-indexes that thread. I'm sorry, but I don't want to over-complicate this hack by making changes to allow for something that happens so rarely. Every additional change means more testing, more supporting, more things to go wrong, etc etc. :)

Actually, this is really a vB bug as it should re-index the the post if the title changes.

If you want to make the changes yourself, you should look at the postings.php and the editthread routine.

huythuy
06-03-2001, 02:02 AM
no thanks :D hehe

Have a happy weekend man ;)

h4p3
06-03-2001, 06:48 AM
Originally posted by huythuy
I find error . Whenever users edit their post subject it won't update the lastthread . Any workaround?

The hack doesn't have the bug, it is vbulletin ;)

fastforward
06-06-2001, 03:18 AM
I've finally got around to adding the icon. The new version is in the first post of this thread.

I haven't added an option to hide private forums and probably never will. It will add too much complexity as you will have to check against the user and permissions for each page view. At the moment, there is only one file to edit and there are no extra queries to do; it simply gets the information from the forum table along with everything else.

fastforward
06-06-2001, 03:56 AM
Looks like there is a bug with attachments. It deleted my attachement and won't let me add another. I'll have to start a new thread.

Raptor
06-29-2001, 11:42 PM
Originally posted by fastforward

:confused:

Anybody else seeing this? I can't seem to reproduce it.

yep i'm getting the exact same thing

if I make a new post it shows up correctly - but after a while it seems to log the name of the SECOND thread down not the LAST one

weird ?

http://digital-forums.com/forum/