Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Misc > Archive::Off Topic

Archive::Off Topic Archive area for Off Topic's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2004, 10:09 AM
Volvagia70364
Sarnak
 
Join Date: Dec 2003
Location: Louisiana
Posts: 72
Default Calling all code junkies and webmasters.

Im putting together a website, and I was wondering exactly how you get posts from the message board into your home page like what EQEMU does with their news postings. I am completely new to phpBB and have only medicore HTML skills so go easy on me. :lol:

Thanks in advance for any help.
__________________
Always remember that you are unique.
Just like everyone else.
Reply With Quote
  #2  
Old 07-03-2004, 10:22 AM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

i dont know if this is how EQEmu does it but this is how i did it on my website.

just create a table on your main page and write your news post in it and put a header on the top saying the subject, and whatever else you want on it. and just add a link to the same thread on your forum.
Reply With Quote
  #3  
Old 07-03-2004, 02:13 PM
Volvagia70364
Sarnak
 
Join Date: Dec 2003
Location: Louisiana
Posts: 72
Default

Yeah, I suppose that could work, but I was hoping for the more elegant solution of simply being able to post instead of delving into the code at every update. I'll see what I can come up with over at the phpBB support pages.

In the meantime, can anyone tell me if phpBB and phpNuke can be used side by side? I heard that phpBB has the better forum coding while Nuke has the better website side intergration. Is the bit about the coding true or not? Etc. A listing of the differences between the two would be extremely helpful.
__________________
Always remember that you are unique.
Just like everyone else.
Reply With Quote
  #4  
Old 07-04-2004, 04:37 AM
dragonflz
Sarnak
 
Join Date: Apr 2004
Location: Maine
Posts: 34
Default

check out this CMS...
I have built a lot of websites with it, and it works very well


http://www.xoops.org/


Drag
__________________
-------------------------------
Comming soon.....
TotD EQEMU Server
-------------------------------
And there I was, Gone!
Reply With Quote
  #5  
Old 07-04-2004, 05:53 PM
Spike
Discordant
 
Join Date: Mar 2004
Location: Florida
Posts: 362
Default

Or, we could just use this LOL!!!

Quote:
Originally Posted by phpBBHacks.com
This is a simple news page, which you can put on your phpBB. It uses your template and is very easy to use. It has 3 pre-made HTML Tables that you can add your news in. Just copy and paste for more news.
CLICK HERE TO DOWNLOAD NOW!

BTW - What do I get for doing this?

If this webpage works, use it cause this one is better...

news.php
Code:
<?php
define ('IN_PHPBB', true);

$phpbb_root_path = str_replace('\\', '/', dirname(__FILE__)) . '/';
include($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'includes/news_header.'.$phpEx);

$template = new Template($news_template);

$template->set_filenames(array(
	'body' => 'news.tpl'
	)); 

	$template->assign_vars(tpl_vars());
	
	// Get the news posts
	
	$news_sort = false;
	
	$news_display['announcement'] = news_id_array('2');
	$news_display['sticky'] = news_id_array('1');
	$news_display['normal'] = news_id_array('0');
		
	//
	// Announcements
	//
	
	
	if( $news_display['announcement'] ) 
	{
		$template->assign_block_vars('announcement',array());
		for($i = 0; $i < count($news_display['announcement']); $i++) 
		{ 
			$news_post = get_post($news_display['announcement'][$i]);
			
			$template->assign_block_vars('announcement.news',post_vars($news_post, $news_user));
			if( $news_post['vote_text'] )
			{
				$template->assign_block_vars('announcement.news.switch_poll',array());
			}
			if( $news_post['avatar'] )
			{
				$template->assign_block_vars('announcement.news.switch_avatar',array());
			}
			else
			{
				$template->assign_block_vars('announcement.news.switch_no_avatar',array());
			}
		} 
	}
	
	//
	// Sticky News
	//
	
	if( $news_display['sticky'] ) 
	{
		$template->assign_block_vars('sticky',array());
		for($i = 0; $i < count($news_display['sticky']); $i++) 
		{ 
			$news_post = get_post($news_display['sticky'][$i]);
			
			$template->assign_block_vars('sticky.news',post_vars($news_post, $news_user));
			
			if( $news_post['vote_text'] )
			{
				$template->assign_block_vars('sticky.news.switch_poll',array());
			}
			
			if( $news_post['avatar'] )
			{
				$template->assign_block_vars('sticky.news.switch_avatar',array());
			}
			else
			{
				$template->assign_block_vars('sticky.news.switch_no_avatar',array());
			}
		} 
	}
	
	//
	// Normal News
	//
	
	if( $news_display['normal'] ) 
	{
		$template->assign_block_vars('normal',array());
		for($i = 0; $i < count($news_display['normal']); $i++) 
		{ 
			$news_post = get_post($news_display['normal'][$i]);
			
			$template->assign_block_vars('normal.news',post_vars($news_post, $news_user));
			if( $news_post['vote_text'] )
			{
				$template->assign_block_vars('normal.news.switch_poll',array());
			}
			
			if( $news_post['avatar'] )
			{
				$template->assign_block_vars('normal.news.switch_avatar',array());
			}
			else
			{
				$template->assign_block_vars('normal.news.switch_no_avatar',array());
			}
		} 
	}
	
	//
	// Finalise Outputs
	//
	
	if( ( !$news_display['announcement'] && !$news_display['sticky'] && !$news_display['normal'] ) || ( !$HTTP_GET_VARS[POST_NEWS_URL] && !$news_display['normal'] ) ) 
	{
		$template->assign_block_vars('no_news',array());
	}

$template->pparse('body');

?> </th>
  </tr>
</table>
news_install.php
Code:
<?php
$tablename = 'news';

// ******************* NO EDITING BELOW THIS LINE *******************

$eipver = '6.1.0';

// connect to phpbb
include('./config.php');

$cnx = mysql_connect($dbhost, $dbuser, $dbpasswd)
or die("Unable to connect to database server.");
mysql_select_db($dbname, $cnx)
or die("Unable to select database.");

$sql1 = "CREATE TABLE ". $table_prefix.$tablename ." (
   config_name varchar(255) NOT NULL default '',
  config_value varchar(255) NOT NULL default '',
  PRIMARY KEY  (config_name)
) TYPE=MyISAM";

 $result = mysql_query($sql1);

echo "<HTML><HEAD><TITLE>Installing: NEWS BLOCK ".$eipver."</TITLE></HEAD>";
echo "<BODY>";

if(!$result)
echo "Install failed<BR><BR>";
if (mysql_error()) { echo "Error Report: <B>".mysql_error()."</B><BR><BR>"; }
else {
echo "Install complete, new  values added.<BR><BR><BR>Please remember to delete this file ASAP.";

}
echo "<BODY></HTML>";


 $sql2 = 'INSERT INTO ' . $table_prefix.$tablename . "(config_name, config_value)
				VALUES ('news_block', ''),
                       ('news_title', ''),
                       ('news_color', ''),
                       ('news_style', ''),
                       ('news_bold', ''),
                       ('news_ital', ''),
                       ('news_under', ''),
                       ('news_size', ''),
                       ('scroll_speed', ''),
                        ('scroll_action', ''),
                        ('scroll_behavior', ''),
                        ('scroll_size', '')";
$result = mysql_query($sql2);

echo "<HTML><HEAD><TITLE>Installing: NEWS BLOCK ".$eipver."</TITLE></HEAD>";
echo "<BODY>";

if(!$result)
echo "Install failed<BR><BR>";
if (mysql_error()) { echo "Error Report: <B>".mysql_error()."</B><BR><BR>"; }
else {
echo "Install complete, new  values added.<BR><BR><BR>Please remember to delete this file ASAP.";

}
echo "<BODY></HTML>";
exit;
?>
language/lang_english/lang_news.php
Code:
<?php

$lang['Announcement'] = 'Announcements';
$lang['Closed'] = 'Closed';
$lang['Code'] = 'Code';
$lang['Comment'] = 'Comment';
$lang['Comments'] = 'Comments';
$lang['Email'] = 'Email';
$lang['Guest'] = 'Guest';
$lang['Hidden'] = 'Hidden';
$lang['No'] = 'No';
$lang['No_News'] = 'There is currently no news to display.';
$lang['Normal_News'] = 'Normal News';
$lang['Offline'] = 'Offline';
$lang['Online'] = 'Online';
$lang['PM'] = 'PM';
$lang['Poll'] = 'Poll';
$lang['Poll_results'] = 'Results';
$lang['Profile'] = 'Profile';
$lang['Quote'] = 'Quote';
$lang['Reply'] = 'Reply';
$lang['Sticky'] = 'Sticky News';
$lang['Time_zone'] = 'All times are GMT';
$lang['View_full_news'] = 'View Full Article';
$lang['View_text'] = 'View All News';
$lang['Vote'] = 'Vote';
$lang['Web'] = 'Website';
$lang['wrote'] = 'wrote';

// Errors
$lang['Denied'] = 'Error Loading forum information:<br><br>The forum this script is trying to access is not viewable to guests.';
$lang['Error_performing'] = 'Error Performing';
$lang['Extension'] = 'The extension.inc file of your phpbb installation cannot be found. It is possible the news files have been placed in a mis-named folder. <br>This script is looking for the file';
$lang['Message_die'] = 'Error Processing message_die():<br><br>A message_die() was called with an undefined type.';
$lang['Moved'] = 'The topic beging shown has been moved, therefore there is an error in the SQL for get_query.';
$lang['News_forum_uninstalled'] = 'The news table has not been Installed. Please install it via the News Configuration page in the Admin Control Panel';
$lang['Occured'] = 'This error occured in';
$lang['on_line'] = 'on line';
$lang['Query'] = 'Query';
$lang['News_no_forum_id'] = 'Error: There is no forum ID set in your settings or an invalid forum ID has been entered where guests cannot read the forum.';
$lang['tpl_error'] = 'Unable to locate template files. bbcode.tpl, headlines.tpl and news.tpl all should be in a folder called `news` in the default template of the forum or subSilver';


?>
admin/admin_news.php
Code:
<?php

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
	$file = basename(__FILE__);
	$module['News']['Configuration'] = "$file";
	return;
}

//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

function install_config($config_name, $config_value = '')
{
	global $db, $dbms;

	$sql = "SELECT config_name FROM " . CONFIG_TABLE . " WHERE config_name='" . $config_name . "'";

	$result = $db->sql_query($sql);

	if ($db->sql_numrows($result) != 0)
	{
		return;
	}

	// Write new config variable
	
	$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('" . $config_name . "', '" . $config_value . "');";
	
	if ( ($dbms == 'mssql') || ($dbms == 'mssql-odbc') )
	{
		$sql .= "GO;";
	}
	
	// Execute the new variable	
	
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Failed to install news configuration setting", "", __LINE__, __FILE__, $sql);
	}

	return;
}

//
// Install the table when prompted
//
if( !empty($_GET['install']) && empty($board_config['news_installed']) )
{
	install_config("news_installed", "1");
	install_config("news_no", "1");
	install_config("news_acro", "24");
	install_config("news_forum_id", "1");
	install_config("news_dateformat", "");
	install_config("news_limit", "");
	install_config("news_date_limit", "");
	install_config("headline_dateformat", "");
	install_config("headline_limit", "");
	install_config("headline_date_limit", "");
	install_config("news_view_full_url", "index.php?newsid={ID}");
	install_config("news_links", "<a href=\'{URL}\' target=\'_blank\'>{TEXT}</a>");
	install_config("news_announcements", "2");
	install_config("news_sticky", "2");
	install_config("headline_announcements", "2");
	install_config("headline_sticky", "2");
	
	$message = $lang['News_updated'] . "<br /><br />" . sprintf($lang['Click_return_news'], "<a href=\"" . append_sid("admin_news.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
	message_die(GENERAL_MESSAGE, $message);
}

//
// If its not installed, and we've not prompted it, prompt!
//

if( empty($board_config['news_installed']) )
{
	$message = $lang['Table_unpopulated'] . "<br /><br />" . sprintf($lang['Click_install_news'], "<a href=\"" . append_sid("admin_news.$phpEx?install=1") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
	message_die(GENERAL_MESSAGE, $message);
}

//
// Stop the user from setting a forum_id of nothing and check if its valid
//

if( empty($HTTP_POST_VARS['news_forum_id']) )
{
	unset($HTTP_POST_VARS['news_forum_id']);
}
else
{
    $sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = " . ANONYMOUS; 
    if ( !($user_result = $db->sql_query($sql)) ) 
    { 
       message_die(CRITICAL_ERROR, 'Could not obtain user data from user table', '', __LINE__, __FILE__, $sql); 
    } 
    $userdataguest = $db->sql_fetchrow($user_result); 
    $db->sql_freeresult($user_result);

    $auth_ary = auth(AUTH_READ, $HTTP_POST_VARS['news_forum_id'], $userdataguest); 
	
	if ( empty($auth_ary['auth_read']) )
	{
         unset($HTTP_POST_VARS['news_forum_id']);
	}
}

//
// Pull all config data
//
$sql = "SELECT *
	FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
	message_die(CRITICAL_ERROR, "Could not query config information in admin_news", "", __LINE__, __FILE__, $sql);
}
else
{
	while( $row = $db->sql_fetchrow($result) )
	{
		$config_name = $row['config_name'];
		$config_value = $row['config_value'];
		$default_config[$config_name] = $config_value;
		
		$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];


		if( isset($HTTP_POST_VARS['submit']) )
		{
			$sql = "UPDATE " . CONFIG_TABLE . " SET
				config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
				WHERE config_name = '$config_name'";
			if( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Failed to update news configuration for $config_name", "", __LINE__, __FILE__, $sql);
			}
		}
	}

	if( isset($HTTP_POST_VARS['submit']) )
	{
		$message = $lang['News_updated'] . "<br /><br />" . sprintf($lang['Click_return_news'], "<a href=\"" . append_sid("admin_news.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");

		message_die(GENERAL_MESSAGE, $message);
	}
}


$template->set_filenames(array(
	"body" => "admin/news_body.tpl")
);

//
// Escape any quotes in the site description for proper display in the text
// box on the admin page 
//
$no_yes = ( $new['news_no'] ) ? "checked=\"checked\"" : "";
$no_no = ( !$new['news_no'] ) ? "checked=\"checked\"" : "";

$na_2 = ( $new['news_announcements'] == '2' ) ? "selected" : "";
$na_1 = ( $new['news_announcements'] == '1' ) ? "selected" : "";
$na_0 = ( !$new['news_announcements'] ) ? "selected" : "";

$ns_2 = ( $new['news_sticky'] == '2' ) ? "selected" : "";
$ns_1 = ( $new['news_sticky'] == '1' ) ? "selected" : "";
$ns_0 = ( !$new['news_sticky'] ) ? "selected" : "";

$ha_2 = ( $new['headline_announcements'] == '2' ) ? "selected" : "";
$ha_1 = ( $new['headline_announcements'] == '1' ) ? "selected" : "";
$ha_0 = ( !$new['headline_announcements'] ) ? "selected" : "";

$hs_2 = ( $new['headline_sticky'] == '2' ) ? "selected" : "";
$hs_1 = ( $new['headline_sticky'] == '1' ) ? "selected" : "";
$hs_0 = ( !$new['headline_sticky'] ) ? "selected" : "";

$new['links'] = str_replace('"', '"', $new['links']);
$template->assign_vars(array(
	"S_CONFIG_ACTION" => append_sid("admin_news.$phpEx"),

	"L_NEWS_CONFIG_TITLE" => $lang['News_Config'],
	"L_NEWS_EXPLAIN" => $lang['News_explain'],
	"L_NEWS_SETTINGS" => $lang['News_settings'],
	"L_FULL_ARTICLE_SETTINGS" => $lang['Full_article_settings'],
	"L_HEADLINE_SETTINGS" => $lang['Headline_settings'],
	
	
	"S_NO_YES" => $no_yes,
	"S_NO_NO" => $no_no,

	"S_NA_2" => $na_2,
	"S_NA_1" => $na_1,
	"S_NA_0" => $na_0,
	
	"S_NS_2" => $ns_2,
	"S_NS_1" => $ns_1,
	"S_NS_0" => $ns_0,
	
	"S_HA_2" => $ha_2,
	"S_HA_1" => $ha_1,
	"S_HA_0" => $ha_0,
	
	"S_HS_2" => $hs_2,
	"S_HS_1" => $hs_1,
	"S_HS_0" => $hs_0,

	"L_SUBMIT" => $lang['Submit'], 
	"L_RESET" => $lang['Reset'],
	"L_NEWS_FORUM" => $lang['news_forum'],
	"L_NEWS_FORUM_MORE" => $lang['news_forum_more'],
	"L_NEWS_FORUM_MORE_2" => $lang['news_forum_more_error'],
	"L_NEWS_DATE" => $lang['Date_format'],
	"L_NEWS_DATE_MORE" => $lang['Date_format_explain'],
	"L_NEWS_DATE_MORE_2" => $lang['news_dateformat_more'],
	"L_NEWS_LIMIT" => $lang['news_limit'],
	"L_NEWS_LIMIT_MORE" => $lang['news_limit_more'],
	"L_NEWS_DATE_LIMIT" => $lang['news_date_limit'],
	"L_NEWS_DATE_LIMIT_MORE" => $lang['news_date_limit_more'],
	"L_ACRO" => $lang['acro'],
	"L_ACRO_MORE" => $lang['acro_more'],
	"L_VIEW_FULL_URL" => $lang['view_full_url'],
	"L_VIEW_FULL_URL_MORE" => $lang['view_full_url_more'],
	"L_LINK_FORMAT" => $lang['link_format'],
	"L_LINK_FORMAT_MORE" => $lang['link_format_more'],
	"L_NO" => $lang['news_no'],
	"L_NO_MORE" => $lang['news_no_more'],
	"L_NEWS_STICKY" => $lang['news_sticky'],
	"L_NEWS_STICKY_MORE" => $lang['news_sticky_more'],
	"L_NEWS_ANNOUNCE" => $lang['news_announce'],
	"L_NEWS_ANNOUNCE_MORE" => $lang['news_announce_more'],
	"L_DISPLAY_2" => $lang['display_2'],
	"L_DISPLAY_1" => $lang['display_1'],
	"L_DISPLAY_0" => $lang['display_0'],
	
	"NEWS_FORUM" => $new['news_forum_id'],
	"NEWS_DATE_FORMAT" => $new['news_dateformat'],
	"NEWS_LIMIT" => $new['news_limit'],
	"NEWS_DATE_LIMIT" => $new['news_date_limit'],
	"HEADLINE_DATE_FORMAT" => $new['headline_dateformat'],
	"HEADLINE_LIMIT" => $new['headline_limit'],
	"HEADLINE_DATE_LIMIT" => $new['headline_date_limit'],
	"ACRO" => $new['news_acro'],
	"VIEW_FULL" => $new['news_view_full_url'],
	"LINK_FORMAT" => $new['news_links'],
	)
	
);

$template->pparse("body");

include('./page_footer_admin.'.$phpEx);

?>
templates/subSilver/news/news.tpl
Code:
<!-- BEGIN announcement --> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font>
<h4 align="center"><font face="Arial, Helvetica, sans-serif">{L_ANNOUNCEMENT}</font></h4>
<font face="Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- BEGIN news -->
</font></font> 
<table width='100%' border='0' cellspacing='2' cellpadding='4'>
  <tr> 
    <td width='0'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src='images/news/bulliten.gif' width='9' height='9'></font></td>
    <td width='100%'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a name='{announcement.news.NEWS_ID}'><span class="medium"><b>{announcement.news.TITLE}</b></span></a></font></td>
  </tr>
  <tr> 
    <td width='0' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> </span></font></td>
    <td width='100%' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> {announcement.news.TIME}</span></font></td>
  </tr>
  <tr> 
    <td width='0' height="113"> </td>
    <td width='100%'><table width="100%" border="0" align="right" cellpadding="4" cellspacing="2">
        <tr valign="top"> 
          <td rowspan="2" align="center" nowrap><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>{announcement.news.POSTER}</strong><br>
            <span class="small">{announcement.news.POSTER_RANK}</span><br>
            <br>
            <!-- BEGIN switch_avatar -->
            <img src="{announcement.news.AVATAR}"> 
            <!-- END switch_avatar -->
            </font></td>
          <td width="100%" height="100%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{announcement.news.TEXT}</font></td>
          <!-- BEGIN switch_poll -->
          <td rowspan="2" nowrap><div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>{L_POLL}</b><br>
              <br>
              {announcement.news.POLL_DESC}<br>
              <br>
              <span class="small">{announcement.news.VOTE}<br>
              <br>
              {announcement.news.RESULTS} <br>
              <img src="http://forums.snation.co.uk/snn/images/70x1.gif" height="1" width="100" border="0"></span> 
              </font></div></td>
          <!-- END switch_poll -->
        </tr>
        <tr valign="top"> 
          <td width="100%" height="44" valign="bottom"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
            {announcement.news.POSTER_ONLINE} {announcement.news.POSTER_PROFILE} 
            {announcement.news.POSTER_EMAIL} {announcement.news.POSTER_PM} {announcement.news.POSTER_WEB} 
            {announcement.news.ADD_COMMENT} </font></td>
        </tr>
      </table>
      <font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font> </font></td>
  </tr>
  <tr> 
    <td colspan='2'> <div align='right'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> 
        [ <a href="{announcement.news.U_COMMENTS}"> {announcement.news.L_COMMENT_COUNT} 
        {announcement.news.L_COMMENT}</a> ] </span></font></div></td>
  </tr>
  <tr> 
    <td height='27' colspan='2'> </td>
  </tr>
</table>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- END news -->
<!-- END announcement -->
<!-- BEGIN sticky -->
<br>
</font>
<h4 align="center"><font face="Arial, Helvetica, sans-serif">{L_STICKY}</font></h4>
<font face="Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- BEGIN news -->
</font></font> 
<table width='100%' border='0' cellspacing='2' cellpadding='4'>
  <tr> 
    <td width='0'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src='images/news/bulliten.gif' width='9' height='9'></font></td>
    <td width='100%'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a name='{sticky.news.NEWS_ID}'><span class="medium"><b>{sticky.news.TITLE}</b></span></a></font></td>
  </tr>
  <tr> 
    <td width='0' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> </span></font></td>
    <td width='100%' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> {sticky.news.TIME}</span></font></td>
  </tr>
  <tr> 
    <td width='0' height="113"> </td>
    <td width='100%'><table width="100%" border="0" align="right" cellpadding="4" cellspacing="2">
        <tr valign="top"> 
          <td rowspan="2" align="center" nowrap><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>{sticky.news.POSTER}</strong><br>
            <span class="small">{sticky.news.POSTER_RANK}</span><br>
            <br>
            <!-- BEGIN switch_avatar -->
            <img src="{sticky.news.AVATAR}"> 
            <!-- END switch_avatar -->
            </font></td>
          <td width="100%" height="100%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{sticky.news.TEXT}</font></td>
          <!-- BEGIN switch_poll -->
          <td rowspan="2" nowrap><div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>{L_POLL}</b><br>
              <br>
              {sticky.news.POLL_DESC}<br>
              <br>
              <span class="small">{sticky.news.VOTE}<br>
              <br>
              {sticky.news.RESULTS} <br>
              <img src="http://forums.snation.co.uk/snn/images/70x1.gif" height="1" width="100" border="0"></span> 
              </font></div></td>
          <!-- END switch_poll -->
        </tr>
        <tr valign="top"> 
          <td width="100%" height="44" valign="bottom"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
            {sticky.news.POSTER_ONLINE} {sticky.news.POSTER_PROFILE} {sticky.news.POSTER_EMAIL} 
            {sticky.news.POSTER_PM} {sticky.news.POSTER_WEB} {sticky.news.ADD_COMMENT} 
            </font></td>
        </tr>
      </table>
      <font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font> </font></td>
  </tr>
  <tr> 
    <td colspan='2'> <div align='right'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> 
        [ <a href="{sticky.news.U_COMMENTS}"> {sticky.news.L_COMMENT_COUNT} {sticky.news.L_COMMENT}</a> 
        ] </span></font></div></td>
  </tr>
  <tr> 
    <td height='27' colspan='2'> </td>
  </tr>
</table>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- END news -->
<!-- END sticky -->
<!-- BEGIN normal -->
<br>
</font>
<h4 align="center"><font face="Arial, Helvetica, sans-serif">{L_NORMAL}</font></h4>
<font face="Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- BEGIN news -->
</font></font> 
<table width='100%' border='0' cellspacing='2' cellpadding='4'>
  <tr> 
    <td width='0'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src='images/news/bulliten.gif' width='9' height='9'></font></td>
    <td width='100%'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a name='{normal.news.NEWS_ID}'><span class="medium"><b>{normal.news.TITLE}</b></span></a></font></td>
  </tr>
  <tr> 
    <td width='0' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> </span></font></td>
    <td width='100%' height="0"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> {normal.news.TIME}</span></font></td>
  </tr>
  <tr> 
    <td width='0' height="113"> </td>
    <td width='100%'><table width="100%" border="0" align="right" cellpadding="4" cellspacing="2">
        <tr valign="top"> 
          <td rowspan="2" align="center" nowrap><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>{normal.news.POSTER}</strong><br>
            <span class="small">{normal.news.POSTER_RANK}</span><br>
            <br>
            <!-- BEGIN switch_avatar -->
            <img src="{normal.news.AVATAR}"> 
            <!-- END switch_avatar -->
            </font></td>
          <td width="100%" height="100%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{normal.news.TEXT}</font></td>
          <!-- BEGIN switch_poll -->
          <td rowspan="2" nowrap><div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>{L_POLL}</b><br>
              <br>
              {normal.news.POLL_DESC}<br>
              <br>
              <span class="small">{normal.news.VOTE}<br>
              <br>
              {normal.news.RESULTS} <br>
              <img src="http://forums.snation.co.uk/snn/images/70x1.gif" height="1" width="100" border="0"></span> 
              </font></div></td>
          <!-- END switch_poll -->
        </tr>
        <tr valign="top"> 
          <td width="100%" height="44" valign="bottom"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
            {normal.news.POSTER_ONLINE} {normal.news.POSTER_PROFILE} {normal.news.POSTER_EMAIL} 
            {normal.news.POSTER_PM} {normal.news.POSTER_WEB} {normal.news.ADD_COMMENT} 
            </font></td>
        </tr>
      </table>
      <font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font> </font></td>
  </tr>
  <tr> 
    <td colspan='2'> <div align='right'><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="small"> 
        [ <a href="{normal.news.U_COMMENTS}"> {normal.news.L_COMMENT_COUNT} {normal.news.L_COMMENT}</a> 
        ] </span></font></div></td>
  </tr>
  <tr> 
    <td height='27' colspan='2'> </td>
  </tr>
</table>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- END news -->
<!-- END normal -->
<!-- BEGIN no_news -->
<br>
</font>
<h4 align="center"><font face="Arial, Helvetica, sans-serif">{L_NORMAL}</font><font size="2" face="Arial, Helvetica, sans-serif"><br>
  <br>
  {L_NO_NEWS}</font></h4>
<font face="Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
<!-- END no_news -->
</font></font> 
<table width="100%" border="0" cellspacing="3" cellpadding="3">
  <tr> 
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="{U_BOARD}">{L_VIEW_TEXT}</a></font></td>
    <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{L_TIME_ZONE} 
        {S_TD}</font></div></td>
  </tr>
</table>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br>
</font>
templates/subSilver/news/headlines.tpl

Code:
<!-- BEGIN announcement -->
<!-- BEGIN news -->

<a href="{announcement.news.U_VIEW_FULL}" title="{announcement.news.TITLE}"><b>{announcement.news.ACRO}</b></a><br />
     - <font color="888888">{announcement.news.TIME} [{announcement.news.POSTER}]</font><br />
 
<!-- END news -->
<!-- END announcement -->



<!-- BEGIN sticky -->
<!-- BEGIN news -->

<a href="{sticky.news.U_VIEW_FULL}" title="{sticky.news.TITLE}"><b>{sticky.news.ACRO}</b></a><br />
     - <font color="888888">{sticky.news.TIME} [{sticky.news.POSTER}]</font><br />
 
<!-- END news -->
<!-- END sticky -->



<!-- BEGIN normal -->
<!-- BEGIN news -->

<a href="{normal.news.U_VIEW_FULL}" title="{normal.news.TITLE}"><b>{normal.news.ACRO}</b></a><br />
     - <font color="888888">{normal.news.TIME} [{normal.news.POSTER}]</font><br />

<!-- END news -->
<!-- END normal -->


<!-- BEGIN no_news -->
{L_NO_NEWS}
<!-- END no_news --> 

 <br>
   [ <a href="{U_BOARD}">{L_VIEW_TEXT}</a> ]
templates/subSilver/news/bbcode.tpl

Code:
<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->

<!-- BEGIN quote_username_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{USERNAME} {L_WROTE}:</b></span></td>
	</tr>
	<tr>
	  <td class="quote"><!-- END quote_username_open -->
<!-- BEGIN quote_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_QUOTE}:</b></span></td>
	</tr>
	<tr>
	  <td class="quote"><!-- END quote_open -->
<!-- BEGIN quote_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END quote_close -->

<!-- BEGIN code_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_CODE}:</b></span></td>
	</tr>
	<tr>
	  <td class="code"><!-- END code_open -->
<!-- BEGIN code_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END code_close -->


<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->

<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->

<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->

<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->

<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
A good example of another webpage that automatically takes the post information and automatically puts it on the homepage would be www.roar.5u.com (webpage I built)
__________________
Reply With Quote
  #6  
Old 07-05-2004, 08:39 AM
Volvagia70364
Sarnak
 
Join Date: Dec 2003
Location: Louisiana
Posts: 72
Default

Thanks, thats pretty much what I was looking for
__________________
Always remember that you are unique.
Just like everyone else.
Reply With Quote
  #7  
Old 07-05-2004, 09:59 AM
Rogean's Avatar
Rogean
Administrator
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 708
Default

Wow Spike, that was so unnecessary.

Heres what I coded for the eqemulator site.

Code:
<?
// Main.php by Rogean
require('forums/config.php');
mysql_connect($dbhost, $dbuser, $dbpasswd);
@mysql_select_db("$dbname")or die(mysql_error());

//GET FORUM NEWS
$getnews=mysql_query("SELECT topic_id,forum_id,topic_title,topic_poster,topic_time,topic_views,topic_replies,topic_first_post_id FROM phpbb_topics WHERE forum_id='11' ORDER by topic_time DESC LIMIT 4");
while(list($topic[id],$forum[id],$topic[title],$topic[poster],$topic[time],$topic[views],$topic[replies],$topic[firstpostid])=mysql_fetch_row($getnews)){

$newsbody=mysql_query("SELECT * FROM phpbb_posts_text WHERE post_id=$topic[firstpostid]");
$text=mysql_fetch_array($newsbody);

$userinfo=mysql_query("SELECT * FROM phpbb_users WHERE user_id=$topic[poster]");
$user=mysql_fetch_array($userinfo);

$text[post_text]=str_replace("\n", "<br>", $text[post_text]);
$text[post_text]=str_replace("[b]", "<b>", $text[post_text]);
$text[post_text]=str_replace("[/b]", "</b>", $text[post_text]);
$text[post_text]=str_replace("[i]", "<i>", $text[post_text]);
$text[post_text]=str_replace("[/i]", "</i>", $text[post_text]);
$text[post_text]=str_replace("<", "<", $text[post_text]);
$text[post_text]=str_replace(">", ">", $text[post_text]);



echo "<div class=\"content\">
<span class=\"title\">$text[post_subject]</span><br>
<font size=1>Posted by: $user[username] :: $topic[replies] Replies :: $topic[views] Views<br><br>
$text[post_text]
</div>
<hr width=80% color=darkblue align=left>";
}
?>
Modified it to use an echo instead of what we use on the eqemu site.

Replace 11 in the first query with the forum id your pulling news from.
__________________
EQEmulator Developer / Administrator
Reply With Quote
  #8  
Old 08-18-2004, 05:35 PM
hlf
Fire Beetle
 
Join Date: May 2004
Posts: 1
Default

thanks for sharing that Rogean.

i have a question though, how do you make the display truncated like on the eqemu's main page?


"Newest Topics
- where did it go..."
Reply With Quote
  #9  
Old 08-18-2004, 06:40 PM
mattmeck
Guest
 
Posts: n/a
Default

WOOT lets bump old posts!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:18 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3