Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-14-2005, 06:51 AM
BryanNOVA BryanNOVA is offline
 
Join Date: Apr 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Pluh News Not Working

I can not get Pluh News to succesfully display the news on my webpage.

http://www.conqueststudios.com/db

Index.php

Code:
<html>
<head>
<meta name="author" content="Morphix">
<metahttp-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Welcome to Dark Blood: Apocolypse Tomorrow</title>
</head>
<body background="images/bg.jpg" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0">

<table width="878" height="100%" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td background="images/lbg.jpg" align="top" valign="top"><img class="inv" src="images/blank.jpg" width="39" height="1" align="top" valign="top"></td><td valign="top">


<table width="800" bgcolor="#000000" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td><img src="images/tl01.jpg"></td><td><img src="images/tr01.jpg"></td>
</tr>
<tr>
<td><img src="images/tl02.jpg"></td><td><img src="images/tr02.jpg"></td>
</tr>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td background="images/nbg03.jpg" width="20%"><img src="images/nbg02.jpg"></td><td background="images/nbg.jpg" width="60%" align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%">
<a class="headline" href="asdfadsfafs">-Relaunch!</a>
</td>
<td width="25%">
<a class="headline" href="asdfadsfafs">-We'd like to thank...</a>
</td>
<td width="25%">
<a class="headline" href="asdfadsfafs">-Relaunch!</a>
</td>
</tr>
<td width="25%">
<a class="headline" href="asdfadsfafs">-New modeler!</a>
</td>
<td width="25%">
<a class="headline" href="asdfadsfafs">-Published in 5...</a>
</td>
<td width="25%">
<a class="headline" href="asdfadsfafs">-Relaunch!</a>
</td>
</tr>
</table>
</td><td background="images/tr03.jpg" width="20%"><img src="images/tr03.jpg"></td>
</tr>
</table>
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0" align="top" valign="top">
<tr>
<td background="images/lnbg.jpg" width="20%" align="top" valign="top">
<img class="inv" src="images/blank.jpg" width="177" height="1"><br>

<table border="0" cellspacing="0" cellpadding="0" align="top" valign="top">
<tr>
<td align="top" valign="top"><img class="inv" src="images/blank.jpg" width="15" height="1"></td><td align="top" valign="top">
<span class="navbar">.Main<br></span>
<a class="navbar" href="adsfasdf">News</a><br>
<a class="navbar" href="adsfasdf">Forums</a><br>
<a class="navbar" href="adsfasdf">Staff</a><br>
<a class="navbar" href="adsfasdf">Renders</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br>
<a class="navbar" href="adsfasdf">asdfsfd</a><br></td>
</tr>
</table>
</td>

<td bgcolor="#46403A" width="60%" align="top" valign="top">

<table border="0" cellspacing="0" cellpadding="0" align="top" valign="top">
<tr>
<td align="top" valign="top"><img class="inv" src="images/blank.jpg" width="406" height="1"><img src="images/trc.jpg"></td>
</tr>
<tr>
<td>

<table border="0" cellspacing="0" cellpadding="0" align="top" valign="top" width="100%" height="100%">
<tr>
<td align="top" valign="top"><img class="inv" src="images/blank.jpg" width="40" height="1"></td>
<td align="top" valign="top">
<table border="0" cellspacing="0" cellpadding="0" align="top" valign="top" width="100%" height="100%">
<tr>
<td>
&nbsp;<br><br>
</td>
</tr>
<!--/Begin News Table-->
<tr>
<td>
 <?php include("/var/www/html/forums/PluhNews.php"); ?>

</table>
</td>
</tr>
<!--/End News Table-->
</table>


</td>
</tr>
</table>

</td>
</tr>
<tr>
<td>
<span class="copyright"><center><br><br>
Copyright ? 2005 <a class="copyright" href="http://www.conqueststudios.com/">Conquest Studios</a>.  All Rights Reserved.
</center></span>
</td>
</tr>
</table>



</td>
<td width="20%" align="top" valign="top">

<table height="100%" border="0" cellspacing="0" cellpadding="0" align="top" valign="top">
<tr>
<td align="top" valign="top"><img src="images/tr04.jpg"></td>
</tr>
<tr>
<td background="images/rnbg.jpg" height="100%">
<table border="0" cellspacing="0" cellpadding="0" align="top" valign="top" height="100%">
<tr>
<td height="100%"><img class="inv" src="images/blank.jpg" width="40" height="1"><img class="inv" src="images/blank.jpg" width="1" height="100%"></td>
<td align="top" valign="top">
<span class="navbar">.Main<br></span>
<a class="navbar" href="adsfasdf">News</a><br>
<a class="navbar" href="adsfasdf">Forums</a><br>
<a class="navbar" href="adsfasdf">Staff</a><br>
<a class="navbar" href="adsfasdf">Renders</a><br>
</td>
</tr>
</table>



</td>
</tr>
</table>


</td>
</tr>
</table>

</td><td background="images/rbg.jpg" align="top" valign="top"><img class="inv" src="images/blank.jpg" width="39" height="1" align="top" valign="top"></td>
</tr>
</table>
</body>
</html>
PluhNews.php

Code:
<?php
chdir('/var/www/html/forums/');
//PluhNews 1.5 released under GNU GPL Licence version 2.0 (see copying.txt file for more info)
//Set your permissions in your control panel to make sure that only YOU and who you specify can post news. Otherwise, everyone and their dog can register and post in your news forums, thus posting where your news will appear. But for this script to work it's extra magic, be sure your members can reply to your news posts.

require("./global.php");
require("./PluhConfig.php");
require("./includes/config.php");

//scroll down to edit the HTML for the news
//**********************

//Start the goodies (please do not edit to goodies unless you know what you are doing

//connect
$connection = mysql_connect("$servername","$dbusername","$dbpassword") or die ("Cannot connect to server.");

//select database
$db = mysql_select_db("$dbname", $connection) or die ("Could not select database.");

// create sql statement
$sql = "SELECT threadid, title, forumid, replycount, postusername, postuserid, lastposter, dateline, iconid FROM thread WHERE forumid = \"$newsforums\" ORDER BY threadid DESC LIMIT $newsitems";

//execute sql query
$sql_result = mysql_query($sql, $connection) or die ("Could not execute query.");

if (!$sql_result) {
  echo "<p>Could not get record.";
}

while ($row = mysql_fetch_array($sql_result)) {
   $threadid = $row["threadid"];
   $title = $row["title"];
   $forumid = $row["forumid"];
   $replycount = $row["replycount"];
   $postusername = $row["postusername"];
   $postuserid = $row["postuserid"];
   $lastposter = $row["lastposter"];
   $iconid = $row["iconid"];
   $dateline = $row["dateline"];

//create the second SQL statement to pull the post from the thread it resides in
$sql2 = "SELECT postid, threadid, username, userid, title, dateline, pagetext, iconid FROM post WHERE threadid = \"$threadid\" ORDER BY postid ASC LIMIT 1";

//execute second sql query
$sql_result2 = mysql_query($sql2, $connection) or die ("Could not execute query in second sql statement.");

if (!$sql_result2) {
  echo "<p>Could not get record in second statement.";
}

while ($row2 = mysql_fetch_array($sql_result2)) {
   $pagetext = $row2["pagetext"];



//gotta convert that damn unix time crap
$dateposted = date("D j M Y, g:i A",$dateline);
//end the goodies

if ($replycount==1) {
$commenttext = "Comment";
}
else {
$commenttext = "Comments";
}

require_once("./includes/functions_bbcodeparse.php");
$bericht=parse_bbcode2($pagetext,"1","1","1","1","1");
// **********************
//Edit the HTML here (keep in mind that any double quote that is HTML requires a backslash in front of it)


echo "

<link rel=\"stylesheet\" type=\"text/css\" href=\"/var/www/html/db/style.css\">

<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"top\" valign=\"top\" width=\"359\" height=\"100%\">
<tr>
<td align=\"top\" valign=\"top\"><img src=\"/db/images/nws01.jpg\"></td>

<td>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"top\" valign=\"top\" width=\"100%\" height=\"100%\">
<tr>
<td><img src=\"/db/images/nws02.jpg\"></td>
</tr>
<tr>
<td bgcolor=\"#000000\" height=\"17\"><center><span class=\"nws\"><a href=\"/var/www/html/forums/showthread.php?s=&threadid=$threadid\"><b>$title</b></a></span></center></td>
</tr>
<tr>
<td><img src=\"/db/images/nws03.jpg\"></td>
</tr>
</table>
</td>

<td align=\"top\" valign=\"top\"><img src=\"/db/images/nws04.jpg\"></td>
</tr>

<tr>
<td align=\"top\" valign=\"top\" background=\"/db/images/nwsbg1.jpg\"><img class=\"inv\" src=\"/db/images/nwsbg1.jpg\"></td>

<td>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"top\" valign=\"top\" width=\"100%\" height=\"100%\">
<tr>
<td bgcolor=\"#000000\" width=\"100%\" height=\"100%\" align=\"top\" valign=\"top\">
<span class=\"nws\"><blockquote></a>$bericht</blockquote><center></span>
</td>
</tr>
</table>
</td>

<td align=\"top\" valign=\"top\" background=\"/db/images/nwsbg2.jpg\"><img class=\"inv\" src=\"/db/images/nwsbg2.jpg\"></td>
</tr>

<tr>
<td align=\"top\" valign=\"top\"><img src=\"/db/images/nws05.jpg\"></td>

<td>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"top\" valign=\"top\" width=\"100%\" height=\"100%\">
<tr>
<td><img src=\"/db/images/nws06.jpg\"></td>
</tr>
<tr>
<td bgcolor=\"#000000\" height=\"17\"><center><span class=\"nws\">Posted By <a href=\"/var/www/html/forums/member.php?s=&action=getinfo&userid=$postuserid\"><b>$postusername</b></a> (<a href=\"$forumspath/showthread.php?s=&threadid=$threadid\"><b>$replycount</b> $commenttext</a>)</span></center></td>
</tr>
<tr>
<td><img src=\"/db/images/nws07.jpg\"></td>
</tr>
</table>
</td>

<td align=\"top\" valign=\"top\"><img src=\"/db/images/nws08.jpg\"></td>
</tr>



<p>
";

}
}


//add news search stuff (this is optional - delete if you do not wish to include this, or edit it to meet your needs
echo "<center><a href=\"$forumspath/search.php?s=\">Search the News</a> | <a href=\"$forumspath/forumdisplay.php?s=&forumid=$newsforums\">View All News Posts</a></center>";

//end HTML edit
//**********************

//disconnect
mysql_free_result($sql_result);
mysql_close($connection);

chdir('/var/www/html/');
?>
Any suggestions how to get the news to display?
Reply With Quote
 


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. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03173 seconds
  • Memory Usage 2,325KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete