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