Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Newest Topics 4 YaBB 2.4 (Read 20800 times)
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Newest Topics 4 YaBB 2.4
Jun 30th, 2009 at 7:36am
Print Post  
Newest Topics - Version 1.3


Description:

This mod display the newest 5, 10, 25 or 50 topics by onclick on the value over a drop-down field on a separate site or/and display the newest xx topics in a part of your info-center. Enable/disable the one or the other or both settings in your Admin Panel - Forum Settings - Tab Posting and set the value to display the last xx topics.

Screenshot 1 - Admin Settings:



Screenshot 2 - Info Center:



Screenshot 3 - Display on a separate site:



Mod Package:

  • newest_topics_1_3.mod
  • newest_topics_german_du_patch_1_3.mod
  • newest_topics_german_patch_1_3.mod


Installation:

1) Modify YaBB files using BoardMod or manually.
2) Load modified files to your server in ASCII mode.

  • Admin/Modlist.pl
  • Admin/ManageTemplates.pl
  • Admin/NewSettings.pl
  • Admin/Settings_Main.pl
  • Languages/English/BoardIndex.lng
  • Languages/English/Main.lng
  • Languages/English/Admin.lng
  • Sources/SubList.pl
  • Sources/BoardIndex.pl
  • Sources/Recent.pl
  • Templates/default/BoardIndex.template
  • Templates/yabb21/BoardIndex.template

Transfer all changed files to your server.

Mod History:

Version 1.0 - 20.07.2008 (BETA VERSION) for YaBB 2.2.1-2.2.3
Version 1.1 - 20.07.2008 (BETA VERSION) for YaBB 2.2.1-2.2.3
Version 1.2 - 22.07.2008 (FINAL VERSION) for YaBB 2.2.1-2.2.3 )
Version 1.3 - 30.06.2009 for YaBB 2.4

Feedback welcome .....  Wink
« Last Edit: Feb 4th, 2010 at 3:25pm by ThM »  

newest_topiics_1_3.zip ( 6 KB | Downloads )

Greeting ThM
Back to top
 
IP Logged
 
pyragony
Junior Member
**
Offline


abgeschlafft und ausgebufft

Posts: 85
Location: Eichenau
Joined: Apr 26th, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #1 - Jul 1st, 2009 at 7:49pm
Print Post  
Hi ThM,

is a little error in Step 13, when you have installeted "User Today".

I have moddify.


Code
Select All
<search for>
		$boardindex_txt{'803'} <b>{yabb mostbots}</b> $maintxt{'30'} {yabb mostbotsdate}.
		</div>
	</td>
</tr>
<!-- ## Start Users Today mod ## -->
{yabb userstoday}
<!-- ## End Users Today mod ## -->
</table><br />
</search for> 


  

Back to top
WWW  
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #2 - Jul 3rd, 2009 at 7:26am
Print Post  
There is no mod error in step 13. Some Mods change a varity of code in a varity of files and it's impossible to make it compatible with all other mods. That would presuppose that all mods are installed.

But thx for the hint. If i find time i'll check this.
  

Greeting ThM
Back to top
 
IP Logged
 
Francesco
New Member
*
Offline


I love YaBB 2,3

Posts: 27
Joined: Mar 21st, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #3 - Jul 3rd, 2009 at 12:45pm
Print Post  
Hallo ThM
Hilfe  Bitte

www.meine-hunde.de/cgi-bin/Tierforum1/YaBB.pl

ist da und lauft nicht  Sad

  
Back to top
IP Logged
 
pyragony
Junior Member
**
Offline


abgeschlafft und ausgebufft

Posts: 85
Location: Eichenau
Joined: Apr 26th, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #4 - Jul 3rd, 2009 at 9:39pm
Print Post  
@ Francesco

I would set times the rights of access correctly. Filezilla does not make everything automatically. In addition, which has that to search here? But there is the Yabbworldforum.
  

Back to top
WWW  
IP Logged
 
MasterKarman
Junior Member
**
Offline


YaBB 2.5.2

Posts: 90
Location: Karmanville
Joined: Feb 14th, 2009
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #5 - Jul 5th, 2009 at 2:21pm
Print Post  
Great mod. I like how it doesn't show members only topics unless you are logged in. Installed fine with 38 other mods.
  

Now using YaBB 2.5.2 with 40+mods
"The world is a dangerous place to live. Not because of the evil in it, but because of the people who don't do anything about it."


Back to top
IP Logged
 
Fps_Brian
Full Member
***
Offline



Posts: 130
Location: Beach Haven
Joined: Aug 14th, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #6 - Jul 14th, 2009 at 6:23pm
Print Post  
Will this install on 2.3 forums?

It's showing up on the custom page,
but not in the forum index?
  

www.omgot.org
65+ mods installed
Back to top
IP Logged
 
chillipepper
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 189
Joined: Jul 1st, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #7 - Jul 30th, 2009 at 2:36am
Print Post  
Installed ok.good job  :2thumbsup:
  
Back to top
 
IP Logged
 
NikonErik
New Member
*
Offline


I Love YaBB 2!

Posts: 2
Joined: Aug 30th, 2009
Re: Newest Topics 4 YaBB 2.4
Reply #8 - Sep 8th, 2009 at 11:48pm
Print Post  
I am using "Newest Topic Overview for YaBB 2.4 Forum Software - v1.3"

In our YaBB 2.1 we have "Recent Posts Bar Mod  - v1.3" installed. We have the Recent Posts mod at the bottom of the home page and at the bottom of each thread above the footer in each case. This makes it really easy to jump to the next thread we want to read.

For the YaBB 2.4 Forum Software installation, I have the Newest Topic Overview Mod right where I want it on the Home page.

How can I have this Mod at the bottom of each thread-page above the footer so the viewer can easily jump to another topic if they want?
  
Back to top
 
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #9 - Sep 9th, 2009 at 11:29am
Print Post  
NikonErik wrote on Sep 8th, 2009 at 11:48pm:
How can I have this Mod at the bottom of each thread-page above the footer so the viewer can easily jump to another topic if they want?


Quick Solution:

In MessageIndex.pl search for:

Code
Select All
	$messageindex_template =~ s/({|<)yabb pageindex bottom(}|>)/$pageindex2/g; 



and add after:

Code
Select All
# Start part from the newest topic mod in this file:
{
	# Can pass items to this sub, to decide what to show:
	my ($show_count, $show_board, $show_poster, $show_views, $show_replies, $show_date) = @_;

	my $display = $INFO{'display'} || $numnewesttopics;
	if ($display < 0) { $display = 5; }

	# display newest_topics
	if ($display)
	{
		$show_count = 1;
		$show_board = 1;
		$show_poster = 1;
		$show_views = 1;
		$show_replies = 1;
		$show_date  = 1;
	}

	my (@memset, @categories, %data, $numfound, $curcat, %catname, %cataccess, %catboards, $openmemgr, @membergroups, %openmemgr, $curboard, @threads, @boardinfo, $i, $c, @messages, $tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $mns, $mtime, $counter, $board, $notify);

		foreach $catid (@categoryorder) {
		$boardlist = $cat{$catid};

		(@bdlist) = split(/\,/, $boardlist);
		($catname, $catperms) = split(/\|/, $catinfo{$catid});
		$cataccess = &CatAccess($catperms);
		if (!$cataccess) { next; }

		foreach $curboard (@bdlist) {
			($boardname{$curboard}, $boardperms, $boardview) = split(/\|/, $board{$curboard});

			my $access = &AccessCheck($curboard, '', $boardperms);
			if (!$iamadmin && $access ne "granted") { next; }

			$catid{$curboard} = $catid;
			$catname{$curboard} = $catname;

			fopen(REC_BDTXT, "$boardsdir/$curboard.txt");
			for ($i = 0; $i < $display && ($buffer = <REC_BDTXT>); $i++) {
				($tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate) = split(/\|/, $buffer);
				chomp $tstate;
				if ($tstate !~ /h/ || $iamadmin || $iamgmod) {
					$mtime = $tdate;
					$data[$numfound] = "$mtime|$curboard|$tnum|$tusername|$tname|$treplies";
					$numfound++;
				}
			}
			fclose(REC_BDTXT);
		}
	}

	@data  = sort {$b <=> $a} @data;
	$numfound = 0;


	for ($i = 0; $i < @data; $i++) {
		($mtime, $curboard, $tnum, $tusername, $tname, $treplies) = split(/\|/, $data[$i]);

		fopen(REC_THRETXT, "$datadir/$tnum.txt") || next;
		while (<REC_THRETXT>) { $message = $_; }

		# get only the last post for this thread.
		fclose(REC_THRETXT);
		chomp $message;

		if ($message) {
			($msub, $mname, $memail, $mdate, $musername, $mreplies, $micon, $mattach, $mip, $message, $mns) = split(/\|/, $message);
			$messages[$numfound] = "$curboard|$tnum|$treplies|$tname|$tusername|$msub|$mname|$mdate|$musername";
			$numfound++;
		}
		if ($numfound == $display) { last; }
	}
	&LoadCensorList;

	$counter = 1;

	$nt .= qq~

<table class="windowbg2" cellpadding="4" cellspacing="1" border="0"width="100%">
<tr>
		<div style="float: left; text-align: left;">
		<span class="small">
		<td class="windowbg2" align="left"><span class="small">
		    <b>$newest_topics{'01'}</b></span>
		</td>
		<td class="windowbg2" align="left"><span class="small">
		    <b>$newest_topics{'02'}</b></span>
		</td>
	 	    <td class="windowbg2" align="left"><span class="small">
		<b>$newest_topics{'03'}</b></span>
		</td>
	 	    <td class="windowbg2" align="left"><span class="small">
		<b>$newest_topics{'04'}</b></span>
		</td>
	 	    <td class="windowbg2" align="center"><span class="small">
		<b>$newest_topics{'05'}</b></span>
		</td>
	 	    <td class="windowbg2" align="center"><span class="small">
		<b>$newest_topics{'06'}</b></span>
		</td>
	 	    <td class="windowbg2" align="left"><span class="small">
		<b>$newest_topics{'07'}</b></span>
		</td>
		</span>
		</div>
</tr>
~;
	for ($i = 0; $i < $numfound; $i++) {
		chomp $messages[$i];
		($board, $tnum, $c, $tusername, $tname, $msub, $mname, $mdate, $musername, $mreplies, undef) = split(/\|/, $messages[$i]);
		chomp $musername;
		$msub = &Censor($msub);
		&ToChars($msub);
		if ($musername ne 'Guest' && -e "$memberdir/$musername.vars") {
			&LoadUser($musername);
			&MessageTotals("load",$tnum);

			$mname = exists ${$uid.$musername}{'realname'} ? ${$uid.$musername}{'realname'} : $mname;
			$mname ||= $maintxt{'470'};
			$mname = qq~<a href="$scripturl?action=viewprofile;username=$useraccount{$musername}" title="$maintxt{'27'}: $mname">${$uid.musername}{'realname'}$format{$musername}</a>~;
		}
		elsif($musername ne 'Guest') {
			$mname ||= $maintxt{'470'};
		}
		$mname ||= $maintxt{'28'};
		$mdate = &timeformat($mdate);

		# Strip all Re: from subject lines
		# only if it occurs at the start.
		$msub =~ s/\ARe: //ig;

		# Change [m] to Moved:
		$msub =~ s/\[m.*?\]/$maintxt{'758'}/;

		$nt .= qq~	    <tr class="windowbg">~;


		if ($show_count) {
			$nt .= qq~
		<td valign="middle" align="left"><span class="small">$counter.</span></td>
~;
		}

		if ($show_board) {
			$nt .= qq~
		 <td valign="middle" align="left"><span class="small"><a href="$scripturl?board=$board">$boardname{$board}</a></span></td>
~;
		}

		$nt .= qq~
	 	    <td valign="middle" align="left"><span class="small"><a href="$scripturl?num=$tnum">$msub</a></span></td>
~;

		if ($show_poster) {
			$nt .= qq~
	 	    <td valign="middle" align="left"><span class="small">$tusername</span></td>
~;
		}

		if ($show_views) {
			$nt .= qq~
	 	    <td valign="middle" align="center"><span class="small">${$tnum}{'views'}</span></td>
~;
		}

		if ($show_replies) {
			$nt .= qq~
	 	    <td valign="middle" align="center"><span class="small">${$tnum}{'replies'}</span></td>
~;
		}

		if ($show_date) {
			$nt .= qq~
			<td valign="top" align="left"><font size="1"><a href="$scripturl?num=$tnum/$c#$c">$img{'lastpost'}</a> $mdate<br />$newest_topics{'07a'}&nbsp;$mname</td>
	    </tr>
~;
		}

		++$counter;
	}

	$nt .= qq~
	</div>
	</table>
~;

}
		$messageindex_template =~ s/({|<)yabb nt(}|>)/$nt/g;
# End part from the newest topic mod in this file: 



In MessageIndex.template (default template) search for:

Code
Select All
<!-- Icon and access info start --> 



and add before:

Code
Select All
<!-- Newest board topics block start -->
~;
if($lastnewesttopics == 1) {
$messageindex_template .= qq~
<br />
<table class="bordercolor" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
	<td class="titlebg" width="1%" height="25" valign="middle">
		&nbsp;
	</td>
	<td class="titlebg" width="99%" height="25" valign="middle">
		<span class="ie6alpha">$newest_topics{'08'} $numnewesttopics $newest_topics{'09'}</span>
	</td>
</tr>
</table>
<table class="bordercolor" cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
	<td class="windowbg" width="5%" valign="middle" align="center">
		<img src="$imagesdir/info.gif" border="0" alt="" />
	</td>
	<td class="windowbg2" valign="top" align="center">
		<div class="small" style="float: left; width: 100%; text-align: left;">{yabb nt}</div>
	</td>
</tr>
</table><br />
~;
}
$messageindex_template .= qq~
<!-- newest board topics block end --> 



Hope it runs. If I have more time, I will update the mod and add new settings.
  

Greeting ThM
Back to top
 
IP Logged
 
NikonErik
New Member
*
Offline


I Love YaBB 2!

Posts: 2
Joined: Aug 30th, 2009
Re: Newest Topics 4 YaBB 2.4
Reply #10 - Dec 20th, 2009 at 2:02am
Print Post  
Hello,

Well, I finally got around to applying this modification! It works well.

Thank you!
  
Back to top
 
IP Logged
 
Fps_Brian
Full Member
***
Offline



Posts: 130
Location: Beach Haven
Joined: Aug 14th, 2008
Gender: Male
Re: Newest Topics 4 YaBB 2.4
Reply #11 - Jan 26th, 2010 at 9:20pm
Print Post  
Great mod, I got it running on a 2.3.1 with the display on top in messageindex!
  

www.omgot.org
65+ mods installed
Back to top
IP Logged
 
Zak
New Member
*
Offline


and the alien mindbenders

Posts: 7
Joined: Nov 30th, 2005
Re: Newest Topics 4 YaBB 2.4
Reply #12 - Mar 17th, 2010 at 9:06am
Print Post  
installed it before "user today" and had no problems.

great mod, thanks!
  
Back to top
 
IP Logged
 
Simps
Junior Member
**
Offline


Gruellered!!!

Posts: 60
Location: Midlands, UK
Joined: Dec 24th, 2007
Re: Newest Topics 4 YaBB 2.4
Reply #13 - Mar 20th, 2010 at 12:26pm
Print Post  
Just installed this. Had to do a work a round for it to work with "Users Today" but all works fine.
Superb mod thank you.
Added a new tab next to home with the url for 15 most recent posts, no more missing posts now.

Cheesy Grin
  
Back to top
WWW  
IP Logged
 
Simps
Junior Member
**
Offline


Gruellered!!!

Posts: 60
Location: Midlands, UK
Joined: Dec 24th, 2007
Re: Newest Topics 4 YaBB 2.4
Reply #14 - Mar 27th, 2011 at 10:44pm
Print Post  
I have noticed a problem with this today.
When a guest posts, the post count info disappears (see Picture)
It displays fine when looking through the actual forums.

Can anyone help with this please.
Thank You  Smiley
  

missing_post_count.JPG ( 24 KB | Downloads )
missing_post_count.JPG
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint