UBB.Dev
Posted By: IntelliCents Last posts on front page (index.html) - 04/15/2001 1:38 PM
I've been working in circles trying to figure out how to get the last few posts to wind up on my front page.

I'm not an excellent programmer, in fact, I'm not a programmer at all. But I do know how to follow instructions very well. I've seen this on several sites, i.e., midnightcafe.com and even ubbdev.com, but for the life of me, I can't figure out how to do it myself.

I have a stock site, so it's vital that when new visitors come to my site, the first thing they see is the "Hot Stock Tips" that have been posted.

If anyone can help, I'd really appreciate it. By the way, I grabbed the post reply and new topic buttons from here. They're the only professional looking buttons I could find!
Posted By: Matt Jacob Re: Last posts on front page (index.html) - 04/15/2001 8:04 PM
I couldn't tell what version you're using, because you changed the copyright notice so it's not visible to the eye. Please change it back to being visibile, and then I can help you.
Quote
quote:
I apologize, but I must have done it not knowing what I was doing. I'll get it changed back. I wanted the logo instead of text. I just downloaded the latest version which, I believe, is 6.04 if I'm not mistaken.

Any help would be greatly appreciated. Thank you for repsonding as well.
It's version 6.04a
Posted By: viking30 Re: Last posts on front page (index.html) - 04/18/2001 11:32 AM
I too would like some help on this too please.
Nanapong ubb board
Posted By: IntelliCents Re: Last posts on front page (index.html) - 04/18/2001 12:14 PM
I'm sure t's not going to be easy, but I know it can be done, and I'm willing to put the work into it.

It just makes your front page look so much more professional when it updates automatically with the last posts.

If anyone out there can help, it would be GREATLY appreciated!
Still wondering if someone can help with this. I've managed to place the last date and time of a few boards on my front page, so maybe that's all I should worry about.

I'd like to be able to take it a step further and indicate, without having to manually type in the name, which boards were active. Here's my front page.

You'll see that I've typed in the name of the board, and under that is the date and time of the most recent post.

Basically, I'd like to take the results from the "Today's Active Topics" page and plave it on my index.html page... any help would be GREATLY appreciated!
Posted By: Matt Jacob Re: Last posts on front page (index.html) - 04/23/2001 2:19 PM
Search for the hack called "active topics".
After much trial and error, I finally figured it out...

Here was the problem...

I wanted to post information about the most recent threads on my index.html page.

The possible solution was to find a script that could read what the .cgi file had in it. The problem was that it read EVERYTHING! i.e., 0000001.cgi...

00000002|hello|intellicents|04222001|7:14am

It wasn't like that, but you get the idea. It read the symbols, everything.

I created a file called lastmessage.txt and placed it in each of the Forums, i.e., Forum20, Forum 21, etc.

chmod'd it to 0666, and left it blank.

I then went to the ubb_new_reply.cgi file, and where it says

open (FILE, ">$vars_config{NonCGIPath}/$exact_path/lastnumber.file");
&lock;
print FILE ("$last_topic_numbern");
print FILE ("$total_topic_countn");
print FILE ("$total_post_countn");
print FILE ("$this_subjectn");
print FILE ("$pubnamen");
print FILE ("$in{msg_icon}n");
print FILE ("$in{t}n");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/lastnumber.file");


I put a line just below it that looked like this...

open (FILE, ">$vars_config{NonCGIPath}/$exact_path/lastmessage.txt");
&lock;
print FILE ("$pubnamen");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/lastmessage.txt");

And now, when someone posts a message, it writes to my file called lastmessage.txt.

Then, I only need a script that can read a .txt file and place it on my front page!

If you've got any questions, I'll be more than happy to explain it in more detail... I'm just a little excited right now.

I couldn't get any responses, so I had to figure it out on my own!
Posted By: Matt Jacob Re: Last posts on front page (index.html) - 04/23/2001 5:51 PM
Like I said above: https://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=20&t=000140
© UBB.Developers