Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+<?php
2
+if(!defined("_CHARSET")) exit( );
3
+	$count = 0;
4
+	$content = "";
5
+	$use_tpl = isset($blocks['recent']['tpl']) && $blocks['recent']['tpl'] ? true : false;
6
+	if(isset($blocks['recent']['num'])) $numupdated = $blocks['recent']['num'];
7
+	else $numupdated = 1;
8
+	$result5 = dbquery(_STORYQUERY." ORDER BY stories.updated DESC LIMIT $numupdated");
9
+	while($stories = dbassoc($result5))
10
+	{
11
+		if(!isset($blocks['recent']['allowtags'])) $stories['summary'] = strip_tags($stories['summary']);
12
+		$stories['summary'] = truncate_text(stripslashes($stories['summary']), (!empty($blocks['recent']['sumlength']) ? $blocks['recent']['sumlength'] : 75));
13
+		if(!$use_tpl) $content .= "<div class='recentstory'>".title_link($stories)." "._BY." ".author_link($stories)." ".$ratingslist[$stories['rid']]['name']."<br />".stripslashes($stories['summary'])."</div>";
14
+		else {
15
+			$tpl->newBlock("recentblock");
16
+			include(_BASEDIR."includes/storyblock.php");
17
+		}
18
+
19
+	}	
20
+	if($use_tpl && dbnumrows($result5) >0) $tpl->gotoBlock("_ROOT");	
21
+	unset($updated, $result5);
22
+?>
0 23
\ No newline at end of file