Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 02-10-2013, 09:01 AM
rashidfarooq rashidfarooq is offline
Contributing Member
 
Join Date: 11-16-11
Posts: 103
iTrader: 0 / 0%
How to Add Quote / Multi-Quote Functionality in Post of Forum Site

I am developing a forum site. In each Forum site, Each Post has a Quote and Multi-Quote button in its bottom. I want to know how can I develop Quote and Multi-Quote Button. What is the logic behind that. Is there any tutorial about that. Please guide me briefly.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 02-10-2013, 09:07 AM
M-E's Avatar
M-E M-E is offline
Contributing Member
 
Join Date: 04-30-10
Posts: 85
iTrader: 0 / 0%
From all those free forum boards online, why would you develop your own forum script?
Can't you get the code from existing scripts?
 
Reply With Quote
  #3  
Old 02-10-2013, 09:10 AM
ScriptMan's Avatar
ScriptMan ScriptMan is offline
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 14,038
iTrader: 4 / 100%
Your sentence structure is a bit confusing to me and I suspect to others as well. Since you asked this in the coding forum and not the graphics forum I think you want some direction on the coding part.

I might be able to give some small guidance on the single quote patt but would be more lost than you on the multi part.

I will wait for your reply.
 
Reply With Quote
  #4  
Old 02-11-2013, 12:55 AM
rashidfarooq rashidfarooq is offline
Contributing Member
 
Join Date: 11-16-11
Posts: 103
iTrader: 0 / 0%
Quote:
Originally Posted by ScriptMan View Post
Your sentence structure is a bit confusing to me and I suspect to others as well. Since you asked this in the coding forum and not the graphics forum I think you want some direction on the coding part.

I might be able to give some small guidance on the single quote patt but would be more lost than you on the multi part.

I will wait for your reply.
I want to Learn the PHP Coding behind that Quote and Multi-Quote button and also the database design for that.
 
Reply With Quote
  #5  
Old 02-11-2013, 07:13 AM
ScriptMan's Avatar
ScriptMan ScriptMan is offline
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 14,038
iTrader: 4 / 100%
You raised my curiosity level so I did a little digging and then its your ball to run with. What you are trying to do for a single quote is just an expanded version of what I am doing with my comment section in my sig link. I am not choosing to quote the message but I do link to it using this exact method.


Your current script as written is displaying the body portion of the message on the view post page . We will call that body for this example. You may be using echo or print. You may be using either of the following methods to display that data.
PHP Code:
echo $row['body'];
  
  or 
  
$body=$row['body'];
  echo 
$body
The first method is a straight read from the DB. In the second that read was converted to a variable that can be used anywhere within this script and avoid those undefined variable warnings (5.4 STRICT). I prefer to convert the data as pulled so I can use it anywhere without worries about corruption.

Now all you need to do is post that $body variable to the post reply form and add whatever tags like that you desire. A hidden field on the posting form does this and any other data like username or id that you desire to include.

I would assume that a multi-quote would just send multiple bodies and name to the next script or script section.

I knew I would structure it as said above. Since I have to have an well known BB test set of scripts on my machine I took a look at the DB structure. The method is the same the quoted text becomes part of the post body for the new post. This is a direct copy from the table row with selected data, (*** ) edited for privacy.

PHP Code:
[quote='*****' pid='5' dateline='1360112662']
Thought you might enjoy this.

[
video=youtube]http://youtu.be/*********[/video]
[/quote]

That is mighty cute.  Think we should drown it now

So no magic going on. Just information posted from one place to another.


This should entertain you for weeks.
 
Reply With Quote
  #6  
Old 02-11-2013, 10:38 AM
rashidfarooq rashidfarooq is offline
Contributing Member
 
Join Date: 11-16-11
Posts: 103
iTrader: 0 / 0%
Quote:
Originally Posted by ScriptMan View Post
You raised my curiosity level so I did a little digging and then its your ball to run with. What you are trying to do for a single quote is just an expanded version of what I am doing with my comment section in my sig link. I am not choosing to quote the message but I do link to it using this exact method.


Your current script as written is displaying the body portion of the message on the view post page . We will call that body for this example. You may be using echo or print. You may be using either of the following methods to display that data.
PHP Code:
echo $row['body'];
  
  or 
  
$body=$row['body'];
  echo 
$body
The first method is a straight read from the DB. In the second that read was converted to a variable that can be used anywhere within this script and avoid those undefined variable warnings (5.4 STRICT). I prefer to convert the data as pulled so I can use it anywhere without worries about corruption.

Now all you need to do is post that $body variable to the post reply form and add whatever tags like that you desire. A hidden field on the posting form does this and any other data like username or id that you desire to include.

I would assume that a multi-quote would just send multiple bodies and name to the next script or script section.

I knew I would structure it as said above. Since I have to have an well known BB test set of scripts on my machine I took a look at the DB structure. The method is the same the quoted text becomes part of the post body for the new post. This is a direct copy from the table row with selected data, (*** ) edited for privacy.

PHP Code:

That is mighty cute
.  Think we should drown it now

So no magic going on. Just information posted from one place to another.


This should entertain you for weeks.
Thanks for answering. I have understood your concept. But this raises one question. If that Quoted Post Becomes the Part of the Reply and It also stored in the database as the part of the Reply, So will it not create the duplicated data.
 
Reply With Quote
  #7  
Old 02-11-2013, 11:01 AM
ScriptMan's Avatar
ScriptMan ScriptMan is offline
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 14,038
iTrader: 4 / 100%
Yes. The quoted part is duplicated but it is almost always text and text does not use a lot of room.

I don't think it would be considered duplicate content for SE purposes because it is defined as a quote within the body of a new post.

The other option of trying to include with some form of join statement would be very difficult because quotes often do not included the entire older post. I really can't see that method working at all.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you use the vBulletin "multi-quote" function? Avinash Forum Lobby 2 11-11-2006 06:39 AM
Forum Quote Cell Shading John Scott Forum Lobby 20 11-05-2006 08:54 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:57 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC