PDA

View Full Version : Show Thread Enhancements - Nested Quotes


DJ XtAzY
18 Aug 2006, 21:14
UPDATE 12/7/06: The hack is updated with CoreIssue's code edit ;) mentioned in the posts. It's more simple and you only add one line to it. Tested on vb3.6.4 so it now works fine!

Difficulty: Extremely Easy
Time take to install: 15 seconds

Version Info
v1.01 Hack updated with CoreIssue simple file edit. Should work with all version of vb now.
v1.0 Initial Release

I made a suggestion on vb.com but it seems like the developers are not interested. But then a nice member rossco2005 helped me out since we both like the idea to have nested quote feature in our boards WHEN we click on the Quote button. Nested quotes are used in phpbb and IB forums. Nested quotes are used in VB's private message area, but for some reason they wont work for the forums.

So let me show you an example on how this works. Let say i made this post.

------Post #1------
There are 11 planets in our solar system
-------------------

And if someone (let say Bot) click on the Quote button and submit a new post it should turn out like this

------Post #2------

There are 11 planets in our solar system

Welcome!
--------------------

But if another person (let say Bot1) hit the quote button for that previous post it will return this

------Post #3------

No there are 20

You guys are both rong idiots!
--------------------

But instead we want it to turn like this when we click on the quote button

------Post #3-------



There are 11 planets in our solar system

No there are 20

You guys are both wrong idiots!
--------------------

Get the picture?

So here is the code modification on how to put nested quotes on your forums.

Files to edit: functions.php

In file functions.php, find:


function strip_quotes($text)
{
$lowertext = strtolower($text);


Replace with:


function strip_quotes($text)
{
return $text;
$lowertext = strtolower($text);



Easy as cake! Go thank CoreIssue for this easy hack =]

Upgrading from 1.0 to 1.01
Replace the original functions.php from vb and then perform the edits.

Anyways i hope this is useful for peeps who need nest quotes. If someone can make it more advanced, like into a product or plugin, go ahead =]. I was hoping this can be built into the vb admin panel and lets u control how many nested quotes are allow per post, so that u dunt need to edit the file every upgrade or edit the file whenever u want to change the amount of nested quotes.

Selene
18 Aug 2006, 22:29
screenshots?

Davidov06
18 Aug 2006, 22:53
Aye, some screenshots please.

DJ XtAzY
18 Aug 2006, 22:57
haha no need for screenshots but its like this



screenshots?

Aye, some screenshots please.

Kaezul
18 Aug 2006, 23:22
Very nicely done. I don't understand why Jelsoft didn't do this to begin with. Great job.

utw-Mephisto
18 Aug 2006, 23:36
Very nice one, I just don't like file edits :(

DJ XtAzY
18 Aug 2006, 23:37
me either but thats the only way =[

im have no programming skills other than java =p

.Tim
19 Aug 2006, 00:02
Works great! Sucks that it's a file edit but it's too good of a feature not to do it.

o0Hubba0o
19 Aug 2006, 01:59
I agree that it should of been a default feature. I thought multi quote would of been able to cover this in some way, but oh well. Great job on this, if decide to put it in I'll click the install button for you.

Snake
19 Aug 2006, 12:10
Looking good, will install this soon! ;)

70age
19 Aug 2006, 12:22
Great work!!
I do like it!
Thx,Xtazy

Takkero
19 Aug 2006, 13:35
very nice!!! Thx!! :D

hgb
19 Aug 2006, 18:33
cool :)

installed and thx

Breathex
20 Aug 2006, 07:22
Very nice one, I just don't like file edits :(
same here, sorry. if it would be a product, i would install it.

Jim O
28 Aug 2006, 06:26
I agree that it should of been a default feature. I thought multi quote would of been able to cover this in some way, but oh well. Great job on this, if decide to put it in I'll click the install button for you.
It can, but you'd need to cut and paste the second (and third...) quote into the first.

Like this:

Very nicely done. I don't understand why Jelsoft didn't do this to begin with. Great job.I agree that it should of been a default feature. I thought multi quote would of been able to cover this in some way, but oh well. Great job on this, if decide to put it in I'll click the install button for you.And Jim's text is here after both of yours...
But it's nifty to have it as a default.

Edit: Installed and works perfectly. See http://worldwartwozone.com/forums/civilian-life/288-return-from-dunkirk.html#post2126 for an example.

DivisionByZero
02 Sep 2006, 00:08
how can this be done for PM's???

Coldhands
06 Sep 2006, 00:55
Find:
Code:

while ( ($pos !== false) && ($quote_count <= 2) );


to like let say 4 quotes
Code:

while ( ($pos !== false) && ($quote_count <= 4) );



This didn't seem to do the trick for me. It still only quotes 2 as oppose to 4. What gives?

bluesoul
06 Sep 2006, 04:32
This didn't seem to do the trick for me. It still only quotes 2 as oppose to 4. What gives?

Having the same issue, here.

Nixonian
06 Sep 2006, 20:03
FWIW:
<AOL>me too</AOL>

Thought, I was too dumb to follow some simple instructions, but it seems there is another factor limiting the count to '2'

Would be nice, if someone could clear that up.

TIA

teneffus
06 Sep 2006, 20:29
it is nice hack..
quotes are being like phpbb!..

pauloo
08 Sep 2006, 08:26
Nice thank you !

CoreIssue
17 Sep 2006, 17:27
I had this in before. Worked find.

But it doesn't work on 3.6.1.

And I really would like it back.

What is with the developers not giving us an option to set our own depths? I have run phpBB and have an SMF on. Both nest, and SMF has the option of not allowing nested.

Gee. Paying for vB you would think we can have an option included in a feebie.

rezapci
17 Sep 2006, 17:44
some screenshots please

silurius
23 Sep 2006, 20:58
Will install when it's a product. Looks great.

Noonster
23 Sep 2006, 21:29
This didn't seem to do the trick for me. It still only quotes 2 as oppose to 4. What gives?
Having the same problem here!!!

pauloo
26 Sep 2006, 09:50
Very nice ! thanks

Avalon111
26 Sep 2006, 10:29
anyone of you noticed that nested quotes are working in pm's in 3.6.1?

without that modification

pauloo
26 Sep 2006, 10:33
yes fine with 3.6.1

kash2k
26 Sep 2006, 13:43
anyone of you noticed that nested quotes are working in pm's in 3.6.1?

without that modification

Worked in older versions too.

Shame this thing is limited to 2 quotes and not the value you set in that one line of code :(

XtAzY, you wanna take a look see and tell us what's wrong?

CoreIssue
06 Oct 2006, 18:02
Now make them work in the posts. Grrrr!

I need that function for my members. We use it 3 or 4 deep on many topics.

Make it able to turn off, for those who don't want it, like they do in SMF.

My comments are really aimed at the vB developers. I don't know what they are thinking to not have it in place. :confused:

Skedoozy
07 Oct 2006, 01:40
I installed it. Would really like to see it work with more than 2 quotes as well. I set mine to 6 and still just get 2. :/

Viper007Bond
29 Oct 2006, 17:13
Thanks so much for this mod! Exactly what I've been looking for! :)

Skedoozy
02 Nov 2006, 23:31
X, you there?

baronvonwalz
27 Nov 2006, 02:53
You know, you can do it alot easier than this.

Find this:

function strip_quotes($text)
{

And follow it with

return text;

So it looks like

function strip_quotes($text)
{return text;

CoreIssue
27 Nov 2006, 03:11
You know, you can do it alot easier than this.

Find this:

function strip_quotes($text)
{

And follow it with

return text;

So it looks like

function strip_quotes($text)
{return text;
Doesn't work on 3.6.4

You quote a post and all it says is
text

baronvonwalz
01 Dec 2006, 00:48
Erm, I'm sorry, I did that wrong.

It should be.


function strip_quotes($text)
{return $text;

CoreIssue
01 Dec 2006, 01:22
Erm, I'm sorry, I did that wrong.

It should be.


function strip_quotes($text)
{return $text;

No sweat. We all miss it a bit at times.

That works. Thanks!

But for clarity of others

Find
function strip_quotes($text)
{
Replace with
function strip_quotes($text)
{return text;
Leaving that { will give a parse error.

Again, thanks! You do good work!

I only tried this on 3.6.4

Nixonian
02 Dec 2006, 22:28
No sweat. We all miss it a bit at times.

That works. Thanks!

But for clarity of others
....
And to be really, really sure, don't omit the '$'
So change
function strip_quotes($text)
{
to
function strip_quotes($text)
{return $text;
And yes, thanks to that, nested quotes work perfectly again. As simple as that :)
Also tested on 3.6.4

CoreIssue
03 Dec 2006, 01:42
Thanks! Trying to help I just created another issue! :confused:

infinityloop
03 Dec 2006, 09:06
And to be really, really sure, don't omit the '$'
So change
function strip_quotes($text)
{
to
function strip_quotes($text)
{return $text;
And yes, thanks to that, nested quotes work perfectly again. As simple as that :)
Also tested on 3.6.4
Many thanks. works like a charm :)

tobybird
04 Dec 2006, 06:38
very nice! Thanks!

Clicked Install

yoyoyoyo
06 Dec 2006, 14:36
And to be really, really sure, don't omit the '$'
So change
function strip_quotes($text)
{to
function strip_quotes($text)
{return $text;And yes, thanks to that, nested quotes work perfectly again. As simple as that :)
Also tested on 3.6.4works great, thanks!

chick
07 Dec 2006, 16:55
This is great, though I'm not installing it... but someone who is posting in this thread may be able to assist me.

Where do I go to put a solid pixel border (or dashed) around the quote box area? It doesn't have a defined outline and I'm stumped.

Thanks

DJ XtAzY
07 Dec 2006, 20:35
Hack updated with CoreIssue's simple edit. Thanks!!!

phovanxua
20 Dec 2006, 01:39
worked nice on 3.6.4 .

Thanks .

Amiga Harrison
20 Dec 2006, 17:07
This is great. Such a simple hack to add this feature that it definitely should be included in vB as standard.

This feature was one of the things I instantly noticed was missing from vB after coming from running an IPB board.

zetetic
03 Jan 2007, 04:58
Hack updated with CoreIssue's simple edit. Thanks!!!
I think it was baronvonwalz' idea, but thanks to everyone for their input on this!

Zowners
21 Jan 2007, 17:57
i followed the instructions but my forum is not working anymore and i dont know what to do!


iam getting this:
please help =(

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/.greybear/paramorefans/paramorefans.com/boards/includes/functions.php on line 4704

Parse error: syntax error, unexpected '"' in /home/.greybear/paramorefans/paramorefans.com/boards/includes/functions.php on line 4704

Coldhands
25 Jan 2007, 19:15
How do I edit the amount of levels the nested quotes go to?

I've installed it, but it will go for as long as people can hit the quote button, which can get ugly in some long threads.

Could someone please post the old code that used to be here? CoreIssue's simple edit doesn't work the same as the other method. It's all or nothing. ;-[

I know it's something like while ( ($pos !== false) && ($quote_count <= 2) );, but I forget where to put it.

sinaluna
04 Mar 2007, 19:50
My question is the same as Coldhands - I'd also like to be able to limit the number of levels.

Thanks - this is a wonderful add-on!

TWTCommish
05 Mar 2007, 04:03
I'm about 95% sure that older versions of vBulletin (pre-2.0, I think) used nested quotes. The thing is, they really began to pile up after awhile, to the point where the quotes would be 4 or 5 times the reply after a page or two. It ended up being better to simply quote the last one most of the time. Sure beat the alternative, since users very rarely edited out the excessive quotes later in a thread.

ZomgStuff
05 Mar 2007, 04:11
Thank you, definately on my todo list.

sinaluna
06 Mar 2007, 06:39
How do I edit the amount of levels the nested quotes go to?

I've installed it, but it will go for as long as people can hit the quote button, which can get ugly in some long threads.

Could someone please post the old code that used to be here? CoreIssue's simple edit doesn't work the same as the other method. It's all or nothing. ;-[

I know it's something like while ( ($pos !== false) && ($quote_count <= 2) );, but I forget where to put it.
I'm using the solution posted here and it seems to be working fine:

http://www.vbulletin.com/forum/showthread.php?t=188532&highlight=quotes+wrap+around

Skedoozy
24 May 2007, 07:40
This sometimes does not put all the right quote code in breaking the nesting. Didn't have the problem before 3.6.7pl.

ogameclub
27 Apr 2008, 22:31
No works vBulletin® Version 3.7.0 Release Candidate 4

akanevsky
28 Apr 2008, 01:12
Very nicely done. I don't understand why Jelsoft didn't do this to begin with. Great job.

They did, in earlier versions, but then it was decided that removing inner layers is a better behavior. In some ways, I agree, as people tend to not remove previous layers of quotes by themselves and sometimes you get very wide posts as a result.