View Full Version : [HowTo] vBcode [quote]..[/quote] in a box
Floris
Mon 18th Feb '02, 6:10am
[HowTo] vBcode .. in a box - hack
What does this one do?
When viewing a thread, one can see others quoting other users posts or portions of it. This vBcode/style hack will put it in a box and make it look more pretty!
Why did you make it?
Because I saw it on other forums and wondered how it looked on vBulletin, and damn, I think it looks good :)
The Code
Walkthrough (2 steps)
Step #1 Adding the CSS class '.mytable'.
Goto the Admin Control Panel and login as an administrator
From the left menu, browse down to the "Styles"-section and select 'Modify'
Click on '[fonts/colors/etc]' and browse down to the "Head Insert:" and add the find:
.thtcolor {
COLOR: {tableheadtextcolor};
}
</style>
Replace the above code with:
.thtcolor {
COLOR: {tableheadtextcolor};
}
.mytable { border: 1px #616889 solid; background-color: #EBECF1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333; text-decoration: none}
</style>
Scroll down to the bottom of the page and click on 'Save Changes'.
Step #2 Altering the vBcode [quote]
Goto the Admin Control Panel and login as an administrator
From the left menu, browse down to the "Custom vB Codes
"-section and select 'Modify'
Goto the [quote]-part and click on '[edit]' and browse down to the "Head Insert:" and set the following to the vBcode replacement (instead of what is there):
<table width='95%' align='center'><tr> <td><font face='Arial' size=1 color=#616889>(Quote:)</font></td>
</tr><tr><td class='mytable'>{param}</td></tr></table>
Scroll down to the bottom of the page and click on 'Save Changes'.
Additional Note: Do not forget to alter the colours!
Version?
Tested with vBulletin 2.2.x and works just great
The Result
This is how it looks on my web site:
nuno
Mon 18th Feb '02, 6:22am
very nice :)
that would be awesome with vBcode [ code ][ /code ] and [ php ][ /php ] :)
Floris
Mon 18th Feb '02, 6:29am
Originally posted by nuno
very nice :)
that would be awesome with vBcode and :)
The and [php] vBcode tags aren't displayed in the 'Custom vBcode'-section, so I guess they require code-hacking?
[HowTo] Signature in a box ..
Make sure you applied step 1 from the above instructions. (step 2 is not required for the signature):
Step #3: The signature part
From the ACP edit the template: postbit_signature by replacing that code with:
[code]
<table width="100%">
<tr>
<td><font face="Tahoma, Helvetica, sans-serif" size="1" color="#616889">(signature)</font></td>
</tr>
<tr>
<td class="mytable">$post[signature]</td>
</tr>
</table>
Save changes
nuno
Mon 18th Feb '02, 6:33am
yup
i just dont like when someone posts php code the entire table will be like a width="1000". :D
Zzed
Mon 18th Feb '02, 9:37pm
This is awesome.:)
I have one problem with it.:( Is there a reason why I can't nest those more than 3 levels?
Floris
Tue 19th Feb '02, 4:26am
Originally posted by Zzed
This is awesome.:)
I have one problem with it.:( Is there a reason why I can't nest those more than 3 levels?
In vBulletin 2.2.2 (which this is made for) it works like this:
It seems to only pick the quote from the post you click the quote button on, not the quote in the quote.
You will need to manually do quote nest1 quote nest2 quote nest3 quote nest4 /quote /quote /quote /quote
I see now reason why this shouldn't work. However, it does go wrong.
I did:
nest1
nest2
nest3
nest4
And got: (maybe some developer could explain why the fourth nest would go wrong?)
Zzed
Tue 19th Feb '02, 4:56am
We are on 2.2.2 as well. I preserved the old QUOTE and added this as QUOTE2.
The picture you posted is the same thing I experienced. I am baffled by why it acts that way.:confused:
My hat goes off to you. Our users loved the new tag.:)
Thank you very much.:)
Floris
Tue 19th Feb '02, 5:09am
Originally posted by Zzed
We are on 2.2.2 as well. I preserved the old QUOTE and added this as QUOTE2.
The picture you posted is the same thing I experienced. I am baffled by why it acts that way.:confused:
My hat goes off to you. Our users loved the new tag.:)
Thank you very much.:)
You do not get the error with the old quote tag? You can nest 5/10/50 times with that?
Zzed
Tue 19th Feb '02, 6:49am
Originally posted by xiphoid
You do not get the error with the old quote tag? You can nest 5/10/50 times with that? You're right. Even the old quote tag gets confused after the third level of nesting.:)
BTW, please share with us if you have any more cool tags like this.:)
Floris
Tue 19th Feb '02, 6:53am
Originally posted by Zzed
You're right. Even the old quote tag gets confused after the third level of nesting.:)
BTW, please share with us if you have any more cool tags like this.:)
AH!
So it isn't my little 'hack' that is incorrect (thought so!)
See my sig for my other hacks. And I haven't altered any more vBcode's (yet)
TWTCommish
Wed 20th Feb '02, 9:09pm
It's probably just some imperfection with the regular expression.
Thomas P
Sat 23rd Feb '02, 2:35pm
Thanks, great stuff!
I'll use it :)
thx,
-Tom
Floris
Sat 23rd Feb '02, 2:41pm
Originally posted by Thomas P
Thanks, great stuff!
I'll use it :)
thx,
-Tom
No problem, happy to help! Enjoy :)
Denjin
Tue 26th Feb '02, 1:40am
Ok, it is late and I guess I'm missing something...but what does this mean?
* Goto the [quote]-part and click on '[edit]' and browse down to the "Head Insert:" and set the following to the vBcode replacement (instead of what is there):
I never saw this "Head Insert:" part...
TIA,
Christina the Sleepy
Floris
Tue 26th Feb '02, 5:08am
Here ya go
Denjin
Tue 26th Feb '02, 4:38pm
EDIT: I figured it out! I must have just mispasted something before, or perhaps I had that one checkbox at the bottom checked on the vB code page.
Great hack, thanks!
One thing though, I noticed the vB code section has redundant values for what goes in the .mytable in the header insert. Should I be putting something different in the vB code replacement section?
Floris
Tue 26th Feb '02, 7:04pm
Originally posted by Denjin
Great hack, thanks!
No problem, happy to hear that you got it working.
One thing though, I noticed the vB code section has redundant values for what goes in the .mytable in the header insert. Should I be putting something different in the vB code replacement section?
Maybe it is because it is late, but I just do not quite understand what you mean here.
Courage
Wed 6th Mar '02, 7:33am
Originally posted by nuno
very nice :)
that would be awesome with vBcode [ code ][ /code ] and [ php ][ /php ] :)
Changind the [ PHP ] and [ CODE ] display - inspired from [HowTo] vBcode [ quote ]..[ /quote ] in a box - hack by xiphoid (http://www.vbulletin.com/forum/showthread.php?s=&threadid=39980)
From the left menu, browse down to the "Styles"-section and select 'Modify'
Click on '[fonts/colors/etc]' and browse down to the "Head Insert:"
Find:
.thtcolor {
COLOR: #EEEEFF;
}
Replace with:
.thtcolor {
COLOR: #EEEEFF;
}
.mytable { border: 1px #000000 solid; background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333; text-decoration: none
}
In the admin\functions.php
Find:
</normalfont><blockquote><pre><smallfont>PHP:</smallfont><hr>$buffer<hr></pre></blockquote><normalfont>
Replace with:
<table width='95%' align='center'><tr> <td><font face='Arial' size=1 color=#000000><b>PHP</b></font></td>
</tr><tr><td class='mytable'>$buffer</td></tr></table>
=============================================
In the admin\functions.php
Find:
</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>
Replace with:
<table width='95%' align='center'><tr><td><font face='Arial' size=2 color=#000000><b>CODE:</b></tr><tr><td class='mytable'>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "</td></tr></table>
P.S. You can change colors :D
Floris
Wed 6th Mar '02, 7:41am
Please do not post code modifications on these boards.
Wolf42
Thu 7th Mar '02, 10:27am
It seams to be this (http://www.vbulletin.org/forum/showthread.php?s=&threadid=35382) hack FireFly posted on vB.org.
Hhmmm ....
Who developed? :confused:
Floris
Thu 7th Mar '02, 11:12am
FireFly applied the [ codes ] in a box things on vbulletin.org a while later, chen made own version and made also code hacks.
I made this template one, and html is html
kvk007
Fri 29th Mar '02, 12:02pm
xiphoid, you made my day, thanks for this great tip/hint ;)
Floris
Fri 29th Mar '02, 12:32pm
Originally posted by kvk007
xiphoid, you made my day, thanks for this great tip/hint ;)
No problem, my friend.
Kurosawa
Sun 7th Apr '02, 8:35am
It is very nice, but...
I just tried to view my forum with Netscape 4.78, and found a problem with the text in posts that uses quote boxes; Below the quote boxes the text is not rendered with the anticipated "Verdana,Arial,Helvetica,sans-serif"-font, but with Times. All othet text is rendered as it should be (in Netscape 4.78) both above and below the posts with quote boxes.
In IE and Opera everything is fine.
Any suggestions?
Floris
Sun 7th Apr '02, 9:02am
Originally posted by Kurosawa
It is very nice, but...
I just tried to view my forum with Netscape 4.78, and found a problem with the text in posts that uses quote boxes; Below the quote boxes the text is not rendered with the anticipated "Verdana,Arial,Helvetica,sans-serif"-font, but with Times. All othet text is rendered as it should be (in Netscape 4.78) both above and below the posts with quote boxes.
In IE and Opera everything is fine.
Any suggestions?
I have no idea,
it looks the same here in Internet Explorer 5.5/ 6.0 - Netscape 4.78/ 6.x - Opera 6.x - Mozilla 0.9.9
Knux
Mon 29th Apr '02, 4:54pm
Ummm I need some help I was tryin to do somethin and ended up deleting my quote bbcode is there any way to restore the bbcodes back to the origonal ones??
Floris
Mon 29th Apr '02, 5:52pm
Originally posted by Knux
Ummm I need some help I was tryin to do somethin and ended up deleting my quote bbcode is there any way to restore the bbcodes back to the origonal ones??
View original template/ Revert template ?
Knux
Mon 29th Apr '02, 6:31pm
no I had to delete the BBcode so it isn't there I didn't think about that till afterwards :( can anyone help??
Floris
Mon 29th Apr '02, 6:42pm
Originally posted by Knux
no I had to delete the BBcode so it isn't there I didn't think about that till afterwards :( can anyone help??
I am not sure if we are allowed to give code/original vb stuff through this forum. But its quite simple i think
it was a line with quote:
and then <hr> for a line
then {param} to get the content of the quote
and then another <hr>
You can try to make it yourself again?
Just play around!
Or install a test version on another web server (localhost?) and then check in the admin control panel.
Knux
Tue 30th Apr '02, 4:45pm
Never mind it works GREAT THX!:D
Floris
Sun 5th May '02, 7:24am
Originally posted by Mr. X
I had Firefly's hack, but its not working for me for 2.2.5. Plus I found this hack easier to install and configure. But I need to ask, why the </style> in the head insert? When I did that, it seriously butchered the header, all of the code was displayed on my forum. I took it out and it fixed it.
Also I cant nest at all. If I quote a post, it includes the first post of course, BUT if I quote a post that already has a quote in it, it just quotes the text in the post, not the quote.
</style> is already in there, check out the first post again.
FIND ... code, REPLACE WITH ... code.
I think it is pretty obvious.
Mr. X
Mon 6th May '02, 7:09am
NM, its been cleared up. Since I have an edited head insert and didnt realize:
.thtcolor {
COLOR: {tableheadtextcolor};
}
</style>
was on the bottom for the default code (for me its in the middle somewhere due to the edited code I have), it got screwy for a moment.
Atian
Mon 20th May '02, 4:58pm
works just great thanks,it worked like wonder in my forum,heres a pic
Floris
Mon 20th May '02, 5:06pm
Originally posted by Atian
works just great thanks,it worked like wonder in my forum,heres a pic
Off topic >>
In your signature, it has like a bunch of links to websites, and the first one also has a vBulletin forum, when I get the page "you are not logged in, you need to be registered to view the forum" in front of me, the button http://www.shinraonline.net/board/http://www.shinraonline.com/images//vb_bullet.gif links like that, it get a dead image. Guess you need to fix that.
The second url to ffunderground or something isn't working, no dns reply. Maybe you are moving?
The third one works, and it looks pretty good.
The fourth one says "comming soon", guess i have to wait a while then.
I have no idea why your sig says "redirected to vborg". eheh :)
The [www] button in your posts misses http:// in front of it, therefor your URL ends up as vbulletin.com/www.yoursite ..
That is just something I wanted to mention to you :)
I am happy to see that you got the template mod working, along with several others, like the onMouseOver highlight effect etc. Looks good on your board.
Superman53142
Wed 22nd May '02, 12:44am
Has anyone come up with a way to have it use the {firstaltcolor} if the background of the post is {secondaltcolor} or vice-versa?
Floris
Wed 22nd May '02, 4:50am
Originally posted by Superman53142
Has anyone come up with a way to have it use the #F1F1F1 if the background of the post is #DFDFDF or vice-versa? Yes, but that is code-hacking, so not allowed for this thread. Check for FireFly's hints&tips on vBulletin.org
Ryan McBain
Sat 8th Jun '02, 8:02pm
cool, love the hack. How would I make the text in the box bold??
Steve Machol
Sat 8th Jun '02, 8:04pm
Edit the quotereply template.
Ryan McBain
Sat 8th Jun '02, 8:36pm
Ahhh I got everything working perfectly. I was looking for a "hack" like this for sometime now. I could never get the firefly one to work on my board.
MalaK_3araby
Sun 28th Jul '02, 10:20am
Great Hack..
Installing 2nite.
Thanks.
LEARNER29
Tue 3rd Sep '02, 8:19am
that was real real nice looking.
thank you xiphoid
Robink
Sat 15th Feb '03, 10:43am
Cant you somply do something like:
make a tag called quote
and fill with this:
{option} said:
<blockquote><table bgcolor= "9997C1" width = 90%><tr><td>
{param}</td></tr>
</table>
</blockquote>
then in the quotereply template and replace it with the following:
$pagetext
^^ This worked for me.
Robink
Sat 15th Feb '03, 10:45am
Umm VB took the [.quote] and [./quote] as quote tags...
but I think you understood .. right?
mindbuster
Mon 8th Sep '03, 7:42pm
Have anyone done this in vB3 ? If so plz tell how :D
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.