<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — How to use PunBB as webpage editor?]]></title>
		<link>https://punbb.informer.com/forums/topic/7573/how-to-use-punbb-as-webpage-editor/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/7573/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to use PunBB as webpage editor?.]]></description>
		<lastBuildDate>Fri, 20 May 2005 18:18:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to use PunBB as webpage editor?]]></title>
			<link>https://punbb.informer.com/forums/post/43762/#p43762</link>
			<description><![CDATA[<p>After sitting some and checked back and forth on some scripts I have managed to create my leech.php:</p><div class="codebox"><pre><code>&lt;?php
define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
require PUN_ROOT.&#039;include/common.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;

$db_user = &quot;##&quot;;
$db_passwd = &quot;##&quot;;
$db_name = &quot;##&quot;;
$db_host = &quot;##&quot;;

$link = mysql_connect($db_host, $db_user, $db_passwd) or die(&quot;Could not connect&quot;);
mysql_select_db($db_name) or die(&quot;Could not select DB&quot;);

$query = &quot;SELECT * FROM `posts`&quot;;
$query .= &quot; WHERE id = &quot;.$_REQUEST[&#039;post&#039;];

$result = mysql_query($query) or die(mysql_error());
while ( $row = mysql_fetch_assoc( $result ) )
{

//print parse_message($row[&#039;message&#039;], $row[&#039;hide_smilies&#039;]);
print parse_message($row[&#039;message&#039;], &#039;1&#039;);

}

?&gt;</code></pre></div><p><strong>But be carefull!</strong><br />This is a security risk cause ANYONE can get ALL posts that have been written on the forum.</p>]]></description>
			<author><![CDATA[null@example.com (Loa)]]></author>
			<pubDate>Fri, 20 May 2005 18:18:32 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/43762/#p43762</guid>
		</item>
		<item>
			<title><![CDATA[How to use PunBB as webpage editor?]]></title>
			<link>https://punbb.informer.com/forums/post/43748/#p43748</link>
			<description><![CDATA[<p>Hey!</p><p>I got a forum for a group of people.<br />Now we wanted a small site with a bit of information about us, but I want that the members can change the information on the site &quot;without noledge&quot; about html and so on...</p><p>So I thought that I could create a part of the forum with a thread for every side on the page.</p><p>For example:</p><p>Forum<br />|- Site information<br />&nbsp; &nbsp; |- Home page (thread with the startpage text)<br />&nbsp; &nbsp; |- ext...</p><p>I want that only the thread Text is visible on the site, so not want to se the &quot;Last edited by..&quot; thing on the site.<br />I tried to make thread for the page and then leech out the text from database to the site, but the posts was formated in BBCode and not Html. <br />Are there any php script that I can use to only see the text with html formatting.<br />leech.php?postid=23 or whatever that I can include into the pages?</p><p>Well I hope you get my idea.<br />I have searched the forum now for an hour or so.. so I hope I havnt posted something that exists..</p><p>EDIT:<br />its only the first post that I want to show, the members got permission to edit.</p><br /><p>EDIT2:</p><p>Well I have looked around little with my inexperienced eyes over the php code.<br />So the parser.php is the one who converts everything...<br />Well then the only problem is to get out the text out of the database then....</p><p>I still would like if anyone could write a short php file that do what I want...</p><p>EDIT3:<br />I got this far but it seems that I cannot get it to work with the parser...</p><p>THIS WORKS:<br /></p><div class="codebox"><pre><code>&lt;?php

$db_user = &quot;##&quot;;
$db_passwd = &quot;##&quot;;
$db_name = &quot;##&quot;;
$db_host = &quot;##&quot;;

$link = mysql_connect($db_host, $db_user, $db_passwd) or die(&quot;Could not connect&quot;);
mysql_select_db($db_name) or die(&quot;Could not select DB&quot;);

$query = &quot;SELECT * FROM `posts`&quot;;
$query .= &quot; WHERE id = &#039;2&#039;&quot;;

$result = mysql_query($query) or die(mysql_error());

while ( $row = mysql_fetch_assoc( $result ) )
{

print $row[&quot;message&quot;];

}

?&gt;</code></pre></div><p>THIS DOESNT:</p><div class="codebox"><pre><code>&lt;?php

$db_user = &quot;##&quot;;
$db_passwd = &quot;##&quot;;
$db_name = &quot;##&quot;;
$db_host = &quot;##&quot;;

$link = mysql_connect($db_host, $db_user, $db_passwd) or die(&quot;Could not connect&quot;);
mysql_select_db($db_name) or die(&quot;Could not select DB&quot;);

$query = &quot;SELECT * FROM `posts`&quot;;
$query .= &quot; WHERE id = &#039;2&#039;&quot;;

$result = mysql_query($query) or die(mysql_error());

require &#039;include/parser.php&#039;;

while ( $row = mysql_fetch_assoc( $result ) )
{

print parse_message($row[&#039;message&#039;], $row[&#039;hide_smilies&#039;]);

}

?&gt;</code></pre></div><p>Are there somesort of protection or what am I doing wrong?</p><p>EDIT4:</p><p>as fast as I put in this<br /></p><div class="codebox"><pre><code>require &#039;include/parser.php&#039;;</code></pre></div><p>my page goes blank.</p><p>why is that?<br />are there a protection?</p><p>EDIT5:<br />found the protection..<br /></p><div class="codebox"><pre><code>if (!defined(&#039;PUN&#039;))
    exit;</code></pre></div><p>are there anyway to get my leech.php accepted cause now or do I got to comment away this protection?<br />well Im continue with the protection off..</p><p>I have started to get a error in parser.php now.<br />Dont know if I can make this script cause my noledge in php is really smal.<br />it stops here:</p><div class="codebox"><pre><code>    $text = pun_htmlspecialchars($text);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Loa)]]></author>
			<pubDate>Fri, 20 May 2005 16:01:48 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/43748/#p43748</guid>
		</item>
	</channel>
</rss>
