How to add latest forum topics in a block on the Front Page ?
DSF2 19
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
Strange . Try changing the query to:
Strange . Try changing the query to:
$result = DBQuery("SELECT * FROM esselbach_st_stories ORDER BY story_extra1 DESC LIMIT 10");
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
<?php
global $insert;
$stories_data = "";
dbconnect();
$result = DBQuery("SELECT * FROM esselbach_st_stories WHERE story_hook = '0' ORDER BY story_extra1 DESC LIMIT 10");
while ($data = mysql_fetch_array($result))
{
$stories_data .= "<li><b><a href="https://www.contentteller.com/story.php?id=".$data['story_id']."">".htmlentities($data['story_title'])."</a></b><br> (".$data['story_extra1']." downloads)</li>";
}
$EST_TEMPLATE = <<<TEMPLATE
<!-- Template site_header -->
<html>
<head>
<title>$insert[page_title]</title>
<meta name="GENERATOR" content="Esselbach Storyteller CMS System - http://www.esselbach.com" />
<meta name="KEYWORDS" content="$insert[page_keywords]" />
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<link rel="alternate" title="RSS news feed" href="https://www.contentteller.com/$insert[site_url]/backend.php" type="application/rss+xml" />
<style type="text/css">
TD {
FONT-SIZE: 10pt; FONT-FAMILY: Verdana,Arial,Helvetica
}
BODY {
FONT-SIZE: 10pt; FONT-FAMILY: Verdana,Arial,Helvetica
}
</style>
</head>
<body text="#000000" vlink="#df1a1a" alink="#1555b5" link="#000000" bgcolor="#faad58" leftmargin="0" topmargin="5" rightmargin="0">
<script language="JavaScript">
<!--
function FullWin(tag) {
var newWinObj = window.open(tag,'newWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=950,height=680')
}
function addNetscapePanel() {
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
{
window.sidebar.addPanel ("$insert[site_name]", "$insert[site_url]/sidebar.php","");
}
else
{
var rv = window.confirm ("This page is enhanced for use with Mozilla. " + "Would you like to upgrade now?");
if (rv)
document.location.href = " http://www.mozilla.org";
}
}
//-->
</script>
<table cellspacing="0" cellpadding="3" width="100%" align="center" bgcolor="#FFEBCD" border="0">
<tr>
<td>
<table cellspacing="0" cellpadding="1" width="100%" bgcolor="#FFEBCD" border="0">
<tr>
<td>
<table cellspacing="0" cellpadding="2" width="100%" bgcolor="#FFEBCD" border="0">
<tr>
<td>
<a href="https://www.contentteller.com/ http://www.thehotfiles.com"><img src="https://www.contentteller.com/images/logo.png" alt="TheHotFiles.com" border="0" /></a></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--<tr bgcolor="#000000">
<td bgcolor="#000080" colspan="2">
<font face="Arial" color="#FFEBCD" size="2"><b>STORYTELLER CMS SYSTEM</b></font></td>
</tr>-->
<tr>
<td valign="top" width="100%" bgcolor="#FFEBCD">
<table cellspacing="0" cellpadding="2" width="100%" border="0">
<tr>
<td valign="top" width="160" bgcolor="#faad58">
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#faad58" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#b71515">
<font face="Arial" color="#FFEBCD" size="3"><b>Main Menu</b></font></td>
</tr>
<tr>
<td bgcolor="#faad58"><font size="2">
<li><a href="https://www.contentteller.com/index.php"><b>Home Page</b></a><br /></li>
<li><a href="https://www.contentteller.com/category.php"><b>Files Categories</b></a><br /></li>
<li><a href="https://www.contentteller.com/archive.php"><b>File Archive</b></a><br /></li>
<!--<li><a href="https://www.contentteller.com/forums.php">Forums</a><br /></li>-->
<li><b><a href="https://www.contentteller.com/comments.php"><b>Comments</b></a><br /></li>
<!--<li><a href="https://www.contentteller.com/review.php">Reviews</a></li>-->
<!--<li><a href="https://www.contentteller.com/faq.php">FAQ</a><br /></li>-->
<!--<li><a href="https://www.contentteller.com/poll.php">Polls</a></li>-->
<!--<li><a href="https://www.contentteller.com/link.php">Web Links</a><br /></li>-->
<li><a href="https://www.contentteller.com/search.php"><font size="4"><b>Search Files</b></a></li></font>
<li><a href="https://www.contentteller.com/submitstory.php"><b>Submit Hot Files</b></a></li>
<!--<li><a href="https://www.contentteller.com/page.php">Pages</a></li>-->
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#faad58" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#b71515">
<font face="Arial" color="#FFEBCD" size="3"><b>User</b></font></td>
</tr>
<tr>
<td bgcolor="#faad58"><font size="2">
<li><a href="https://www.contentteller.com/register.php"><b>Register</b></a><br /></li>
<li><a href="https://www.contentteller.com/login.php"><b>Login</b></a><br /></li>
<li><a href="https://www.contentteller.com/logout.php"><b>Logout</b></a><br /></li>
<li><a href="https://www.contentteller.com/upanel.php"><b>Control Panel</b></a><br /></li>
<li><a href="https://www.contentteller.com/pm.php"><b>Private Messages</b></a></li>
</font></td>
</tr>
</table>
</td>
</tr>
</table><br>
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-6202451756762997";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as_rimg";
google_cpa_choice = "CAAQjeWZzgEaCGUPemYRwK8bKPG193M";
//--></script>
<script type="text/javascript" src="https://www.contentteller.com/ http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br>
<!-- Blocul cu Top Stories -->
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#faad58" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#b71515">
<font face="Verdana, Arial, sans-serif" color="#FFEBCD" size="2"><b>Latest Downloads</b></font></td>
</tr>
<tr>
<td bgcolor="#faad58"><font size="2">
$stories_data
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#faad58" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#b71515">
<font face="Arial" color="#FFEBCD" size="3"><b>News Feeds</b></font></td>
</tr>
<tr>
<td bgcolor="#faad58"><font size="2">
<li><a href="https://www.contentteller.com/mobile.php">Handheld/PDA</a><br /></li>
<li><a href="https://www.contentteller.com/backend.php?action=help">XML News Feeds</a><br /></li>
<li><a href="https://www.contentteller.com/sidebar.php" target="_blank">View Sidebar</a><br /></li>
<li><a href="https://www.contentteller.com/javascript:addNetscapePanel();">Mozilla Sidebar</a><br /></li>
<br>
<br>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td> </td>
<td valign="top" width="85%">
$insert[login_header]
TEMPLATE;
?>
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
It seems like a problem with the code in the site_header template. Can you post the entire PHP part from that template?
It seems like a problem with the code in the site_header template. Can you post the entire PHP part from that template?
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
It only counts until 9 . Any tips ?
Thank You
It only counts until 9 . Any tips ?
Thank You
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
It shouldn’t make any difference between news from this year and last year
It shouldn’t make any difference between news from this year and last year
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
I managed to work , but it seems that doesnt count news posted this year ..only those from last year www.thehotfiles.com
I managed to work , but it seems that doesnt count news posted this year ..only those from last year www.thehotfiles.com
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
Sorry, it should be:
or in your case story_field2
Sorry, it should be:
DBQuery("UPDATE esselbach_st_stories SET story_field1=story_field1+1 WHERE story_id = '$id'");
or in your case story_field2
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
Ive got this err now
Error: 1054 Unknown column 'extra_field2' in 'field list'
when i try to open any story
Ive got this err now
Error: 1054 Unknown column 'extra_field2' in 'field list'
when i try to open any story
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
Open the template site_header in the template editor and add after:
the following:
and add in the HTML part of the template after:
a new block:
1) Select News/Edit Fields in cadmin => Field 1 => "Enabled, text only" and add "Counter" as Field Text
2) Open story.php in an editor and find:
Then add after this line the following:
3) Open site_header in the template editor and add after:
the following:
Then add a new block in the HTML part:
Thanx , Can i put this block on the left or right side ?
Open the template site_header in the template editor and add after:
global $insert;
the following:
$forums_data = "";
dbconnect();
$result = DBQuery("SELECT * FROM esselbach_st_forumsthreads t, esselbach_st_forums f WHERE f.forum_status = '1' AND t.thread_forum = f.forum_id ORDER BY t.thread_endtime DESC LIMIT 10");
while ($data = mysql_fetch_array($result))
{
$forums_data .= "<li><a href="https://www.contentteller.com/thread.php?id=".$data['thread_id']."">".htmlentities($data['thread_topic'])."</a></li>";
}
and add in the HTML part of the template after:
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
a new block:
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#000000" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#009966">
<font face="Verdana, Arial, sans-serif" color="#ffffff" size="2"><b>Latest Forum Topics</b></font></td>
</tr>
<tr>
<td bgcolor="#ffffff"><font size="2">
$forums_data
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
And allso i want ot know if its possible to make a block with a chart of the most read stories?
1) Select News/Edit Fields in cadmin => Field 1 => "Enabled, text only" and add "Counter" as Field Text
2) Open story.php in an editor and find:
HeaderBlock();
Then add after this line the following:
dbconnect();
DBQuery("UPDATE esselbach_st_stories SET extra_field1=extra_field1+ 1 WHERE story_id = '$id'");
3) Open site_header in the template editor and add after:
global $insert;
the following:
$stories_data = "";
dbconnect();
$result = DBQuery("SELECT * FROM esselbach_st_stories WHERE story_hook = '0' ORDER BY story_extra1 DESC LIMIT 10");
while ($data = mysql_fetch_array($result))
{
$stories_data .= "<li><a href="https://www.contentteller.com/story.php?id=".$data['story_id']."">".htmlentities($data['story_title'])."</a> (".$data['story_extra1']." views)</li>";
}
Then add a new block in the HTML part:
<table cellspacing="0" cellpadding="0" width="160" bgcolor="#000000" border="0">
<tr>
<td>
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<td bgcolor="#009966">
<font face="Verdana, Arial, sans-serif" color="#ffffff" size="2"><b>Top 10 Stories</b></font></td>
</tr>
<tr>
<td bgcolor="#ffffff"><font size="2">
$stories_data
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
And allso i want ot know if its possible to make a block with a chart of the most read stories?
And allso i want ot know if its possible to make a block with a chart of the most read stories?
1 Re: How to add latest forum topics in a block on the Front Page ?
DSF2
OP
19
From: -
From: -
How to add latest forum topics in a block on the Front Page ?
Thanx , Can i put this block on the left or right side ?
Thanx , Can i put this block on the left or right side ?
1 Re: How to add latest forum topics in a block on the Front Page ?
Philipp
From: Austria
Administrator
1342From: Austria
How to add latest forum topics in a block on the Front Page ?
To enable forums topics in a news block you need to configure the news block in cadmin => Other/Websites => NEWS BLOCKS (HEADER) or NEWS BLOCKS (FOOTER)
Then select under "Block" the option "Forums (latest)". In case you are using a third party forum such as vBulletin, you need to select the option "bbwrapper" instead.
To enable forums topics in a news block you need to configure the news block in cadmin => Other/Websites => NEWS BLOCKS (HEADER) or NEWS BLOCKS (FOOTER)
Then select under "Block" the option "Forums (latest)". In case you are using a third party forum such as vBulletin, you need to select the option "bbwrapper" instead.
Thank You !