News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

$message['subject']

Started by manda, April 26, 2007, 02:37:19 PM

Previous topic - Next topic

manda

Hello, can someone please tell me where I'm supposed to go to modify the elements composing the $message['subject'] function?

What if for instance - just a silly one - I wanted to have "Title: Re" instead of "Re: Title"?

Thank you very much.

guppy

Only if you're sure of what you're doing ;)

Mr Re: is called "response_prefix". Search for him in Sources>Post.php

manda

#2
Thanks!

Quote from: iwyen on April 27, 2007, 01:28:32 AM
Only if you're sure of what you're doing ;)

Ahem, where's the parse error?

$form_subject = $txt['response_prefix'] . '#' .$message['counter'] : ''. ': '. $form_subject;

Basically I want it to be:
Re #...: Subject

Rudolf

#3
Try this
$form_subject = $txt['response_prefix'] . '#' .$message['counter'] . ': '. $form_subject;

PS: However in Post.php you should use
$form_subject = $txt['response_prefix'] . '#' . ($context['num_replies'] +1)  . ': '. $form_subject;
$message['counter'] doesn't exists in Post.php
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

manda

Yay!

But it won't do for "quote"...

Add 'Re: ' to the front of the quoted subject.
if (trim($context['response_prefix']) != '' && $func['strpos']($form_subject, trim($context['response_prefix'])) !== 0)
$form_subject = $txt['response_prefix'] . '#' . ($context['num_replies'] +1)  . ': '. $form_subject;

Advertisement: