Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Forum Headlines (Read 51 times)
Anthony Haslage
New Member
*
Offline


I am everywhere you want
to be!

Posts: 6
Joined: Dec 20th, 2007
Gender: Male
Forum Headlines
Dec 20th, 2007 at 12:07pm
Print Post  
Hola,

I was wondering if someone could make a simple Perl or PHP script to display a specific number of the most recent posts.  I am assuming it is not already a forum feature.

My idea is it read the Messages directory for the date of the most recent five .txt files and output into a different file named headlines.txt the bit in each file that shows the user's name and the subject header, then links to the post on the forum using the full url and the user's profile.

Example:
&#149; <a href="http://www.../YaBB.pl?cat?...">Subject</a> - <a href="http://www.../YaBB.pl?profile..blah">User's Name</a><br>

I tried for three hours to do it in PHP and I just do not know enough.

Thanks!
  

Haslage Net Electronics
http://www.haslage.net/
Back to top
WWW  
IP Logged
 
alexant
Junior Member
**
Offline


I love boardmod.org!

Posts: 86
Joined: Apr 5th, 2007
Gender: Male
Re: Forum Headlines
Reply #1 - Dec 20th, 2007 at 12:54pm
Print Post  
Check out my board: http://www.mind-n-magick.com/forum/YaBB.pl

In the "Info Center", I created a "Recent Posts" section that lists the 5 most recently posted topics. Is that what you are talking about?

If you are not running 2.2 you need the RSS mod. I use "Carp" to parse the feed, and a script (can be found on the Carp website) to add it to the board.

Carp can be found here: http://www.geckotribe.com/rss/carp/
  
Back to top
WWW  
IP Logged
 
qersys
Senior Member
****
Offline


Yes, I am

Posts: 342
Location: SF
Joined: Dec 29th, 2002
Gender: Male
Re: Forum Headlines
Reply #2 - Dec 20th, 2007 at 1:37pm
Print Post  
  
Back to top
IP Logged
 
Anthony Haslage
New Member
*
Offline


I am everywhere you want
to be!

Posts: 6
Joined: Dec 20th, 2007
Gender: Male
Re: Forum Headlines
Reply #3 - Dec 20th, 2007 at 1:51pm
Print Post  
I wanted something exportable to my main web page.  I do have a script that translates CSS to html, never thought of using it.

I did try it and the RSS does not seem to output anything it can see.  Wierd.  It displays the forum name, location to its index and the page title, just not post links.

Thanks for the help!
  

Haslage Net Electronics
http://www.haslage.net/
Back to top
WWW  
IP Logged
 
alexant
Junior Member
**
Offline


I love boardmod.org!

Posts: 86
Joined: Apr 5th, 2007
Gender: Male
Re: Forum Headlines
Reply #4 - Dec 20th, 2007 at 5:26pm
Print Post  
Quote:
I wanted something exportable to my main web page.  I do have a script that translates CSS to html, never thought of using it.

I did try it and the RSS does not seem to output anything it can see.  Wierd.  It displays the forum name, location to its index and the page title, just not post links.

Thanks for the help!

I also use Carp to place a list of recent topics on my website's main page, along with news feeds, and a penpal service I run. The index page is written in php. There may be an error in the code you place on the page. I would double check it.
  
Back to top
WWW  
IP Logged
 
Anthony Haslage
New Member
*
Offline


I am everywhere you want
to be!

Posts: 6
Joined: Dec 20th, 2007
Gender: Male
Re: Forum Headlines
Reply #5 - Dec 21st, 2007 at 4:47am
Print Post  
From what I have been reading, the new RSS in YaBB may be flawed.  My RSS to PHP program is seeing a headline now, but an error.

RSS is on here:
http://www.haslage.net/cgi-bin/forums/YaBB.pl

The RSS to PHP outputs here:
http://www.haslage.net/
  

Haslage Net Electronics
http://www.haslage.net/
Back to top
WWW  
IP Logged
 
alexant
Junior Member
**
Offline


I love boardmod.org!

Posts: 86
Joined: Apr 5th, 2007
Gender: Male
Re: Forum Headlines
Reply #6 - Dec 21st, 2007 at 1:01pm
Print Post  
I think I know why. It appears your boards and posts are not viewable to guests.
  
Back to top
WWW  
IP Logged
 
Anthony Haslage
New Member
*
Offline


I am everywhere you want
to be!

Posts: 6
Joined: Dec 20th, 2007
Gender: Male
Re: Forum Headlines
Reply #7 - Dec 21st, 2007 at 2:18pm
Print Post  
How do I enable guest viewing, while keeping them from posting?
  

Haslage Net Electronics
http://www.haslage.net/
Back to top
WWW  
IP Logged
 
alexant
Junior Member
**
Offline


I love boardmod.org!

Posts: 86
Joined: Apr 5th, 2007
Gender: Male
Re: Forum Headlines
Reply #8 - Dec 21st, 2007 at 5:06pm
Print Post  
Before enabling guests again you need to edit each category and board you want viewable. In the Categories, deselect all member groups. This makes that Category viewable to everyone. Then edit each board. Select ALL member groups under "Allowed to start topics," "Allowed to reply to topics," and "Allowed to create polls," but leave all member groups deselected under "Allowed to view topics." This allows posts to be viewable to guests, but they cannot post or reply. Then go to Forum Settings ==> Members, and check "Enable Guest Posting." They will not actually have posting privileges in boards because each board will be only allow member groups to post. Enabling Guest posting now allows you to create a support board for login and registration problems that does allow guests to post.
  
Back to top
WWW  
IP Logged
 
Anthony Haslage
New Member
*
Offline


I am everywhere you want
to be!

Posts: 6
Joined: Dec 20th, 2007
Gender: Male
Re: Forum Headlines
Reply #9 - Dec 22nd, 2007 at 9:36am
Print Post  
It works, you rock!

Thanks a ton!
  

Haslage Net Electronics
http://www.haslage.net/
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint