Jump to content
MakeWebGames

Recommended Posts

Posted

Does anyone have a idea of how i can get the quoted text in a box when someone quotes another user

 

function quote()
{
global $ir, $c, $userid, $h, $bbc, $db;
$sql = sprintf("SELECT ft_id, ft_name, ft_forum_id, ft_locked FROM forum_topics WHERE (ft_id = %u)", $_GET['viewtopic']);
$q = $db->query($sql);
if(!$db->num_rows($q))
{
echo "What are you doing?";
$h->endpage();
exit;
}
$topic = $db->fetch_row($q);
$sql2 = sprintf("SELECT ff_id, ff_auth, ff_owner, ff_name FROM forum_forums WHERE (ff_id = %u)", $topic['ft_forum_id']);
$q2 = $db->query($sql2);
if(!$db->num_rows($q2))
{
echo "What are you doing?";
$h->endpage();
exit;
}
$forum = $db->fetch_row($q2);
if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner'] AND $ir['user_level'] != 2) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2))
{
echo "You have no permission to reply to this topic.

[img=/images/gt.png]' /> [url='forums.php']Back[/url]";
$h->endpage();
exit;
}
echo "<big>[url='forums.php']Forums Home[/url] ? ";
echo sprintf("[url='forums.php?viewforum=%u']%s[/url] ? ", $forum['ff_id'], stripslashes($forum['ff_name']));
echo sprintf("[url='forums.php?viewtopic=%u']%s[/url] ? ", $_GET['viewtopic'], stripslashes($topic['ft_name']));
echo "Quoting a Post</big>

";
if(!$topic['ft_locked'])
{

echo "

";
echo "<span style='font-weight:bold;'>Post a quoted reply to this topic:</span>
";
echo sprintf("<form action='forums.php?reply=%u' method='post'>", $topic['ft_id']);
echo "<table border='1' cellspacing='1' class='table' width='80%' border='0'>";

echo "<tr>";
echo "<td align='right'>Subject:</td>";
echo "<td align='left'><input type='text' name='fp_subject' /></td>";
echo "</tr>";

echo "<tr>";
echo "<td align='right'>Post:</td>";
echo "<td align='left'>";
echo sprintf("<textarea class='spell_check' rows='7' cols='40' name='fp_text'>[quote="%s"]%s[/quote]</textarea>", $_GET['quotename'], stripslashes($_GET['quotetext']));
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<th colspan='2'><input type='submit' value='Post Reply'></th>";
echo "</tr>";

echo "</table>";
echo "</form>";
}
else
{
echo "[i]This topic has been locked, you cannot reply to it.[/i]
";
echo sprintf("[url='forums.php?viewtopic=%u']Back[/url]", $_GET['viewtopic']);
}
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...