News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

bbcode from [quote] to [q]

Started by Rohanx, January 29, 2008, 02:52:06 AM

Previous topic - Next topic

Rohanx

Hi all, I want to change bbcode, which using for quoters. I want use short variant of [quote ] --> [q]
How I can do it?

metallica48423

i could be completely wrong here, but i believe theres several ways to do a quote.

Each of these is in /Sources/Subs.php


array(
'tag' => 'quote',
'before' => '<div class="quoteheader">' . $txt['smf240'] . '</div><div class="quote">',
'after' => '</div>',
'block_level' => true,
),
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '(.{1,192}?)', 'quoted' => true, 'validate' => 'parse_bbc'),
),
'before' => '<div class="quoteheader">' . $txt['smf239'] . ': {author}</div><div class="quote">',
'after' => '</div>',
'block_level' => true,
),
array(
'tag' => 'quote',
'type' => 'parsed_equals',
'before' => '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'after' => '</div>',
'quoted' => 'optional',
'block_level' => true,
),
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '([^<>]{1,192}?)'),
'link' => array('match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|action=profile;u=\d+)'),
'date' => array('match' => '(\d+)', 'validate' => 'timeformat'),
),
'before' => '<div class="quoteheader"><a href="' . $scripturl . '?{link}">' . $txt['smf239'] . ': {author} ' . $txt[176] . ' {date}</a></div><div class="quote">',
'after' => '</div>',
'block_level' => true,
),
array(
'tag' => 'quote',
'parameters' => array(
'author' => array('match' => '(.{1,192}?)', 'validate' => 'parse_bbc'),
),
'before' => '<div class="quoteheader">' . $txt['smf239'] . ': {author}</div><div class="quote">',
'after' => '</div>',
'block_level' => true,
),


I believe if you change each
'tag' => 'quote',
to
'tag' => 'q', 

It should do what you want
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Rohanx

I changed it in all places, there were ~5 copies. 
Now if I write [q ] by hands all work but BBC button give me not [q ]  but [quote ] after pushing on it.

metallica48423

oops.

in /Themes/themename/Post.template.php, where themename is the theme you're using, find:


'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]),


change it to:


'quote' => array('code' => 'q', 'before' => '[q]', 'after' => '[/q]', 'description' => $txt[260]),



Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Advertisement: