UBB.Dev
Name: Latest Threads

Version: 2.0.2

Author: Casual

Description: Tease/display forums Latest Threads via SSI, I-Frame or PHP on any page on your Website.

New/fixes in 2.0.2:
  • UBB 6.3.x compatibility
  • Bug fix for iframe (thanks to YoungTaeByun)
  • Fix to not show login name only publicly displayed name

Last update 2.0.1:
  • Fix for reply/posting cache problem
  • ubb_lib_posting.cgi install update (please re-hack see install file)
  • Major changes in code, cleaner code and less I/O use.
  • Auto update save-to file, your output will be saved to an HTML file
  • Latest Threads scripts will only run when your members post a new topic thus running automatically and does not require running individual script (lt.cgi) or streams (less I/O)
  • Cache system removed, lt_reset.cgi removed (no longer needed)
  • Settings contained in var files for future Control Panel addon
  • Multiple streams using separate var files
  • Fix for indetermined loss of threads in output

Requirements:
  • Full License
  • UBB Version 6.2.x & 6.3.x (not testest on 6.1.x or 6.0x)

Features:
  • Works with SSI, I-Frame and PHP.
  • Create multiple stream outputs
  • Displays latest threads listings regardless of date or time. (No Cinderella effect)
  • Filters forums by forum number in Exclude or Include modes.
  • 13 different display options or create your own custom display. Ability to use multiple public templates for multiple streams.
  • Summary size option (smaller or larger)
  • Saves to HTML file (saves in NonCGIPath/lt)
  • Select number of threads to display on a page
  • Charles Capps subroutines and filehandler compliant

Future plans and development:
  • Javascript include
  • Full control panel add-on

Example screenshots and Links:
[Linked Image]

File Download Location:
http://forums.santacruzsentinel.com/lt/

Please report any bugs or suggestions here.

Thanks

Casual
v1.1 works with UBB v6.3 for me just fine =).

Nice to see you've continued to update the latest code though.
Anything I have to be carefulf of when using in 6.3?

Got the following error-message, when trying to post a message:

"/^*.cgi$/: regexp *+ operand could be empty at" ..."/cgi-bin/ubb_latest_threads.cgi line 67"
I've noticed some strange behavior to. Reply's are not visible untill you empty the cache.
quote:
Originally posted by mark99:
v1.1 works with UBB v6.3 for me just fine =).

Nice to see you've continued to update the latest code though.

v1.1?? Dude that code is super old school, Not only are you missing all the new features in the new LT, but the filter bug resides in that version.

quote:
Originally posted by SirGrendel:
Anything I have to be carefulf of when using in 6.3?

Got the following error-message, when trying to post a message:

"/^*.cgi$/: regexp * operand could be empty at" ..."/cgi-bin/ubb_latest_threads.cgi line 67"

I had a hard time understanding what you said but I get the picture... Are you running NT? I may have a solution, I'll have an update soon. How did it work on ubb6.2?

quote:
Originally posted by Variables:
I've noticed some strange behavior to. Reply's are not visible until you empty the cache.

Fixed in v2.0.1. Thanks
hi guys y i had same prob where u would'nt see your posts until u either 1 closed whatever browser your using or clear cache manualy in the cp.
and another one i found was i went back in and all my little lights were blinking like there were new posts but there were not.
so i took it out until i see a fix or mabye a way to manually fix this as it gets installed more .
but all in all it worked fine.
Are theese hacks available as Multi Hack files. I tried to install it manually and i ended up scratching my head...

Im not the best chick with the perl and errormessages but i definately figured out that some file was not written correctly. I removed the forum and weill reinstall and add all mods i had before..with miltihack files this time. Did it manually first to get familiar with it.

Neway..any help on this would be great.
Ok guys, there is definitely a problem with reply's and cache. I've narrowed down the problem but need to fix the issue.

UPDATE
Just finished testing the new LT v2.0.1 and I don't seen the reply/posting cache problem anymore. Please keep testing and keep me updated. If your updating from 2.0 please make sure to re-hack the ubb_lib_posting.cgi. Always backup files before attempting to modifiy files.

For those of you testing on ubb6.3 please continue testing, changes where made to fix the errors above.

Question, whats a multihack?

Thanks

Casual
quote:
I had a hard time understanding what you said but I get the picture... Are you running NT? I may have a solution, I'll have an update soon. How did it work on ubb6.2?
No NT, it's a apache-Server.
I had no 6.2 installed, my last version was 6.1.x. Hadn't got the nerves of rehacking 6.2 again.
Oh, by the way: it works perfectly now!
Thank you!
works fine now for me too.
Tried it on my otherwise clean 6.3 and it works beautifully...
The automatically generated html file is perfect for inclusion in an ASP page.... cheers! wink
Not bad and I got it to work however I found a bug.

When you have a user using QUOTES the hack displays "&Quote"..

It would be better if this was converted into " or just stripped.
Thanks everyone for testing, so far I haven't seen any problems or weird behavior on my ubb. Please continue testing and look for anything strange or bugs, however I think most of them have been squashed.

quote:
Originally posted by Scubaguy:
Not bad and I got it to work however I found a bug.
When you have a user using QUOTES the hack displays "&Quote"..
It would be better if this was converted into " or just stripped.

Sounds good, I'll have this fixed in the next update.

Thanks

Casual
Got some problems: on threads with a lot of postings, when someone is sending a new message, the "refresh"-page would not show up, instead you see a white page.
Then you see the new message in Latest Threads but if you go to this page, the new message will not show up, till I delete the cache.

Sorry for my poor englisch, I hope its understandable.
quote:
Originally posted by SirGrendel:
Got some problems: on threads with a lot of postings, when someone is sending a new message, the "refresh"-page would not show up, instead you see a white page.
Then you see the new message in Latest Threads but if you go to this page, the new message will not show up, till I delete the cache.

Sorry for my poor englisch, I hope its understandable.

usually the white page bug is the result of unsufficient memory allocated to the process or the server kiling the process before it has time to complète
Jep, I know. But it didn't happened before I added the hack.
quote:
Originally posted by SirGrendel:
Jep, I know. But it didn't happened before I added the hack.

did you check your error log ?
quote:
Originally posted by SirGrendel:
Got some problems: on threads with a lot of postings, when someone is sending a new message, the "refresh"-page would not show up, instead you see a white page.
Then you see the new message in Latest Threads but if you go to this page, the new message will not show up, till I delete the cache.

Sorry for my poor englisch, I hope its understandable.

I've never seen this problem. I'm using two different systems here to test the UBB and Latest Threads code. On one of my systems we use Linux Apache on a p100 with 32megs of ram, and the other system we use an AIX RS6000/IPlanet with 512megs of ram. Both have been working perfectly with the script, no problems.

How many streams are you trying to create?
Is anyone else testing this mod having the same problem?
Anyone with perl knowledge, how about putting perl sleep commands to slow down the process would this help the memory/cpu issue?

Thanks
Casual
I've used part of this hack and it works great for me. Haven't noticed anything delayed or missing.

Using 6.2.1.3

If someone can run SSI or an equivilent on thier site, I have a way to be able to place your lates information inside a text file. I simply call it vis SSI on my front page and it works great!
I place this code in ubb_new_reply.cgi:

open (FILE, ">$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");
&lock;
print FILE ("$GotTime{HyphenDate} $GotTime{Time}
n");
print FILE ("$this_subject
By $pubname
n");
print FILE (" $mess_truncatedn");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");

Now, up at the top of the page, I've added a couple of variables. To be honest, I don't remember which ones, so here's what I have:

&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_mods.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_img.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_err.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_misc.cgi");

Within each one of your forum folders, (i.e., Forum1, Forum2, etc.) it will automatically create a page called "_lastpost.txt"

Where did I add the code?
Right below:

# create promo edition of message
$mess_truncated = &promo($message);

Then all you have to do is call the page "_lastpost.txt". I use a script to call mine instead of SSI because it works easier for me.
The same goes with a new topic. Open your ubb_new_topic.cgi and at the top, I've added the same vaiables:

&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_mods.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_img.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_wordlets_err.cgi");
&RequireVars("$vars_config{VariablesPath}/vars_misc.cgi");

Then I found this code:

# index:
# create promo edition of message
$mess_truncated = &promo($message);
&append_index($in{f}, $new_topic_number, $this_forum[6], "000000");

# take viewer back to forum
%vars_style = &LoadStyleTemplate($template_match{transition});
&set_page_elements;
&Transition("$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_topic;f=$in{f};t=$new_topic_number", "$vars_wordlets{thanks_for_posting}", "$in{topic_subject}");

$in{t} = $new_topic_number;
$this_subject = $in{topic_subject};

and placed my code below it:

open (FILE, ">$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");
&lock;
print FILE ("$GotTime{HyphenDate} $GotTime{Time}
n");
print FILE ("$in{topic_subject}
By $pubname
n");
print FILE (" $mess_truncatedn");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/_lastpost.txt");
I'm sorry to keep posting so much, but I should add that when the code goes inside the ubb_new_topic.cgi, it creates the same thing inside each one of your forum folders. If you want to create a seperate folder specifically for new topics that have been created, all you have to so do is replace "_lastpost" with something else.
Posted By: Kel Re: [6.2x] Latest Threads v2.0.2 (update 6/25/02) - 05/01/2002 5:06 PM
OH MY!.... I was going to give this a try... but it's starting to look WAY too complicated... any way to simplify this just a tad bit?
quote:
Anyone with perl knowledge, how about putting perl sleep commands to slow down the process would this help the memory/cpu issue?

Yes, this should do the trick, I think.
The thread I was talking about has 938 Postings. The problems started by somewhat around 920. But that was, when I build in this hack. Don't know, if these are a lot of postings in one thread.
quote:
Originally posted by SirGrendel:
Yes, this should do the trick, I think.
The thread I was talking about has 938 Postings. The problems started by somewhat around 920. But that was, when I build in this hack. Don't know, if these are a lot of postings in one thread.

I don't know if adding a couple of sleep commands will help your cpu/memory issue. However, if you want to try below are some sleep command entrys that I thought would most help your problem. This will slow down your posting by 4 seconds. If it works try removing a couple of sleep commands or until it errors out again and if it doesnt work add more seconds to the sleep command.

For those of you who are running Latest_threads without a problem please ignore this message and do not re-hack your files.

MOD:
In ubb_lib_posting.cgi

FIND
&RequireCode("$vars_config{CGIPath}/ubb_latest_threads.cgi");
&Latest_Threads;

REPLACE WITH:

sleep 1;
&RequireCode("$vars_config{CGIPath}/ubb_latest_threads.cgi");
&Latest_Threads;
sleep 2;

Then in ubb_latest_threads.cgi

FIND

foreach $key (@topics) {

ADD BELOW
sleep 1;
Thank you. I will try this and give feedback to you as soon as possible.
Doesn't work frown

I don't get the "take you back to the thread"-page. All I get after posting is:

[code][/code]Thats the whole code, nothing more.

Thank you anyway.
Sorry for the incorrect posting - I gather this is the right place. Slap me down again if it's not smile

I just installed latest threads on a text box and it works almost perfectly (could not get UBBnews to work after many hours). This is great, except on my SSI page it simply won't update unless I explicitly refresh the browser (ctrl-refresh). Even after turning the browser off and back on, I still need to refresh. Is there anything to force it to update? Did I miss something or is this a bug? Thanks.
quote:
Originally posted by Fred Lappert:
Sorry for the incorrect posting - I gather this is the right place. Slap me down again if it's not smile

I just installed latest threads on a text box and it works almost perfectly (could not get UBBnews to work after many hours). This is great, except on my SSI page it simply won't update unless I explicitly refresh the browser (ctrl-refresh). Even after turning the browser off and back on, I still need to refresh. Is there anything to force it to update? Did I miss something or is this a bug? Thanks.

Post the URL to your forum website. I'll take a look at it and get back to you.

Thanks
Casual
Oops, I meant "test" box, not "text" box. I thought it might be a cookie thing or refresh issue on the page itself. OK, I also put it on a site I'm helping out with and it has the same problem. As new messages are posted on the forum, the page doesn't automatically update in my browser from the SSI page. If I hit ctrl-refresh (in IE6.0) it will update, but not unless I take that route. Go to www.tenant.net. It's limited to six entries (for space reasons). Thanks.
How the heck is everyone putting the Latest Threads to show up on their front page?
Is Latest Threads also set to refresh at 0:00?
And if yes: where can I remove this?
YoungTaeByun: with ServerSideIncludes.

e.g.:
in index.shtml:
Code
[/code]in index.php: [code]
I think that it is showing the login name and not the publicly displayed name for the topic starter.
Jap, since the first version...

My problem is solved, it doesn't reset at 0:00.
Sorry for the interruption.
Hey, i am running LThreads on 6.2.1 and it seems to be working just fine, but users report this error a whole lot (at least a few times daily)

I am on a windows server, so permissions don't come into play for me.. I am thinking it may be when there are simultanious postings? Any way to fix this from coming up?

Thanks!

<<
After you post, its supposed to take you back to the post you replied to or created, but this sometimes happens:

FYI
Sorry, UBB has encountered an unexpected, fatal error. This error is extremely abnormal. Please contact the board administration. The error text is:
Can't open 'D:/InetPub/wwwroot/wrestleworld/forums/noncgi/lt/latest_threads_1.html'. Permission was denied - please ask the administrator to check the permissions on that file/directory!The exact error returned by the operating system is:Permission denied
>>>
Code
[/code]in index.php: [code]
[/b]

Thanks that helped ... actually check out my front page @ http://ColoradoF-Body.com.
I have one more problem if someone could help me.
When a user clicks on one of the topics, the whole screen changes to the UBB ... it should only change in frames leaving the top menu intact.
What is this HTML dummy missing? tipsy
Posted By: Kel Re: [6.2x] Latest Threads v2.0.2 (update 6/25/02) - 05/13/2002 6:49 PM
quote:
* STEP 4 - TESTING

At this point you can test the mod by posting a topic:

After a post has been made, you should get your latest_threads
output file in /noncgi_dir/lt/latest_threads_1.html

I don't know if I missed something or what... but there is no 'lt' directory in my non-cgi directory... was I supposed to create one? ... was one supposed to have been created when I did a test post? ... this is a bit unclear to me.... help please???? confused

*Edit... found it... laugh
Posted By: Kel Re: [6.2x] Latest Threads v2.0.2 (update 6/25/02) - 05/13/2002 7:17 PM
quote:
Originally posted by Rattler:
I think that it is showing the login name and not the publicly displayed name for the topic starter.

Yep... this is true... any way to fix this?

*Edit....

Ok this is a bit weird...

In the var_latest_threads_1.cgi file, if you set the 'display' at 12, you get the login name instead of the publicly displayed name... but if you change the 'display' to 6, then you get the publicly displayed name... confused
I am still having problems.. Can anyone help me out here? Same issues as the reply a few before this one.

Thanks!! If anyone can help out, it'd be appreciated!!
Hi everyone, sorry I haven't responded to everyones questions. I'm really busy at the moment with my job and won't be able to respond to questions or look at problems until Monday May 27th.

Thanks

Casual
Hi,

All Works Fine on my 6.3 But i do have 1 question.

How do i display the ouput file from a diffent site?
I have 2 sites, my web site at www.mydomain.com and my forums at forum.mydomain.com they are both on the same phisycal server just using two virtual sites. My server is a raq4 running appache.

Thanks in advance
Hi, Bug in Iframe Section,

The line
Code
[/code]Should be 
[code]
This allows the header and footer bit to work.

I Hope !!

Paul
hi,

I am working on ubb 6.2.1

on the Windows 2K server, ubb 6.2.1 has Latest Threads v1.2.7
installed and it is working fine

have been asked to look at upgrading ubb 6.2.1 to 6.3.0 and at the same time keep
Latest Threads v1.2.7 working as it does currently

installed ubb v6.2.1 with Latest Threads v1.2.7 on my test machine
(Windows 2k Professional) and did the upgrade to version 6.3.0

lt.cgi threw up an error page that started like this:-

LoadStyleTemplate no longer takes a number.Backtrace: lt.cgi:148 -> sub main::RequireCode


where can i start in getting Latest Threads back to normal?

any help would be appreciated . .

thanks!

pang ngan
Two things:

1) I have this working in UBB 6.1.0.3
http://www.skusaonline.com/

Seems to work well for those that can't upgrade to 6.2 or 6.3

2) Is there any way to force LT2 to recreate the index pages, without actually updating UBB?

Example, I edit the configuration for one of my streams, and want to refresh the display, but don't want to post a new topic.

Ok, three things...

3) I have a problem with the sister site script. I have it working with the LT2 update, but a problem remains that also existed with LT1... When you go back to the page with the SSI call, the page partially loads, it does not automatically reload the SSI when using the browser's "Back" button. I tried adding a "No Cache" meta tag to the page header, but still have the problem. "Reload" typically fully reloads the page, but not always. Server issue, HTML issue, or script issue?

Here's the page:
http://www.promototour.com/

Thanks,
Greg
Does anyone have a copy of 2.0 laying around? The current download of 2.0.1 doesn't have the full instructions to get this hack working.
What instructions are missing?
The only instructions 2.0.1 has is for re-hacking the ubb_lib_posting.cgi file. Could swear there was more.
Well does it work when you do that?
Nope. Gives me an error abut undefined subroutine. &Last_Threads is the cause.
Did you hack all the files correctly?
As I said, it only had instructions for re-hacking the single file. There was nothing else for any other UBB files.
Thats all you had to do though. I remember doing that when I installed it.
Got it working. No more problems.
Im having a problem with the public_lt template file.
it doesnt seem to work when i try to change things around. I can't figure out why it isnt working but when i try to make the text black and put a little - symbol infront of it nothing happens. looks like this:
-$stat_file[4]
wtf this template isnt even in use!!!1
i tried deleting it and posting to see if it made a difference and it just looked the exact same.
why cant i use the template????????
hmm i set display to = 0 in vars_latest threads and i just get a blank white page.
Check your permissions of that file.
Newbie here, I've done everything the instructions say, but I can't seem to access the html file. It keeps saying I don't have permission to view the file (its on 666) I can't change permissions on it either (It's not my server).
Well you will need to change those permissions for it to work.
So, I need to change the permissions on the latest_threads_1.html file? It just seems kinda odd the instructions didn't say anything about it and why all of a sudden, the server won't allow me to change them.
Hi, everyone, just wanted to let everyone know that I've updated the new LT 2.0.2. I've tested the script on both UBB v6.2.x and 6.3.x and Latest threads works great on both UBB version.

Please continue to ask questions, help and support at the new 6.3 topic location:
https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=31;t=000067

Plese do not post any more replys here in the 6.2 section since I will not be checking them. Thanks

Casual
Good to see you finally updated the version. smile
nice it works perfect for me now smile ...
one question though: i use the custom template, and when you see the latest thread, the most recent post is in huge font, and all the older ones are normal. do you know why this is?
nm i fixed it myself
© UBB.Developers