<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>DevNetwork Forums</title>
        <description><![CDATA[The Developer's Network]]></description>
        <link>http://forums.devnetwork.net/index.php</link>
        <lastBuildDate>Wed, 08 Sep 2010 20:30:55 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>OpenDir help</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435640#435640</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=35824'>jeremyleyden</a><br /><br />
                                      Posted: Wed Jan 09, 2008 1:41 pm<br /><br />
                                      <br /><br />
                                      I recently removed some code form a website, but I left an @opendir function in the code... nothing else was done to the handle, but I did not have a closedir on the page.  Is it possible that this killed the whole server?  What happens to these handles in PHP5?<br />
<br />
Please tell me I didn't kill the server...<br />
<br />
Thank you in advance!]]></description>
            <author>jeremyleyden</author>
            <pubDate>Wed, 09 Jan 2008 21:41:00 +0100</pubDate>
        </item>
        <item>
            <title>mktime != UNIX_TIMESTAMP</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435635#435635</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=8344'>anjanesh</a><br /><br />
                                      Posted: Wed Jan 09, 2008 1:27 pm<br /><br />
                                      <br /><br />
                                      Both are on the same box (my PC) - Using MySQL 5.0.45 and PHP 5.2.5 on Windows XP SP2<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>Quote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">Are they using the same default timezone?</td><br />
	</tr><br />
</table><br />
<span class="postbody"> How do I check this ?]]></description>
            <author>anjanesh</author>
            <pubDate>Wed, 09 Jan 2008 21:27:00 +0100</pubDate>
        </item>
        <item>
            <title>accesing variable of parent function</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435627#435627</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=7048'>Everah</a><br /><br />
                                      Posted: Wed Jan 09, 2008 11:28 am<br /><br />
                                      <br /><br />
                                      And make sure to read up on the difference of passing by reference on PHP 4 vs. PHP 5.]]></description>
            <author>Everah</author>
            <pubDate>Wed, 09 Jan 2008 19:28:00 +0100</pubDate>
        </item>
        <item>
            <title>Real Newb</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435626#435626</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=7048'>Everah</a><br /><br />
                                      Posted: Wed Jan 09, 2008 11:26 am<br /><br />
                                      <br /><br />
                                      SuperD offered a better, n00b example than mine. As you are learning still I would go with his suggestion. As things start to come a little more naturally, then you can start tinkering with ternaries and the what not.]]></description>
            <author>Everah</author>
            <pubDate>Wed, 09 Jan 2008 19:26:00 +0100</pubDate>
        </item>
        <item>
            <title>Create high resolution PDF</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435621#435621</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=28144'>Kieran Huggins</a><br /><br />
                                      Posted: Wed Jan 09, 2008 10:59 am<br /><br />
                                      <br /><br />
                                      Just use high-res photos. unless you downsample them they'll maintain their resolution.]]></description>
            <author>Kieran Huggins</author>
            <pubDate>Wed, 09 Jan 2008 18:59:00 +0100</pubDate>
        </item>
        <item>
            <title>Replace Line Breaks</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435610#435610</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Wed Jan 09, 2008 9:04 am<br /><br />
                                      <br /><br />
                                      You could compact that using <a href="http://php.net/strtr" target="_blank" class="postlink">strtr()</a>.<br />
Just as a general FYI.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 17:04:00 +0100</pubDate>
        </item>
        <item>
            <title>Problem Delete Query In Mysql</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435604#435604</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=35814'>zoomm</a><br /><br />
                                      Posted: Wed Jan 09, 2008 8:48 am<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>zoomm wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote"></span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>superdezign wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">What data is in <span style="font-weight: bold">$_SESSION['usr1name']</span>?</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
user email</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
<br />
CREATE TABLE `mails` (<br />
  `categoryid` int(11) NOT NULL default '0',<br />
  `userid` varchar(255) NOT NULL default '0',<br />
  `html` int(11) NOT NULL default '0',<br />
  PRIMARY KEY  (`categoryid`,`userid`)<br />
) ENGINE=MyISAM;<br />
<br />
-- <br />
-- '&#913;&#948;&#949;&#953;&#945;&#963;&#956;&#945; &#948;&#949;&#948;&#959;&#956;&#941;&#957;&#969;&#957; &#964;&#959;&#965; &#960;&#943;&#957;&#945;&#954;&#945; `mails`<br />
-- <br />
<br />
INSERT INTO `mails` VALUES (1650, 'test@test.gr', 0);<br />
INSERT INTO `mails` VALUES (1691, 'stest@test.gr', 0);]]></description>
            <author>zoomm</author>
            <pubDate>Wed, 09 Jan 2008 16:48:00 +0100</pubDate>
        </item>
        <item>
            <title>Trouble Creating Small App</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435600#435600</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Wed Jan 09, 2008 8:41 am<br /><br />
                                      <br /><br />
                                      The solution is likely in the <span style="font-weight: bold">nr_who_rated_*</span> JavaScript functions. First, make sure that they are even being called when you expect them to be (i.e. upon clicking whatever button should display the users who voted). Secondly, make sure that AJAX is getting the correct response from the page it is calling on this line:<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">Javascript&#058;</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="javascript">vote_ajax_handler.<span class="me1">send</span><span class="br0">&#40;</span><span class="st0">'/index.php?do=whorated_ajax&amp;nr_w='</span> + what + <span class="st0">'&amp;nr_id='</span> + id<span class="br0">&#41;</span>;</div></td><br />
	</tr><br />
</table><br />
<span class="postbody">]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 16:41:00 +0100</pubDate>
        </item>
        <item>
            <title>Get the html color from a picture</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435596#435596</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Wed Jan 09, 2008 8:25 am<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>psychotomus wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">but that only returns the RGB values and not HTML values. How can I convert the RGB values to an HTML value?</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
"HTML values" are actually hex values. Hex is base 16. Decimal (regular numbers) is base 10.<br />
<br />
What you want to do is convert the decimal RGB value to a hex RGB value. You can use <a href="http://php.net/dechex" target="_blank" class="postlink">dechex()</a> to do the conversion for you, and then just concatenate the three hex values together as a string.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 16:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Question about getting selected mail to delete</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435592#435592</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Wed Jan 09, 2008 8:06 am<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>computerfairy wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">The trouble is: Though I do have the link correct, so that onced clicked, the next page seen says "email successfully deleted"; but, the email won't actually delete.   <img src="images/smiles/icon_confused.gif" alt="Confused" border="0" /></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
Is this actual e-mail email or just an internal website kind of thing?<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>computerfairy wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">What I would LOVE is if someone could volunteer to look over my code and tell me what I am doing wrong.</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
That's what we're all already doing. First though, you have to show us the code. <img src="images/smiles/icon_razz.gif" alt="Razz" border="0" />]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 16:06:00 +0100</pubDate>
        </item>
        <item>
            <title>Searchin DB table</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435551#435551</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=33994'>devendra-m</a><br /><br />
                                      Posted: Wed Jan 09, 2008 4:18 am<br /><br />
                                      <br /><br />
                                      thats quite simple<br />
<br />
lets say u have array of product codes $prd_arr<br />
get the array of product codes from database suppose $prd_db<br />
<br />
now further codes <br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">php:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="php"><br />
<span class="kw2">function</span> checkExists<span class="br0">&#40;</span><span class="re0">$prd_arr</span>,<span class="re0">$prd_db</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$prd_arr</span> <span class="kw1">as</span> <span class="re0">$key</span>=&gt;<span class="re0">$value</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/function.in_array"><span class="kw3">in_array</span></a><span class="br0">&#40;</span><span class="re0">$value</span>,<span class="re0">$prd_db</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">return</span> <span class="kw2">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">return</span> <span class="kw2">true</span>;<br />
<span class="br0">&#125;</span></div></td><br />
	</tr><br />
</table><br />
<span class="postbody">]]></description>
            <author>devendra-m</author>
            <pubDate>Wed, 09 Jan 2008 12:18:00 +0100</pubDate>
        </item>
        <item>
            <title>xml to associative array and encoding</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435547#435547</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=35808'>seco</a><br /><br />
                                      Posted: Wed Jan 09, 2008 3:55 am<br /><br />
                                      <br /><br />
                                      the class that parse xml use xml_create_parser()<br />
and before i save the xml i encode it utf-8 using iconv and it appear correctly <br />
<br />
but now when convert this xml to array i want to print it on image not webpage so i must convert the encoding before using the array]]></description>
            <author>seco</author>
            <pubDate>Wed, 09 Jan 2008 11:55:00 +0100</pubDate>
        </item>
        <item>
            <title>Not sure what to call this, back door?</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435544#435544</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=24554'>Mordred</a><br /><br />
                                      Posted: Wed Jan 09, 2008 2:30 am<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>me! wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">Oh and  the session_start() function is  BEFORE the &lt;html&gt; tag:</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
Move it before the if() that uses $_SESSION.]]></description>
            <author>Mordred</author>
            <pubDate>Wed, 09 Jan 2008 10:30:00 +0100</pubDate>
        </item>
        <item>
            <title>Real Newb</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435523#435523</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=35806'>geraldwhite</a><br /><br />
                                      Posted: Tue Jan 08, 2008 10:57 pm<br /><br />
                                      <br /><br />
                                      Ok I have no idea what I'm doing here, but I have a question I have been doing php for 1 day. see my code below.<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>Code:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="code">&lt;html&gt; <br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt; <br />
<br />
&lt;?php <br />
<br />
$correctage = 21;<br />
$age = $_POST&#91;'age'&#93;; <br />
<br />
if &#40;$age &gt;= $correctage&#41; &#123; <br />
&nbsp; &nbsp; &nbsp;echo 'Come on in, we have alcohol and girls awaiting you'; <br />
&#125; <br />
if &#40;$age &lt; $correctage&#41; &#123; <br />
&nbsp; &nbsp; &nbsp;echo &quot;You're too young for this club, come back when you're $correctage&quot;; <br />
&#125;<br />
if &#40;$age &gt; 46&#41; &#123;<br />
&nbsp; &nbsp; &nbsp;echo 'old';<br />
&#125;<br />
?&gt; <br />
<br />
&lt;/body&gt; <br />
&lt;/html&gt; </td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
Heres my question what if I wanted to add another condision where if the person was over 45 they would be too old???<br />
<br />
I have no idea how to do this, i'm reading alot but this is bugging me.<br />
<br />
thanks.]]></description>
            <author>geraldwhite</author>
            <pubDate>Wed, 09 Jan 2008 06:57:00 +0100</pubDate>
        </item>
        <item>
            <title>Get the html color from a picture</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435522#435522</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=5741'>psychotomus</a><br /><br />
                                      Posted: Tue Jan 08, 2008 10:16 pm<br /><br />
                                      <br /><br />
                                      I browsed threw them all. <br />
<br />
I closest thing I found was<br />
<br />
<a href="http://us2.php.net/manual/en/function.imagecolorat.php" target="_blank" class="postlink">http://us2.php.net/manual/en/function.imagecolorat.php</a><br />
<br />
<br />
but that only returns the RGB values and not HTML values. How can I convert the RGB values to an HTML value?]]></description>
            <author>psychotomus</author>
            <pubDate>Wed, 09 Jan 2008 06:16:00 +0100</pubDate>
        </item>
        <item>
            <title>accesing variable of parent function</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435518#435518</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=9574'>feyd</a><br /><br />
                                      Posted: Tue Jan 08, 2008 10:05 pm<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>superdezign wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">A function can only access it's parameters and global variables.<br />
<br />
... I had no idea PHP supported nested functions, though I hardly see it as a useful 'feature.'</td><br />
	</tr><br />
</table><br />
<span class="postbody">It doesn't support nested functions. It supports the declaration of them anywhere for the most part however.]]></description>
            <author>feyd</author>
            <pubDate>Wed, 09 Jan 2008 06:05:00 +0100</pubDate>
        </item>
        <item>
            <title>Using [] in function call</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435514#435514</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=12909'>Ambush Commander</a><br /><br />
                                      Posted: Tue Jan 08, 2008 9:27 pm<br /><br />
                                      <br /><br />
                                      Yes. You can also chain them together, like $apple = $var[0][0]. Arrays can also be nested, so a more compact way of doing myfunction is:<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">php:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="php"><br />
<span class="kw2">function</span> myfunction<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="kw1">return</span> <a target="_blank"&nbsp; href="http://www.php.net/function.array"><span class="kw3">array</span></a><span class="br0">&#40;</span> <a target="_blank"&nbsp; href="http://www.php.net/function.array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">"apple"</span>,<span class="st0">"banana"</span><span class="br0">&#41;</span>, <a target="_blank"&nbsp; href="http://www.php.net/function.array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">"pear"</span>,<span class="st0">"grapefruit"</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
</div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
although not necessarily more readable.<br />
<br />
See also <a href="http://php.net/function.list" target="_blank" class="postlink">list()</a>]]></description>
            <author>Ambush Commander</author>
            <pubDate>Wed, 09 Jan 2008 05:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Trouble Creating Small App</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435510#435510</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=16774'>camhabib</a><br /><br />
                                      Posted: Tue Jan 08, 2008 8:23 pm<br /><br />
                                      <br /><br />
                                      <span style="color: red"><span style="font-weight: bold">feyd</span> | Please use [php<span style="text-decoration: underline"></span>], [code<span style="text-decoration: underline"></span>] and [syntax="..."<span style="text-decoration: underline"></span>] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: <img src="images/smiles/icon_arrow.gif" alt="Arrow" border="0" /> <a href="http://forums.devnetwork.net/viewtopic.php?t=21171" target="_blank" class="postlink">Posting Code in the Forums</a> to learn how to do it too.</span><br />
<br />
<br />
I'm trying to create an app to utilize an existing framework and pull data from a database.  I have tried contacting the site owner and they have been of no assistance with the technical aspects of my goal.  The site is a online forum (http://honestforum.com).  Users previously had the ability to see the names of the various people that rated their post (with either +/- 1).  Following scheduled site maintenance, the feature was lost and unable to be retrieved (webmaster unavailable).  I have been been trying to create a small online system where users can access the list based on the post id#.  The problem I'm having is trying to identify where the database is and how to accesses the information.  I have isolated the section of code for the rating system.  From this thread (first post, original poster): <a href="http://www.honestforum.com/hf-chat/146520-tribute.html" target="_blank" class="postlink">http://www.honestforum.com/hf-chat/146520-tribute.html</a> the http code pertaining to the rating system is:<br />
<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">HTML:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="html4strict">&nbsp; &nbsp;<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/script.html"><span class="kw2">&lt;script</span></a> <span class="kw3">type</span>=<span class="st0">"text/javascript"</span><span class="kw2">&gt;</span></a></span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="sc2"><span class="coMULTI">&lt;!--<br />
&nbsp; &nbsp;&nbsp; &nbsp;var g_rating_post_1457917 = false;<br />
&nbsp; &nbsp;&nbsp; &nbsp;function rate_post_1457917(vote)<br />
&nbsp; &nbsp;&nbsp; &nbsp;{<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if (g_rating_post_1457917)<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;g_rating_post_1457917 = true;&nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;nr_rate_post( rate_post_done_1457917, 1457917, 146520, vote, 9659 );<br />
&nbsp; &nbsp;&nbsp; &nbsp;}<br />
&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;function rate_post_done_1457917()<br />
&nbsp; &nbsp;&nbsp; &nbsp;{<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;g_rating_post_1457917 = false;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;nr_rate_post_done( 'nr_rating_p1457917', 'thumbs_up_1457917', 'thumbs_dn_1457917' );<br />
&nbsp; &nbsp;&nbsp; &nbsp;}<br />
&nbsp; &nbsp;&nbsp; &nbsp;//--&gt;</span></span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="sc2"><span class="kw2">&lt;/script&gt;</span></span><br />
&nbsp; &nbsp;<br />
<br />
<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/div.html"><span class="kw2">&lt;div</span></a> <span class="kw3">class</span>=<span class="st0">"nr-right"</span><span class="kw2">&gt;</span></a></span><br />
<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">rel</span>=<span class="st0">"nofollow"</span> <span class="kw3">href</span>=<span class="st0">"http://www.honestforum.com/showthread.php?do=ratepost&amp;amp;p=1457917&amp;amp;t=146520&amp;amp;v=1&amp;amp;tui=9659"</span> <span class="kw3">class</span>=<span class="st0">"nr-thumbs-up"</span> <span class="kw3">onclick</span>=<span class="st0">"rate_post_1457917(1); return false;"</span><span class="kw2">&gt;</span></a></span><span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/img.html"><span class="kw2">&lt;img</span></a> <span class="kw3">id</span>=<span class="st0">"thumbs_up_1457917"</span> <span class="kw3">src</span>=<span class="st0">"http://www.honestforum.com/NuRatings/thumbs_up_d.gif"</span> <span class="kw3">border</span>=<span class="st0">"0"</span> <span class="kw3">title</span>=<span class="st0">"Thumbs Up!"</span> /<span class="kw2">&gt;</span></a></span><span class="sc2"><span class="kw2">&lt;/a&gt;</span></span>&nbsp; <br />
<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">rel</span>=<span class="st0">"nofollow"</span> <span class="kw3">href</span>=<span class="st0">"http://www.honestforum.com/showthread.php?do=ratepost&amp;amp;t=146520&amp;amp;t=1457917&amp;amp;v=-1&amp;amp;tui=9659"</span> <span class="kw3">class</span>=<span class="st0">"nr-thumbs-down"</span> <span class="kw3">onclick</span>=<span class="st0">"rate_post_1457917(-1); return false;"</span> <span class="kw2">&gt;</span></a></span><span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/img.html"><span class="kw2">&lt;img</span></a> <span class="kw3">id</span>=<span class="st0">"thumbs_dn_1457917"</span> <span class="kw3">src</span>=<span class="st0">"http://www.honestforum.com/NuRatings/thumbs_dn.gif"</span> <span class="kw3">border</span>=<span class="st0">"0"</span> <span class="kw3">title</span>=<span class="st0">"Thumbs Down!"</span> /<span class="kw2">&gt;</span></a></span><span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><br />
<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/span.html"><span class="kw2">&lt;span&gt;</span></a></span><span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">"/hf-chat/146520-tribute.html#nr-who-rated"</span> <span class="kw3">id</span>=<span class="st0">"nr_rating_p1457917"</span> <span class="kw3">title</span>=<span class="st0">"29 votes"</span> <span class="kw3">onclick</span>=<span class="st0">"nr_who_rated('post', 1457917, 'nr-wrp1457917'); return false;"</span> <span class="kw2">&gt;</span></a></span>-23<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/span&gt;</span></span><br />
<span class="sc2"><span class="kw2">&lt;/div&gt;</span></span><br />
<span class="sc2"><a target="_blank"&nbsp; href="http://december.com/html/4/element/div.html"><span class="kw2">&lt;div</span></a> <span class="kw3">id</span>=<span class="st0">"nr-wrp1457917"</span> <span class="kw3">class</span>=<span class="st0">"nr-who-rated"</span><span class="kw2">&gt;</span></a></span><span class="sc1">&amp;nbsp;</span><span class="sc2"><span class="kw2">&lt;/div&gt;</span></span></div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
<br />
I have been able to retrieve the javascript used for the rating system:<br />
<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">Javascript&#058;</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="javascript"> <span class="coMULTI">/************************************************************************\<br />
&nbsp;*<br />
&nbsp;* NuRatings <br />
&nbsp;* <br />
&nbsp;* Copyright ©2006 NuHit, LLC. All Rights Reserved.<br />
&nbsp;* This file may not be redistributed in whole or significant part.<br />
&nbsp;* <a href="http://www.nuhit.com" target="_blank" class="postlink">http://www.nuhit.com</a> | <a href="http://www.nuhit.com/license.html" target="_blank" class="postlink">http://www.nuhit.com/license.html</a><br />
&nbsp;*<br />
\************************************************************************/</span><br />
<br />
<br />
<span class="kw2">function</span> nr_threshold_changed<span class="br0">&#40;</span> selector, targeturl <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!selector<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;<span class="kw1">for</span> <span class="br0">&#40;</span>i=<span class="nu0">0</span>;i&lt;selector.<span class="me1">length</span>;i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>selector.<span class="me1">options</span><span class="br0">&#91;</span>i<span class="br0">&#93;</span> &amp;&amp; selector.<span class="me1">options</span><span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">selected</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;window.<span class="me1">location</span> = targeturl + selector.<span class="me1">options</span><span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">value</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_thread<span class="br0">&#40;</span> callback, threadid, dir <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;vote_ajax_handler = <span class="kw2">new</span> vB_AJAX_Handler<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">onreadystatechange</span><span class="br0">&#40;</span> callback <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">send</span><span class="br0">&#40;</span><span class="st0">'forumdisplay.php?do=ratethread_ajax&amp;t='</span> + threadid + <span class="st0">'&amp;v='</span> + dir<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_thread_done<span class="br0">&#40;</span> rating_id, thumbs_up_id, thumbs_dn_id <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">readyState</span> == <span class="nu0">4</span> &amp;&amp; vote_ajax_handler.<span class="me1">handler</span>.<span class="kw3">status</span> == <span class="nu0">200</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;response = nr_process_response<span class="br0">&#40;</span> vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">responseText</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!response || !response.<span class="me1">action</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="me1">action</span> == <span class="nu0">1</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span>&nbsp; <span class="co1">// update display</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link = fetch_object<span class="br0">&#40;</span> rating_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>link<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link.<span class="me1">innerHTML</span> = response.<span class="me1">ratingtext</span> ? response.<span class="me1">ratingtext</span> : response.<span class="me1">rating</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link.<span class="me1">title</span> = response.<span class="me1">votestext</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;up = fetch_object<span class="br0">&#40;</span> thumbs_up_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>up<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;up.<span class="me1">src</span> = response.<span class="me1">rating</span> &gt;= <span class="nu0">0</span> ? g_nr_thumbs_up_src : g_nr_thumbs_up_d_src;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;dn = fetch_object<span class="br0">&#40;</span> thumbs_dn_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>dn<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;dn.<span class="me1">src</span> = response.<span class="me1">rating</span> &lt;= <span class="nu0">0</span> ? g_nr_thumbs_dn_src : g_nr_thumbs_dn_d_src;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_post<span class="br0">&#40;</span> callback, postid, threadid, vote, theuserid <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;vote_ajax_handler = <span class="kw2">new</span> vB_AJAX_Handler<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">onreadystatechange</span><span class="br0">&#40;</span> callback <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">send</span><span class="br0">&#40;</span><span class="st0">'showthread.php?do=ratepost_ajax&amp;p='</span> + postid + <span class="st0">'&amp;t='</span> + threadid + <span class="st0">'&amp;v='</span> + vote + <span class="st0">'&amp;tui='</span> + theuserid <span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_post_done<span class="br0">&#40;</span> rating_id, thumbs_up_id, thumbs_dn_id <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">readyState</span> == <span class="nu0">4</span> &amp;&amp; vote_ajax_handler.<span class="me1">handler</span>.<span class="kw3">status</span> == <span class="nu0">200</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;response = nr_process_response<span class="br0">&#40;</span> vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">responseText</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!response || !response.<span class="me1">action</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="me1">action</span> == <span class="nu0">1</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span>&nbsp; <span class="co1">// update display</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link = fetch_object<span class="br0">&#40;</span> rating_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>link<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link.<span class="me1">innerHTML</span> = response.<span class="me1">ratingtext</span> ? response.<span class="me1">ratingtext</span> : response.<span class="me1">rating</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;link.<span class="me1">title</span> = response.<span class="me1">votestext</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;up = fetch_object<span class="br0">&#40;</span> thumbs_up_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>up<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;up.<span class="me1">src</span> = response.<span class="me1">rating</span> &gt;= <span class="nu0">0</span> ? g_nr_thumbs_up_src : g_nr_thumbs_up_d_src;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;dn = fetch_object<span class="br0">&#40;</span> thumbs_dn_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>dn<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;dn.<span class="me1">src</span> = response.<span class="me1">rating</span> &lt;= <span class="nu0">0</span> ? g_nr_thumbs_dn_src : g_nr_thumbs_dn_d_src;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_user<span class="br0">&#40;</span> vote, clicked_on_id, option_count <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="co1">// update checkboxes</span><br />
&nbsp; &nbsp;<span class="kw1">for</span> <span class="br0">&#40;</span>i=<span class="nu0">0</span>; i&lt;option_count; i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;check_id = <span class="st0">"nr-check-"</span> + i;<br />
&nbsp; &nbsp;&nbsp; &nbsp;checkbox = fetch_object<span class="br0">&#40;</span> check_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>checkbox<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;checkbox.<span class="me1">checked</span> = check_id == clicked_on_id;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp;theuserid = g_nr_userid;<br />
&nbsp; &nbsp;vote_ajax_handler = <span class="kw2">new</span> vB_AJAX_Handler<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">onreadystatechange</span><span class="br0">&#40;</span> nr_rate_user_done <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">send</span><span class="br0">&#40;</span><span class="st0">'member.php?do=rateuser_ajax&amp;u='</span> + theuserid + <span class="st0">'&amp;v='</span> + vote<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_rate_user_done<span class="br0">&#40;</span> rating_id <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">readyState</span> == <span class="nu0">4</span> &amp;&amp; vote_ajax_handler.<span class="me1">handler</span>.<span class="kw3">status</span> == <span class="nu0">200</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;response = nr_process_response<span class="br0">&#40;</span> vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">responseText</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!response || !response.<span class="me1">action</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="me1">action</span> == <span class="nu0">1</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span>&nbsp; <span class="co1">// update display</span><br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;rating_label = fetch_object<span class="br0">&#40;</span> <span class="st0">'nr-user-rating'</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>rating_label<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;rating_label.<span class="me1">innerHTML</span> = response.<span class="me1">ratingtext</span> ? response.<span class="me1">ratingtext</span> : response.<span class="me1">rating</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;votes_label = fetch_object<span class="br0">&#40;</span> <span class="st0">'nr-user-votes'</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>votes_label<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;votes_label.<span class="me1">innerHTML</span> = response.<span class="me1">votestext</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_process_response<span class="br0">&#40;</span> response_txt <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="co1">// unencode commas</span><br />
&nbsp; &nbsp;response_txt = response_txt.<span class="me1">replace</span><span class="br0">&#40;</span> <span class="st0">',,'</span>, <span class="st0">','</span> <span class="br0">&#41;</span>;<br />
<br />
&nbsp; &nbsp;response = <span class="kw2">new</span> Object<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;response.<span class="me1">action</span> = <span class="nu0">0</span>;<br />
&nbsp; &nbsp;response.<span class="me1">fullresponse</span> = response_txt;<br />
&nbsp; &nbsp;parts = response_txt.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">','</span><span class="br0">&#41;</span>;<br />
<br />
&nbsp; &nbsp;<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i=<span class="nu0">0</span>; i&lt;parts.<span class="me1">length</span>; i++<span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw2">var</span> p2 = parts<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">'='</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>p2.<span class="me1">length</span> == <span class="nu0">2</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;response<span class="br0">&#91;</span> p2<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#93;</span> = p2<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">else</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw2">var</span> label = p2.<span class="me1">shift</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;response<span class="br0">&#91;</span> label.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#93;</span> = p2.<span class="me1">join</span><span class="br0">&#40;</span><span class="st0">'='</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="me1">action</span> == <span class="nu0">2</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;window.<span class="kw3">alert</span><span class="br0">&#40;</span> response.<span class="me1">message</span> <span class="br0">&#41;</span>;<br />
<br />
&nbsp; &nbsp;<span class="kw1">return</span> response;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">var</span> g_nr_who_rated_ref = <span class="kw2">null</span>;<br />
<span class="kw2">function</span> nr_who_rated<span class="br0">&#40;</span> what, id, where <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>g_nr_who_rated_ref<span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;bClose = g_nr_who_rated_ref == where;<br />
&nbsp; &nbsp;&nbsp; &nbsp;nr_hide_who_voted<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>bClose<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;g_nr_who_rated_ref = where;<br />
&nbsp; &nbsp;vote_ajax_handler = <span class="kw2">new</span> vB_AJAX_Handler<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">onreadystatechange</span><span class="br0">&#40;</span> nr_who_rated_done <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;vote_ajax_handler.<span class="me1">send</span><span class="br0">&#40;</span><span class="st0">'/index.php?do=whorated_ajax&amp;nr_w='</span> + what + <span class="st0">'&amp;nr_id='</span> + id<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_who_rated_done<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">readyState</span> == <span class="nu0">4</span> &amp;&amp; vote_ajax_handler.<span class="me1">handler</span>.<span class="kw3">status</span> == <span class="nu0">200</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;response = nr_process_response<span class="br0">&#40;</span> vote_ajax_handler.<span class="me1">handler</span>.<span class="me1">responseText</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!response || !response.<span class="me1">action</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="me1">action</span> == <span class="nu0">3</span><span class="br0">&#41;</span>&nbsp; <span class="co1">// html sent, show it.</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span>&nbsp; <span class="co1">// update display</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;obj = g_nr_who_rated_ref ? fetch_object<span class="br0">&#40;</span>g_nr_who_rated_ref<span class="br0">&#41;</span> : fetch_object<span class="br0">&#40;</span><span class="st0">'nr-who-rated'</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>obj<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="co1">// change object's content</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;obj.<span class="me1">innerHTML</span> = response.<span class="me1">html</span>;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="co1">// show it</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;obj.<span class="me1">style</span>.<span class="me1">display</span> = <span class="st0">'block'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_hide_who_voted<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;elem = g_nr_who_rated_ref ? fetch_object<span class="br0">&#40;</span>g_nr_who_rated_ref<span class="br0">&#41;</span> : <span class="kw2">null</span>;<br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>elem<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;elem.<span class="me1">style</span>.<span class="me1">display</span> = <span class="st0">'none'</span>;<br />
&nbsp; &nbsp;g_nr_who_rated_ref = <span class="kw2">null</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="kw2">function</span> nr_toggle_post<span class="br0">&#40;</span> post_id <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw2">var</span> post_ctr_id = <span class="st0">"post"</span> + post_id;<br />
&nbsp; &nbsp;<span class="kw2">var</span> post_ctr = fetch_object<span class="br0">&#40;</span> post_ctr_id <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!post_ctr<span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">return</span>;<br />
<br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>post_ctr.<span class="me1">style</span>.<span class="me1">display</span> == <span class="st0">'none'</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;post_ctr.<span class="me1">style</span>.<span class="me1">display</span> = <span class="st0">''</span>;<br />
&nbsp; &nbsp;<span class="kw1">else</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;post_ctr.<span class="me1">style</span>.<span class="me1">display</span> = <span class="st0">'none'</span>;<br />
<span class="br0">&#125;</span></div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
I am unable to access the root directory for a index of files, chance any existing files, or access any existing PHP scrips, which is the main difficulty I am facing.  I would love to be able to output in a simple table form a list of names and what they rated each post.  Any help at all would be greatly appreciated.<br />
<br />
<br />
<span style="color: red"><span style="font-weight: bold">feyd</span> | Please use [php<span style="text-decoration: underline"></span>], [code<span style="text-decoration: underline"></span>] and [syntax="..."<span style="text-decoration: underline"></span>] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: <img src="images/smiles/icon_arrow.gif" alt="Arrow" border="0" /> <a href="http://forums.devnetwork.net/viewtopic.php?t=21171" target="_blank" class="postlink">Posting Code in the Forums</a> to learn how to do it too.</span>]]></description>
            <author>camhabib</author>
            <pubDate>Wed, 09 Jan 2008 04:23:00 +0100</pubDate>
        </item>
        <item>
            <title>What is the most search engine friendly cms?</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435504#435504</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 6:58 pm<br /><br />
                                      <br /><br />
                                      Well if you want a free CMS, you might as well go with <a href="http://drupal.org" target="_blank" class="postlink">Drupal</a>. It's open-source, so developers are always improving it to work for them, so you're bound to find a lot of plugins to help you out.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 02:58:00 +0100</pubDate>
        </item>
        <item>
            <title>Beginner- passing multipal values problem</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435503#435503</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=13810'>Addos</a><br /><br />
                                      Posted: Tue Jan 08, 2008 6:56 pm<br /><br />
                                      <br /><br />
                                      Thanks for the pointers and yep this page is under a secure login for a private client so I think it should be ok as it's not open to the general public.<br />
<br />
Thanks again and by the way I really love your site and will enjoy reading through the tutiorials there.<br />
Thanks again.<br />
B]]></description>
            <author>Addos</author>
            <pubDate>Wed, 09 Jan 2008 02:56:00 +0100</pubDate>
        </item>
        <item>
            <title>fast and simple serach for videos without using a database ?</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435493#435493</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 6:32 pm<br /><br />
                                      <br /><br />
                                      You know, we use databases because they make our lives easier. Databases aren't very complex and even database design becomes easy when you know the concepts. Why don't you want to use a database? It'd make adding videos, displaying them, and searching through them that much simpler.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 02:32:00 +0100</pubDate>
        </item>
        <item>
            <title>Google Suggest functionality on a web page</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435484#435484</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 4:47 pm<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>itp wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">I don't want to create my own terms database or repository of documents. I just want to hook up to Google suggest page, like you can do with Google Maps.</td><br />
	</tr><br />
</table><br />
<span class="postbody">Unless Google.com gives you the tools to do so, then Google probably won't allow you to do it (without retaliation). You could always create your database of search terms specific to search terms that were actually used on your site, so every time someone searches, you save it. It'll keep things more relevant too. An issue you'll face will likely be dealing with spelling errors.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 00:47:00 +0100</pubDate>
        </item>
        <item>
            <title>Redirect</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435483#435483</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 4:43 pm<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>westen wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">Thank you, I just deleted the index.html file.  Is there no problems associated with this?</td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
Not if you have an index.php file (and your server accepts it as the default).]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 00:43:00 +0100</pubDate>
        </item>
        <item>
            <title>Weird thing happening in my loop...</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435480#435480</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 4:32 pm<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>Mordred wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote"><span class="strike">BIT-----&gt;</span> BOOL ?</td><br />
	</tr><br />
</table><br />
<span class="postbody">I think BIT, BOOL, BOOLEAN, and TINYINT(1) are all the same. I'm sure that TINYINT(1) and BOOL are, at least.<br />
<br />
I was more curious as to how you created the arrow than really needing to make a response though. Creative. <img src="images/smiles/icon_razz.gif" alt="Razz" border="0" />]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 00:32:00 +0100</pubDate>
        </item>
        <item>
            <title>File upload</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435479#435479</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 4:28 pm<br /><br />
                                      <br /><br />
                                      If the code works, then it's likely a problem of permissions. Sometimes, you need to give all permissions to the folder PHP will be uploading to as well as the folder that the upload folder is in. If you want to avoid the complications, actually build the folder from within PHP so that PHP already has the ownership permissions.]]></description>
            <author>superdezign</author>
            <pubDate>Wed, 09 Jan 2008 00:28:00 +0100</pubDate>
        </item>
        <item>
            <title>accesing variable of parent function</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435476#435476</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 3:51 pm<br /><br />
                                      <br /><br />
                                      A function can only access it's parameters and global variables.<br />
<br />
... I had no idea PHP supported nested functions, though I hardly see it as a useful 'feature.']]></description>
            <author>superdezign</author>
            <pubDate>Tue, 08 Jan 2008 23:51:00 +0100</pubDate>
        </item>
        <item>
            <title>&amp;amp; sign before an array object...why?</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435472#435472</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=29092'>superdezign</a><br /><br />
                                      Posted: Tue Jan 08, 2008 3:22 pm<br /><br />
                                      <br /><br />
                                      </span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>mlecho wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">what i don't understand is the test_alter function....why must there be an ampersan (&amp;) before $item1</td><br />
	</tr><br />
</table><br />
<span class="postbody">The ampersand symbolizes the sending of a reference. In PHP, when you send a variable to a function, a copy of that variable is made in the function, not the actual variable itself. The ampersand sends the actual variable (more accurately, the address of the variable in most languages). You only need to use it when you will be actually altering the parameter's data.<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr> <br />
	  <td><span class="genmed"><b>mlecho wrote:</b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="quote">why is $key present in the parameters...it is not used in the function</td><br />
	</tr><br />
</table><br />
<span class="postbody">Because array_walk invokes the function that way. Did you read the <a href="http://php.net/array-walk" target="_blank" class="postlink">manual</a>? The example shows you that the function is called function($value, $key [,$extraParameters [,...]]) (I think <img src="images/smiles/icon_razz.gif" alt="Razz" border="0" />).]]></description>
            <author>superdezign</author>
            <pubDate>Tue, 08 Jan 2008 23:22:00 +0100</pubDate>
        </item>
        <item>
            <title>Redirect</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435464#435464</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=34898'>westen</a><br /><br />
                                      Posted: Tue Jan 08, 2008 1:21 pm<br /><br />
                                      <br /><br />
                                      Thank you, I just deleted the index.html file.  Is there no problems associated with this?<br />
<br />
<br />
Cheers,<br />
Westen]]></description>
            <author>westen</author>
            <pubDate>Tue, 08 Jan 2008 21:21:00 +0100</pubDate>
        </item>
        <item>
            <title>Clicking column headings to sort and reverse sort</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435462#435462</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=9574'>feyd</a><br /><br />
                                      Posted: Tue Jan 08, 2008 12:55 pm<br /><br />
                                      <br /><br />
                                      Useful Posts has a thread linked about this subject matter.]]></description>
            <author>feyd</author>
            <pubDate>Tue, 08 Jan 2008 20:55:00 +0100</pubDate>
        </item>
        <item>
            <title>phpbb2 - phpbb3 help [0/3 UNSOLVED]</title>
            <link>http://forums.devnetwork.net/viewtopic.php?p=435459#435459</link>
            <description><![CDATA[<br />
                                      Author: <a href='http://forums.devnetwork.net/profile.php?mode=viewprofile&u=14457'>gaogier</a><br /><br />
                                      Posted: Tue Jan 08, 2008 12:38 pm<br /><br />
                                      <br /><br />
                                      Hello...<br />
<br />
News [Unsolved]<br />
I have code which shows the first post in a topic in a forum (we have set it up to the news forums). We are now using phpbb3 forum software, where the code works with phpbb2 forum software. I have tried to convert the code to phpbb3 forum software, but no errors or data shows.<br />
<br />
Can someone convert it for me? Or help me do it?<br />
<br />
<br />
<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">php:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="php"><span class="kw2">&lt;?php</span><br />
<span class="co2"># News Db script - index.php</span><br />
<span class="co2"># Created on 21 January 2005</span><br />
<span class="co2"># Created by Joseph Jeffery</span><br />
<br />
<span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">'header.inc'</span><span class="br0">&#41;</span>;<br />
<br />
<br />
<br />
<br />
<span class="co1">//function displayNews($all = 0) {</span><br />
<span class="co1">//global $sitestyle;</span><br />
&nbsp; &nbsp;<span class="kw1">require_once</span> <span class="br0">&#40;</span><span class="st0">'../mysql_connect1.php'</span><span class="br0">&#41;</span>;<span class="co1">//connect to db</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$all</span> == <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$topic_query</span> = <span class="st0">"SELECT * FROM `phpbb_topics` WHERE `forum_id`= '63' ORDER BY `topic_time` DESC LIMIT 7"</span>; <span class="co1">// do topic query</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$topic_query</span> = <span class="st0">"SELECT * FROM `phpbb_topics` WHERE `forum_id`= '63' ORDER BY `topic_time` DESC"</span>; <span class="co1">// do topic query</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$topic_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a> <span class="br0">&#40;</span><span class="re0">$topic_query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$topic_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$topic_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$tt</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_time'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$topic</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_id'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$poster</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_poster'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$first</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_first_post_id'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$title</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_title'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$topic_replies</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_replies'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$topic_runescape</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_runescape'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$post_query</span> = <span class="st0">"SELECT * FROM `phpbb_posts` WHERE&nbsp; `topic_id` = '$topic' AND `poster_id` = '$poster' AND `post_id` = '$first'"</span>; <span class="co1">// do post subject query</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$post_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$post_query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$post_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$post_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$post_id</span> = <span class="re0">$post_row</span><span class="br0">&#91;</span><span class="st0">'post_id'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$use_query</span> = <span class="st0">"SELECT `username`, `user_avatar`, `user_email`, `user_rank` FROM `phpbb_users` WHERE `user_id` = '$poster'"</span>; <span class="co1">// do user query</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$use_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$use_query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$use_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$use_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$user</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$user_avatar</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'user_avatar'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$user_email</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'user_email'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$rank</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'user_rank'</span><span class="br0">&#93;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$news_query</span> = <span class="st0">"SELECT `post_text` FROM `phpbb_posts_text` WHERE `post_id`='$post_id'"</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$news_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$news_query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$news_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$news_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$news</span> = <span class="re0">$news_row</span><span class="br0">&#91;</span><span class="st0">'post_text'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$rank_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="st0">"SELECT `rank_title` FROM `phpbb_ranks` WHERE `rank_id`='$rank'"</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span><span class="br0">&#40;</span><span class="re0">$rank_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$rank_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$ranks</span> = <span class="re0">$rank_row</span><span class="br0">&#91;</span><span class="st0">'rank_title'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$date</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.date"><span class="kw3">date</span></a><span class="br0">&#40;</span><span class="st0">"D M jS, Y g:i a"</span>, <span class="re0">$tt</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$topic_replies</span> == <span class="nu0">0</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$reply</span> = <span class="st0">'&lt;a href=&quot;http://www.runehints.com/phpbb/posting.php?mode=reply&amp;t='</span>.<span class="re0">$topic</span>.<span class="st0">'&quot;&gt;Nobody has commented on this piece of news yet. Be the first!&lt;/a&gt;'</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$post_new</span> =<span class="st0">""</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$reply</span> =&nbsp; <span class="st0">'comments(&lt;a href=&quot;http://www.runehints.com/phpbb/viewtopic.php?t='</span>.<span class="re0">$topic</span>.<span class="st0">'&quot;&gt;'</span>.<span class="re0">$topic_replies</span>.<span class="st0">'&lt;/a&gt;) |'</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$post_new</span> = <span class="st0">'&lt;a href=&quot;http://www.runehints.com/phpbb/posting.php?mode=reply&amp;t='</span>.<span class="re0">$topic</span>.<span class="st0">'&quot;&gt;Post a comment&lt;/a&gt;'</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$topic_runescape</span> == <span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$news1</span> = <span class="st0">'This news topic is taken straight from &lt;a href=&quot;http://runescape.com&quot;&gt;Runescape.com&lt;/a&gt;&lt;br /&gt;_____________________________________________&lt;br /&gt;&lt;br /&gt;'</span>.<span class="re0">$news</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$news1</span> = <span class="re0">$news</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Replace newlines //</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$news2</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">"<span class="es0">\n</span>"</span>, <span class="st0">"<span class="es0">\n</span>&lt;br /&gt;<span class="es0">\n</span>"</span>, <span class="re0">$news1</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span class="kw2">?&gt;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&lt;table border=<span class="st0">"0"</span> cellpadding=<span class="st0">"0"</span> cellspacing=<span class="st0">"0"</span> width=<span class="st0">"100%"</span> <span class="kw2">class</span>=<span class="st0">"news"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tabletopl.jpg"</span> height=<span class="st0">"25"</span> width=<span class="st0">"30"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tabletopm.jpg"</span> height=<span class="st0">"25"</span>&gt;&lt;div align=<span class="st0">"center"</span>&gt;&lt;p <span class="kw2">class</span>=<span class="st0">"small2"</span>&gt;&lt;a href=<span class="st0">"http://www.runehints.com/phpbb/viewtopic.php?t=&lt;?php echo $topic; ?&gt;"</span> <span class="kw2">class</span>=<span class="st0">"news"</span>&gt;&lt;?php <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$title</span>; ?&gt;&lt;/a&gt; posted by &lt;a href=<span class="st0">"http://www.runehints.com/phpbb/profile.php?mode=viewprofile&amp;u=&lt;?php echo $poster; ?&gt;"</span>&gt;&lt;?php <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$user</span>; ?&gt;&lt;/a&gt; on <span class="kw2">&lt;?php</span> <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$date</span>;?&gt;&lt;/p&gt;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tabletopr.jpg"</span> height=<span class="st0">"25"</span> width=<span class="st0">"30"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;/table&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;table border=<span class="st0">"0"</span> cellpadding=<span class="st0">"0"</span> cellspacing=<span class="st0">"0"</span> width=<span class="st0">"100%"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablemidl.jpg"</span> width=<span class="st0">"16"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;td align=<span class="st0">"center"</span> border=<span class="st0">"0"</span> cellpadding=<span class="st0">"0"</span> cellspacing=<span class="st0">"0"</span>&gt; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img src=<span class="st0">"&lt;?php echo $user_avatar; ?&gt;"</span> &gt;&lt;br /&gt;&lt;center&gt;&lt;font <span class="kw2">class</span>=<span class="st0">"small2"</span>&gt;&lt;?php <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$ranks</span>; ?&gt;&lt;/font&gt;&lt;/center&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=<span class="st0">"429"</span>&gt; &lt;p&gt;&lt;font <span class="kw2">class</span>=<span class="st0">"small2"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;p&gt;&lt;?php <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$news2</span>; ?&gt;&lt;/p&gt;&lt;br&gt;<br />
&nbsp; &nbsp; &nbsp;&lt;br /&gt;&lt;font <span class="kw2">class</span>=<span class="st0">"small2"</span>&gt;&lt;?php <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="re0">$reply</span>. <span class="st0">' '</span>. <span class="re0">$post_new</span>;?&gt;<br />
&lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablemidr.jpg"</span> width=<span class="st0">"16"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;<br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &lt;table border=<span class="st0">"0"</span> cellpadding=<span class="st0">"0"</span> cellspacing=<span class="st0">"0"</span> width=<span class="st0">"100%"</span>&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;&lt;tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=<span class="st0">"16"</span>&gt;&lt;img src=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablebottoml.jpg"</span> height=<span class="st0">"13"</span> width=<span class="st0">"16"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td background=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablebottomm.jpg"</span> height=<span class="st0">"13"</span>&gt;&lt;img src=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablebottomm.jpg"</span> height=<span class="st0">"13"</span> width=<span class="st0">"1"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=<span class="st0">"16"</span>&gt;&lt;img src=<span class="st0">"images/&lt;?php echo $sitestyle.'_';?&gt;tablebottomr.jpg"</span> height=<span class="st0">"13"</span> width=<span class="st0">"16"</span>&gt;&lt;/td&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;/table&gt;&lt;/div&gt;&lt;br /&gt;<br />
&nbsp; &nbsp;<span class="kw2">&lt;?php</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="coMULTI">/* if we aren't displaying all news, <br />
&nbsp; &nbsp; &nbsp;* then give a link to do so */</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$all</span> == <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">"&lt;center&gt;&lt;a href=<span class="es0">\"</span>{$_SERVER['PHP_SELF']}"</span> .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">"?action=all<span class="es0">\"</span>&gt;View all news&lt;/a&gt;&lt;/center&gt;<span class="es0">\n</span>"</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="co1">//mysql_close();</span><br />
<span class="co1">//}</span><br />
<br />
<span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">'footer.inc'</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
<br />
Forum Stats [Unsolved]<br />
<br />
Here is a little script that shows data from the forums on the main pages. Again this code works fine with phpbb2 forums, but not phpbb3.<br />
<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">php:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="php">&lt;head&gt; <br />
&lt;link rel=<span class="st0">"shortcut icon"</span> href=<span class="st0">"images/icon/favicon.ico"</span> type=<span class="st0">"image/x-icon"</span> /&gt;<br />
&lt;!--&lt;link rel=<span class="st0">"stylesheet"</span> type=<span class="st0">"text/css"</span> href=<span class="st0">"darkblue.css"</span>&gt;--&gt;<br />
&lt;link rel=<span class="st0">"stylesheet"</span> type=<span class="st0">"text/css"</span> media=<span class="st0">"screen"</span> title=<span class="st0">"User Defined Style"</span> href=<span class="st0">"&lt;?php echo (!$sitestyle)?'darkblue':$sitestyle ?&gt;.css"</span> /&gt;<br />
<span class="kw2">&lt;?php</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$sitestyle</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$sitestyle</span> = <span class="st0">"darkblue"</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw2">?&gt;</span><br />
&lt;/head&gt;<br />
&lt;body &gt;<br />
<span class="kw2">&lt;?php</span><br />
<span class="kw1">require_once</span> <span class="br0">&#40;</span><span class="st0">'../mysql_connect1.php'</span><span class="br0">&#41;</span>;<span class="co1">//connect to db</span><br />
<a target="_blank"&nbsp; href="http://www.php.net/function.define"><span class="kw3">define</span></a><span class="br0">&#40;</span><span class="st0">'IN_PHPBB'</span>, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.define"><span class="kw3">define</span></a><span class="br0">&#40;</span><span class="st0">'PHPBB_INSTALLED'</span>, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$phpbb_root_path</span> = <span class="st0">'forums/'</span>;<br />
<span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">'forums/extension.inc'</span><span class="br0">&#41;</span>;<br />
<span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">'forums/common.php'</span><span class="br0">&#41;</span>;<br />
<br />
<span class="re0">$total_posts</span> = get_db_stat<span class="br0">&#40;</span><span class="st0">'postcount'</span><span class="br0">&#41;</span>;<br />
<span class="re0">$total_users</span> = get_db_stat<span class="br0">&#40;</span><span class="st0">'usercount'</span><span class="br0">&#41;</span>;<br />
<span class="re0">$newest_userdata</span> = get_db_stat<span class="br0">&#40;</span><span class="st0">'newestuser'</span><span class="br0">&#41;</span>;<br />
<span class="re0">$newest_user</span> = <span class="re0">$newest_userdata</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
<span class="re0">$newest_uid</span> = <span class="re0">$newest_userdata</span><span class="br0">&#91;</span><span class="st0">'user_id'</span><span class="br0">&#93;</span>;<br />
<br />
<span class="re0">$sql</span> = <span class="st0">"SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, u.user_whosonline_color, s.session_logged_in, s.session_time, s.session_page, s.session_ip<br />
&nbsp; &nbsp;FROM "</span>.USERS_TABLE.<span class="st0">" u, "</span>.SESSIONS_TABLE.<span class="st0">" s<br />
&nbsp; &nbsp;WHERE u.user_id = s.session_user_id<br />
&nbsp; &nbsp;&nbsp; &nbsp;AND s.session_time &gt;= "</span>.<span class="br0">&#40;</span> <a target="_blank"&nbsp; href="http://www.php.net/function.time"><span class="kw3">time</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">300</span> <span class="br0">&#41;</span> . <span class="st0">"<br />
&nbsp; &nbsp;ORDER BY u.username ASC, s.session_ip ASC"</span>;<br />
<span class="kw1">if</span> <span class="br0">&#40;</span> !<span class="br0">&#40;</span><span class="re0">$result</span> = <span class="re0">$db</span>-&gt;<span class="me1">sql_query</span><span class="br0">&#40;</span><span class="re0">$sql</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;message_die<span class="br0">&#40;</span>GENERAL_ERROR, <span class="st0">'Could not obtain regd user/online information'</span>, <span class="st0">''</span>, <span class="kw2">__LINE__</span>, <span class="kw2">__FILE__</span>, <span class="re0">$sql</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="re0">$guest_users</span> = <span class="nu0">0</span>;<br />
<span class="re0">$registered_users</span> = <span class="nu0">0</span>;<br />
<span class="re0">$hidden_users</span> = <span class="nu0">0</span>;<br />
<br />
<span class="re0">$reg_counter</span> = <span class="nu0">0</span>;<br />
<span class="re0">$guest_counter</span> = <span class="nu0">0</span>;<br />
<span class="re0">$prev_user</span> = <span class="nu0">0</span>;<br />
<span class="re0">$prev_ip</span> = <span class="st0">''</span>;<br />
<br />
<span class="kw1">while</span> <span class="br0">&#40;</span> <span class="re0">$row</span> = <span class="re0">$db</span>-&gt;<span class="me1">sql_fetchrow</span><span class="br0">&#40;</span><span class="re0">$result</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="re0">$view_online</span> = <span class="kw2">false</span>;<br />
<br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'session_logged_in'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span> <br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$user_id</span> = <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_id'</span><span class="br0">&#93;</span>;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$user_id</span> != <span class="re0">$prev_user</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$style_color</span> = <span class="st0">''</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_whosonline_color'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="st0">'&lt;b style=&quot;color:'</span> . <span class="re0">$id_color</span><span class="br0">&#91;</span><span class="re0">$row</span><span class="br0">&#91;</span>user_whosonline_color<span class="br0">&#93;</span><span class="br0">&#93;</span> . <span class="st0">'&quot;&gt;'</span> . <span class="re0">$username</span> . <span class="st0">'&lt;/b&gt;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_level'</span><span class="br0">&#93;</span> == ADMIN <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="st0">'&lt;b style=&quot;color:#'</span> . <span class="re0">$theme</span><span class="br0">&#91;</span><span class="st0">'fontcolor3'</span><span class="br0">&#93;</span> . <span class="st0">'&quot;&gt;'</span> . <span class="re0">$username</span> . <span class="st0">'&lt;/b&gt;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_level'</span><span class="br0">&#93;</span> == MOD <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="st0">'&lt;b style=&quot;color:#'</span> . <span class="re0">$theme</span><span class="br0">&#91;</span><span class="st0">'fontcolor2'</span><span class="br0">&#93;</span> . <span class="st0">'&quot;&gt;'</span> . <span class="re0">$username</span> . <span class="st0">'&lt;/b&gt;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$user_group_color</span><span class="br0">&#91;</span><span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_id'</span><span class="br0">&#93;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="st0">'&lt;b style=&quot;color:'</span> . <span class="re0">$user_group_color</span><span class="br0">&#91;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_id'</span><span class="br0">&#93;</span> <span class="br0">&#93;</span> . <span class="st0">'&quot;&gt;'</span> . <span class="re0">$username</span> . <span class="st0">'&lt;/b&gt;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span> !<span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'user_allow_viewonline'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$view_online</span> = <span class="br0">&#40;</span> <span class="re0">$userdata</span><span class="br0">&#91;</span><span class="st0">'user_level'</span><span class="br0">&#93;</span> == ADMIN <span class="br0">&#41;</span> ? <span class="kw2">true</span> : <span class="kw2">false</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$hidden_users</span>++;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="st0">'&lt;i&gt;'</span> . <span class="re0">$username</span> . <span class="st0">'&lt;/i&gt;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">else</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$view_online</span> = <span class="kw2">true</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$registered_users</span>++;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$which_counter</span> = <span class="st0">'reg_counter'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$which_row</span> = <span class="st0">'reg_user_row'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$prev_user</span> = <span class="re0">$user_id</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="kw1">else</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'session_ip'</span><span class="br0">&#93;</span> != <span class="re0">$prev_ip</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$username</span> = <span class="re0">$lang</span><span class="br0">&#91;</span><span class="st0">'Guest'</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$view_online</span> = <span class="kw2">true</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$guest_users</span>++;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$which_counter</span> = <span class="st0">'guest_counter'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="re0">$which_row</span> = <span class="st0">'guest_user_row'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp;<span class="re0">$prev_ip</span> = <span class="re0">$row</span><span class="br0">&#91;</span><span class="st0">'session_ip'</span><span class="br0">&#93;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;font class=&quot;small&quot;&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'Registered Users:&lt;/font&gt; &lt;font class=&quot;small2&quot;&gt;'</span>.<span class="re0">$total_users</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;/font&gt;&lt;font class=&quot;small&quot;&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;br /&gt;Newest User:&lt;/font&gt; &lt;a href=&quot;forums/profile.php?mode=viewprofile&amp;u='</span>.<span class="re0">$newest_uid</span>.<span class="st0">'&quot;&gt;'</span>.<span class="re0">$newest_user</span>.<span class="st0">'&lt;/a&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;font class=&quot;small&quot;&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;br /&gt;Total Posts:&lt;/font&gt; &lt;font class=&quot;small2&quot;&gt;'</span>.<span class="re0">$total_posts</span>.<span class="st0">'&lt;/font&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;font class=&quot;small&quot;&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;br /&gt;Users online:&lt;/font&gt; &lt;font class=&quot;small2&quot;&gt;'</span>.<span class="re0">$registered_users</span>.<span class="st0">'&lt;/font&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;font class=&quot;small&quot;&gt;'</span>;<br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;br /&gt;Guests online:&lt;/font&gt; &lt;font class=&quot;small2&quot;&gt;'</span>.<span class="re0">$guest_users</span>.<span class="st0">'&lt;/font&gt;'</span>;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<span class="kw2">?&gt;</span><br />
</div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
<br />
<br />
Recent Posts [Unsolved]<br />
<br />
Again as the other 2, i have some code that works fine with phpbb2 but not phpbb3.<br />
<br />
<br />
</span><br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><br />
<tr><br />
	  <td><span class="genmed"><b><span style="color: #933;">php:</font></b></span></td><br />
	</tr><br />
	<tr><br />
	  <td class="syntax-code"><div class="php">&lt;marquee scrollamount=<span class="st0">"2"</span> align=<span class="st0">"center"</span> direction=<span class="st0">"up"</span> height=<span class="st0">"200"</span> width=<span class="st0">"140"</span> bgcolor=<span class="st0">"#000000"</span> scrolldelay=<span class="st0">"1"</span> onmouseover=<span class="st0">"this.stop()"</span> onmouseout=<span class="st0">"this.start()"</span>&gt;<br />
&lt;font face=verdana color=white size=<span class="nu0">1</span>&gt;<br />
&lt;center&gt;<br />
&lt;b&gt;<br />
Last <span class="nu0">20</span> Forum Messages<br />
&lt;/b&gt;&lt;br /&gt;<br />
&lt;/center&gt;<br />
&lt;/font&gt;<br />
<span class="kw2">&lt;?php</span><br />
<span class="kw1">require_once</span> <span class="br0">&#40;</span><span class="st0">'../mysql_connect1.php'</span><span class="br0">&#41;</span>;<span class="co1">//connect to db</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="re0">$topic_query</span> = <span class="st0">"SELECT * <br />
FROM `phpbb_posts` <br />
ORDER BY `post_time` DESC <br />
LIMIT 0 , 20"</span>; <span class="co1">// do topic query</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="re0">$topic_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a> <span class="br0">&#40;</span><span class="re0">$topic_query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp; <span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$topic_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$topic_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="re0">$topic</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'topic_id'</span><span class="br0">&#93;</span>;<br />
<span class="re0">$poster</span> = <span class="re0">$topic_row</span><span class="br0">&#91;</span><span class="st0">'poster_id'</span><span class="br0">&#93;</span>;<br />
<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <span class="re0">$post_query</span> = <span class="st0">"SELECT `topic_title`, `forum_id` FROM `phpbb_topics` WHERE&nbsp; `topic_id` = '$topic'"</span>; <span class="co1">// do post subject query</span><br />
<br />
<span class="re0">$post_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$post_query</span><span class="br0">&#41;</span>;<br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$post_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$post_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$post_subject</span> = <span class="re0">$post_row</span><span class="br0">&#91;</span><span class="st0">'topic_title'</span><span class="br0">&#93;</span>;<br />
<span class="re0">$forum_id</span> = <span class="re0">$post_row</span><span class="br0">&#91;</span><span class="st0">'forum_id'</span><span class="br0">&#93;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$forum_id</span> == <span class="nu0">56</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$use_query</span> = <span class="st0">"SELECT `username` FROM `phpbb_users` WHERE `user_id` = '$poster'"</span>; <span class="co1">// do user query</span><br />
<br />
<span class="re0">$use_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$use_query</span><span class="br0">&#41;</span>;<br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$use_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$use_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp;<span class="re0">$user</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
&nbsp;<span class="br0">&#125;</span><br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;img src=&quot;images/none.gif&quot; height=&quot;10&quot; width=&quot;10&quot;&gt;&amp;nbsp;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">"&lt;b&gt;&lt;a href=<span class="es0">\"</span>http://www.runehints.com/forums/viewtopic.php?t=$topic<span class="es0">\"</span>&gt;$post_subject&lt;/a&gt;&lt;br /&gt;&lt;font face=verdana color=white size=1&gt;Author: &lt;/font&gt;&lt;/b&gt;&lt;font face=verdana color=white size=1&gt;&lt;i&gt;$user&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;"</span>;&nbsp; <span class="co1">//display all the info</span><br />
<br />
<span class="br0">&#125;</span><span class="kw1">elseif</span> <span class="br0">&#40;</span><span class="re0">$forum_id</span> ==<span class="nu0">63</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$use_query</span> = <span class="st0">"SELECT `username` FROM `phpbb_users` WHERE `user_id` = '$poster'"</span>; <span class="co1">// do user query</span><br />
<br />
<span class="re0">$use_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$use_query</span><span class="br0">&#41;</span>;<br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$use_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$use_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp;<span class="re0">$user</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
&nbsp;<span class="br0">&#125;</span><br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;img src=&quot;images/dot.gif&quot; height=&quot;10&quot; width=&quot;10&quot;&gt;&amp;nbsp;'</span>;<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">"&lt;b&gt;&lt;a href=<span class="es0">\"</span>http://www.runehints.com/forums/viewtopic.php?t=$topic<span class="es0">\"</span>&gt;$post_subject&lt;/a&gt;&lt;br /&gt;&lt;font face=verdana color=white size=1&gt;Author: &lt;/font&gt;&lt;/b&gt;&lt;font face=verdana color=white size=1&gt;&lt;i&gt;$user&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;"</span>;&nbsp; <span class="co1">//display all the info</span><br />
<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
<span class="re0">$forum_query</span> = <span class="st0">"SELECT `auth_view`, `auth_post` FROM `phpbb_forums` WHERE `forum_id` = '$forum_id'"</span>;<br />
<span class="re0">$forum_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$forum_query</span><span class="br0">&#41;</span>;<br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$forum_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$forum_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$auth_view</span> = <span class="re0">$forum_row</span><span class="br0">&#91;</span><span class="st0">'auth_view'</span><span class="br0">&#93;</span>;<br />
<span class="re0">$auth_post</span> = <span class="re0">$forum_row</span><span class="br0">&#91;</span><span class="st0">'auth_post'</span><span class="br0">&#93;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$auth_post</span> == <span class="nu0">1</span> &amp;&amp; <span class="re0">$auth_view</span> == <span class="nu0">0</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
<span class="re0">$use_query</span> = <span class="st0">"SELECT `username` FROM `phpbb_users` WHERE `user_id` = '$poster'"</span>; <span class="co1">// do user query</span><br />
<br />
<span class="re0">$use_result</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$use_query</span><span class="br0">&#41;</span>;<br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$use_row</span> = <a target="_blank"&nbsp; href="http://www.php.net/function.mysql_fetch_assoc"><span class="kw3">mysql_fetch_assoc</span></a><span class="br0">&#40;</span><span class="re0">$use_result</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp;<span class="re0">$user</span> = <span class="re0">$use_row</span><span class="br0">&#91;</span><span class="st0">'username'</span><span class="br0">&#93;</span>;<br />
&nbsp;<span class="br0">&#125;</span><br />
<span class="kw2">?&gt;</span><br />
<br />
<br />
&lt;img src=<span class="st0">"images/dot.gif"</span> height=<span class="st0">"10"</span> width=<span class="st0">"10"</span>&gt;&amp;nbsp;&lt;?php<br />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">"&lt;b&gt;&lt;a href=<span class="es0">\"</span>http://www.runehints.com/forums/viewtopic.php?t=$topic<span class="es0">\"</span>&gt;$post_subject&lt;/a&gt;&lt;br /&gt;&lt;font face=verdana color=white size=1&gt;Author: &lt;/font&gt;&lt;/b&gt;&lt;font face=verdana color=white size=1&gt;&lt;i&gt;$user&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;"</span>;&nbsp; <span class="co1">//display all the info</span><br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <br />
<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
<a target="_blank"&nbsp; href="http://www.php.net/function.echo"><span class="kw3">echo</span></a> <span class="st0">'&lt;img src=&quot;images/none.gif&quot; height=&quot;10&quot; width=&quot;10&quot;&gt;&amp;nbsp;&lt;font class=&quot;small2&quot;&gt;Post is in a restricted access forum&lt;/font&gt;&lt;br /&gt;'</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="kw2">?&gt;</span>&nbsp;<br />
&lt;font face=verdana color=white size=<span class="nu0">1</span>&gt;<br />
&lt;center&gt;<br />
&lt;br /&gt;&lt;br /&gt;<br />
&lt;b&gt;<br />
&lt;a href=<span class="st0">"/forums/"</span>&gt;RuneHints&lt;br /&gt;<br />
The Solution to all your RuneScape Problems&lt;/a&gt;&lt;br /&gt;&lt;/b&gt;<br />
&lt;/center&gt;<br />
&lt;/font&gt;<br />
&lt;/marquee&gt;</div></td><br />
	</tr><br />
</table><br />
<span class="postbody"><br />
<br />
<br />
<br />
<br />
<br />
What i have tried to do is change all of the forums to phpbb3 and all of the phpbb to phpbb3. The code shows no data or errors. What do i do? or can someone help me sort this out via msn, AIm or Yim?]]></description>
            <author>gaogier</author>
            <pubDate>Tue, 08 Jan 2008 20:38:00 +0100</pubDate>
        </item>
    </channel>
</rss>
