Quote

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

33 replies · 1,632 views · started 17 years ago · 1 min read

8 participants
mazalo Developer · 50 posts #1

Quote somebody post....Can you help me with this code?

spiderwebs Developer · 193 posts #2

what help u want?

E107 Security Team Leader Proudly Support AccountLab Plus Billing Software

Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com

mazalo Developer · 50 posts #3

spiderwebs wrote: what help u want?

As this [QUOTE = only lavalair script ... that somebody quoted a member of the post

spiderwebs Developer · 193 posts #5

its gb? lol what u want can u clearify or explain lol?

E107 Security Team Leader Proudly Support AccountLab Plus Billing Software

Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com

mazalo Developer · 50 posts #6

For me not work 🙁

something else Fellow · 2,296 posts #7

na it dont work like most things in lava ...need a little coding lol so many things started in lava but not finished ... kinda strange lol

mazalo Developer · 50 posts #8

I know! Unfortunately I never found my way to finish

riderz Lead · 975 posts #9

spiderwap he mean if u post a msg in forum and im coming wona quote there will be option like

hello spiderwebs*

there will be option to quote that msg


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

something else Fellow · 2,296 posts #10

why dont you try coding it yourself? its not hard to code 😛 took me about 10-20 mins to get working I would share but you will never learn anything if you dont try coding it yourself 😛

mazalo Developer · 50 posts #11

something else wrote: why dont you try coding it yourself? its not hard to code 😛 took me about 10-20 mins to get working I would share but you will never learn anything if you dont try coding it yourself :P

😊Will help someone

something else Fellow · 2,296 posts #12

start coding it yourself and see how far you get 😛 if u get stuck post it here and loads of us will help

wap2k Developer · 168 posts #13

It took me around about 30 seconds to do this in skycity 🙂

riderz Lead · 975 posts #14

there must be sumthing like

 $text = preg_replace("/\[quote\=(.*?)\](.*?)\[\/quote\]/is","<a href=\"index.php?action=post&tid=$tid\">$2</a>",$text);

i dnt know exactly please help with the link in the quote option


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

wap2k Developer · 168 posts #15

The code i was like:

core.php i added to the getbbcode method/function

$text=preg_replace("/\[quotetext\](.*?)\[\/quotetext\]/i","<div class=\"doquote\">\\1</div>", $text);

Replaced the $topicopt variable for replies in index.php viewtpc

$topt = "<a href=\"index.php?action=post&sid=$sid&tid=$tid&quid=$post[0]\">quote</a> <a href=\"index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";

in index.php "post"

$quid = $_GET["quid"];
if(!empty($quid)){
$quidsql = mysql_fetch_array(mysql_query("SELECT text FROM ibwf_posts WHERE id='".$quid."'"));
$quidtxt = "[quotetext]".$quidsql[0]."[/quotetext]";
}

And

echo "Text:<input name=\"reptxt\" maxlength=\"500\" value=\"$quidtxt\"/><br/>";

Add this to your theme css files

div.doquote{ background-color:#f3f6e9; font-style:italic; color:#666666; text-align:left; border:1px solid #dfe7ad;padding:2px }

riderz Lead · 975 posts #16

viewtpc

//////////////////////////////////View Topic

else if($action=="viewtpc")
{

   $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
    $tnm = htmlspecialchars($tinfo[0]);
  addonline(getuid_sid($sid),"xHTML-Viewing Topic-$tnm ","index.php?action=viewtpc&page=$page&tid=$tid");
  $tid = $_GET["tid"];
  $go = $_GET["go"];
  $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
  if(!canaccess(getuid_sid($sid), $tfid[0]))
    {
    $pstyle = gettheme($sid);
    echo xhtmlhead("$stitle",$pstyle);
      echo "<p align=\"center\">";
      echo "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>";
      echo "<a href=\"index.php?action=main\">Home</a>";
      echo "</p>";
      echo xhtmlfoot();

      exit();
    }

    $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
    $tnm = htmlspecialchars($tinfo[0]);
    $pstyle = gettheme($sid);
    echo xhtmlhead($tnm,$pstyle);
    echo "<p align=\"center\">";
include ("pops.php");
    $num_pages = getnumpages($tid);
    if($page==""||$page<1)$page=1;
    if($go!="")$page=getpage_go($go,$tid);
    $posts_per_page = 5;
    if($page>$num_pages)$page=$num_pages;
    $limit_start = $posts_per_page *($page-1);
    echo "<a href=\"index.php?action=post&tid=$tid\">Post reply</a>";
$tid = $_GET["tid"];
    $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
    $fid = $tfid[0];
    $qut = $_GET["qut"];
        echo "Fast Reply<br/>";
    echo "<center><form action=\"genproc.php?action=post\" method=\"post\">";
    echo "<input name=\"reptxt\" maxlength=\"500\"/><br/>";
    echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
    echo "<input type=\"hidden\" name=\"qut\" value=\"$qut\"/>";
    echo "<input type=\"submit\" value=\"Reply\"/>";
    echo "</form></center>";
    $lastlink = "<a href=\"index.php?action=$action&tid=$tid&go=last\">Last Page</a>";
    $firstlink = "<a href=\"index.php?action=$action&tid=$tid&page=1\">First Page</a> ";
    $golink = "";
    if($page>1)
    {
      $golink = $firstlink;
    }
    if($page<$num_pages)
    {
      $golink .= $lastlink;
    }
    if($golink !="")
    {
      echo "<br/>$golink";
    }
    echo "</p>";
    echo "<p align=\"center\">";
    $vws = $tinfo[4]+1;
    $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));
    echo "<small>Replies: $rpls[0] - Views: $vws</small><br/>";
    echo "</p>";
    echo "<p>";
    ///fm here
    echo "<div class=\"mblock2\">";
    if($page==1)
    {
      $posts_per_page=4;
      mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE  id='".$tid."'");
      $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));
      $unick = getnick_uid($ttext[0]);
      if(isonline($ttext[0]))
    {
      $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"+\"/>";
    }else{
        $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"-\"/>";
    }
    $usl = "<br/><a href=\"index.php?action=viewuser&who=$ttext[0]\">$iml$unick</a>";
    $topt = "<a href=\"index.php?action=tpcopt&tid=$tid\">*</a>";

    if($go==$tid)
    {
      $fli = "<img src=\"http://coding-talk.com/images/flag.gif\" alt=\"!\"/>";
    }else{
      $fli ="";
    }
    $pst = parsemsg($ttext[1],$sid);
    $dtot = date("d/m/y - H:i:s",$ttext[2]);
    echo "<small>$usl: $dtot</small><br/>$fli$pst $topt<br/>";
    if($ttext[3]>0)
    {
      echo "<a href=\"index.php?action=viewtpl&who=$tid\">POLL</a><br/>";
    }
  }
  if($page>1)
  {
    $limit_start--;
  }
  $sql = "SELECT id, text, uid, dtpost, quote FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";
  $posts = mysql_query($sql);
  while($post = mysql_fetch_array($posts))
  {
    $unick = getnick_uid($post[2]);
    if(isonline($post[2]))
    {
      $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"+\"/>";
    }else{
        $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"-\"/>";
    }
    $usl = "<br/><a href=\"index.php?action=viewuser&who=$post[2]\">$iml$unick</a>";
    $pst = parsemsg($post[1], $sid);
    //$topt = "<a href=\"index.php?action=pstopt&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
    $topt = "<a href=\"index.php?action=post&tid=$tid&quid=$post[0]\">quote</a> <a href=\"index.php?action=pstopt&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
    if($post[4]>0)
    {
        $qtl = "<small><i><a href=\"index.php?action=viewtpc&tid=$tid&pst=\">(quote:p=blaze,d=16-04-2006)</a></i></small>";
    }
    if($go==$post[0])
    {
      $fli = "<img src=\"http://coding-talk.com/images/flag.gif\" alt=\"!\"/>";
    }else{
      $fli ="";
    }
    $dtot = date("d/m/y - H:i:s",$post[3]);
    echo "<small>$usl: $dtot</small><br/>$fli$pst $topt<br/>";
  }
   echo "</div>";
    ///to here
    echo "</p>";
    echo "<p align=\"center\">";
    $tmsg = getpmcount(getuid_sid($sid));
  $umsg = getunreadpm(getuid_sid($sid));
  if($umsg>0)
  {
  echo "<a href=\"inbox.php?action=main\">Inbox($umsg/$tmsg)</a><br/>";
  }
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=viewtpc&page=$ppage&tid=$tid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"index.php?action=viewtpc&page=$npage&tid=$tid\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {

        $rets = "<form action=\"index.php\" method=\"get\">";
        $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
        $rets .= "<input type=\"submit\" value=\"GO\"/>";
        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
        $rets .= "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
        $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
        $rets .= "</form>";

        echo $rets;

    }
echo "<br/>";
    echo "<a href=\"index.php?action=post&tid=$tid\">Post reply</a>";
    echo "</p>";
$tid = $_GET["tid"];
    $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
    $fid = $tfid[0];
    $qut = $_GET["qut"];
        echo "Fast Reply<br/>";
    echo "<center><form action=\"genproc.php?action=post\" method=\"post\">";
    echo "<input name=\"reptxt\" maxlength=\"500\"/><br/>";
    echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
    echo "<input type=\"hidden\" name=\"qut\" value=\"$qut\"/>";
    echo "<input type=\"submit\" value=\"Reply\"/>";
    echo "</form></center>";
    echo "<p><small>";
    $fid = $tinfo[5];
    $fname = getfname($fid);
    $cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));
    $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));
    $cname = $cinfo[0];

    echo "<a href=\"index.php?action=main\">";
echo "Home</a>>";
    echo "<a href=\"index.php?action=formmenu\">";
echo "Forums</a>>";

$cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));
    if($cid[0]>0)
    {
    $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));
    $cname = htmlspecialchars($cinfo[0]);
    echo "<a href=\"index.php?action=viewcat&cid=$cid[0]\">";
    echo "$cname</a><br/>";
    }else{
        $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM ibwf_forums WHERE id='".$fid."'"));
        $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_clubs WHERE id='".$cid[0]."'"));
        $cname = htmlspecialchars($cinfo[0]);
    echo "<a href=\"index.php?action=gocl&clid=$cid[0]\">";
    echo "$cname Club</a><br/>";
  }
  $fname = htmlspecialchars($fname);
    echo "><a href=\"index.php?action=viewfrm&fid=$fid\">$fname</a>>$tnm";
  echo "</small></p>";

    echo xhtmlfoot();
exit();
}

post

else if($action=="post")
{
    $tid = $_GET["tid"];

    $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
    $fid = $tfid[0];

		$validated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE id='".$uid."'  AND validated='0'"));
    if(($validated[0]>0)&&(validation()))
    {

    $pstyle = gettheme($sid);
  echo xhtmlhead("try again",$pstyle);
      echo "<p align=\"center\">";
	   $nickk = getnick_sid($sid);
  $whoo = getuid_nick($nickk);
      echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/><br/>";
	   echo "<b>Ur Account is Not Validated Yet</b><br/>";
	  $totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$whoo."'"));
$num = $totaltimeonline[0]/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*60;
$secs = intval($num4);

echo "<b>Your online time:</b> ";
if(($days==0) and ($hours==0) and ($mins==0)){
  echo "$secs seconds<br/>";
}else
if(($days==0) and ($hours==0)){
  echo "$mins mins, ";
  echo "$secs seconds<br/>";
}else
if(($days==0)){
  echo "$hours hours, ";
  echo "$mins mins, ";
  echo "$secs seconds<br/>";
}else{
  echo "$days days, ";
  echo "$hours hours, ";
  echo "$mins mins, ";
  echo "$secs seconds<br/>";
}
    echo "<br/>You have to Spend at least<u> 20 mins online</u> to get validated ur account. Plz be patient try again this option after 20 Minutes online here..Untill then Explorer and Enjoy other features in $stitle.<br/>thank you!<br/><br/>";

	echo "<a href=\"index.php?action=formmenu\">Back To Forums</a><br/>";
	echo "<a href=\"downloads/xindex.php?action=main\">Back To Downloads</a><br/>";
	 echo "<a href=\"index.php?action=main\">Back To Home</a><br/><br/>";

	 echo "</p>";
   echo xhtmlfoot();
      exit();

    }

if(!canaccess(getuid_sid($sid), $fid))
    {
    $pstyle = gettheme($sid);
    echo xhtmlhead("$stitle",$pstyle);
      echo "<p align=\"center\">";
      echo "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>";
      echo "<a href=\"index.php?action=main\">Home</a>";
      echo "</p>";
      echo xhtmlfoot();

      exit();
    }
    $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
    $tnm = htmlspecialchars($tinfo[0]);
    addonline(getuid_sid($sid),"xHTML-Posting Reply at $tnm","");

    $pstyle = gettheme($sid);
    echo xhtmlhead("Post Reply",$pstyle);
    echo "<onevent type=\"onenterforward\">";
  echo "<refresh>
        <setvar name=\"reptxt\" value=\"\"/>
        <setvar name=\"quid\" value=\"\"/>   ";
  echo "</refresh></onevent>";
  $quid = $_GET["quid"];
if(!empty($quid))
{
$quidsql = mysql_fetch_array(mysql_query("SELECT text FROM ibwf_posts WHERE id='".$quid."'"));
$quidtxt = "
Quote:".$quidsql[0]."";
}
    echo "<p align=\"center\">";
  echo "<form method=\"post\" action=\"genproc.php?action=post\">";
  echo "Text:<input name=\"reptxt\" maxlength=\"500\"/><br/>";
  echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
  echo "<input type=\"hidden\" name=\"quid\" value=\"$quid\"/>";
  echo "<input type=\"submit\" name=\"Submit\" value=\"Reply\"/><br/>";
  echo "</form>";
         $fid = getfid($tid);
         $fname = getfname($fid);
         echo "<br/><br/><a href=\"index.php?action=viewtpc&tid=$tid\">";  
 
echo "Back to topic</a>";
      echo "<br/><a href=\"index.php?action=viewfrm&fid=$fid\">";
echo "$fname</a><br/>";
    $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
    echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo xhtmlfoot();
exit();
}

pstopt

//////////////////////////////////////////////Post Options

else if($action=="pstopt")
{
  $pid = $_GET["pid"];
  $page = $_GET["page"];
  $fid = $_GET["fid"];
    addonline(getuid_sid($sid),"Post Options - xHTML","");
    $pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text  FROM ibwf_posts WHERE id='".$pid."'"));
    $trid = $pinfo[0];
    $tid = $pinfo[1];
    $ptext = htmlspecialchars($pinfo[2]);
    $pstyle = gettheme($sid);
    echo xhtmlhead("Post Options",$pstyle);
 echo popup($sid);
    echo "<onevent type=\"onenterforward\">";
    echo "<refresh>
        <setvar name=\"ptext\" value=\"$ptext\"/>";
    echo "</refresh></onevent>";
  echo "<p align=\"center\">";
  echo "<b>Post Options</b>";

  echo "</p>";
  echo "<p>";
  $trnick = getnick_uid($trid);
  echo ";<a href=\"inbox.php?action=sendpm&who=$trid\">»Send PM to $trnick</a><br/>";
  echo "<a href=\"index.php?action=viewuser&who=$trid\">»View $trnick's Profile</a><br/>";
  //echo "<a href=\"index.php?action=post&tid=$tid&qut=$pid\">»Quote</a><br/>";
  echo "<a href=\"genproc.php?action=rpost&pid=$pid\">»Report</a><br/>";
  echo "<a href=\"index.php?action=viewtpc&tid=$tid&page=$page\">«Back to topic</a><br/><br/>";

  if(ismod(getuid_sid($sid)))
  {

     echo "<form method=\"post\" action=\"mprocpl.php?action=edtpst&pid=$pid\">";
    // echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
    echo "Text:<input name=\"reptxt\" maxlength=\"500\" value=\"$quidtxt\"/><br/>";
     echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
     echo "</form>";

echo "<br/><a href=\"mprocpl.php?action=delp&pid=$pid\">»DELETE</a><br/>";
  }
  else if($pinfo[0]==getuid_sid($sid))
  {
  echo "<form method=\"post\" action=\"usertpc.php?action=edtpst&pid=$pid\">";
     echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
     echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
     echo "</form>";
	 }

  echo "</p>";
echo "<p align=\"center\">";
  $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
    $unick = getnick_uid($who);
          echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo xhtmlfoot();
exit();
}

ok ive gotten it right when i click on the quote option it throw the block for the text but it dnt place the quote in there when use the ndex.php?action=pstopt&pid option it suppose to give the text to fix but the box is emty in post option THANK YOU FOR THE CODE


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

wap2k Developer · 168 posts #18

Where did you install in rider mate ? can i take a look ?

srecnica Developer · 174 posts #20

wap2k wrote: The code i was like:

core.php i added to the getbbcode method/function

$text=preg_replace("/\[quotetext\](.*?)\[\/quotetext\]/i","<div class=\"doquote\">\\1</div>", $text);

Replaced the $topicopt variable for replies in index.php viewtpc

$topt = "<a href=\"index.php?action=post&sid=$sid&tid=$tid&quid=$post[0]\">quote</a> <a href=\"index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";

in index.php "post"

$quid = $_GET["quid"];
if(!empty($quid)){
$quidsql = mysql_fetch_array(mysql_query("SELECT text FROM ibwf_posts WHERE id='".$quid."'"));
$quidtxt = "[quotetext]".$quidsql[0]."[/quotetext]";
}

And

echo "Text:<input name=\"reptxt\" maxlength=\"500\" value=\"$quidtxt\"/><br/>";

Add this to your theme css files

in this code is a problem that can with only one post some quotes .. namely, if it is already quoted, and if I want to quote again shows the second quote, just one .. I hope you understand what explains ..For example, if someone quoted a post and I want to quote his post in which the quote, does not show everything, but only the first quote that was in the post

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close