Page Index Toggle Pages: 1
Topic Tools
Normal Topic Notif. email subject omits [brackets] (Read 2,817 times)
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Notif. email subject omits [brackets]
Reply #6 - Jun 11th, 2009 at 6:30am
Post Tools
New
Post.pl
in SVN.
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
Carsten
Ex Member


Re: Notif. email subject omits [brackets]
Reply #5 - May 31st, 2009 at 4:28pm
Post Tools
Right!
  
Back to top
 
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Notif. email subject omits [brackets]
Reply #4 - May 31st, 2009 at 12:37am
Post Tools
Ah, I get it.  But the issue is that, as you acknowledge, there is no UBBC in the thread title or board title.  Therefore, to correct this issue, one should simply remove the line that chops the brackets... right?
  
Back to top
WWW  
IP Logged
 
Carsten
Ex Member


Re: Notif. email subject omits [brackets]
Reply #3 - May 30th, 2009 at 7:22pm
Post Tools
cepheid wrote on May 30th, 2009 at 6:52pm:
Carsten, what UBBC is present in the board name?I'm not sure I understand why any processing is done at all, since I don't see why the board name would contain UBBC.

None actually - my memory faild me - happens from time to time. You can safely remove those two lines of code.

cepheid wrote on May 30th, 2009 at 6:52pm:
I'm also a bit confused as to your regexp... the final \[\/\1\] looks like it matches [/1] but I don't know why that would be in the subject.Also, it looks you're replacing all matched text with only $3, which is the content NOT in brackets.Am I misreading the regexp?

The final \[\/\1\] is if we take away the esc. is [/\1] - \1 means 'the same as' whats inside the first parantese - meaning the regex will look for an opening bracket and a closing bracket of the same kind - thus your second question, the regex will keep whats between the opening and the (same) closing bracket and remove the brackets.
  
Back to top
 
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Notif. email subject omits [brackets]
Reply #2 - May 30th, 2009 at 6:52pm
Post Tools
Quote:
avoid ubbc code (from board name)

Carsten, what UBBC is present in the board name?  I'm not sure I understand why any processing is done at all, since I don't see why the board name would contain UBBC.

I'm also a bit confused as to your regexp... the final \[\/\1\] looks like it matches [/1] but I don't know why that would be in the subject.  Also, it looks you're replacing all matched text with only $3, which is the content NOT in brackets.  Am I misreading the regexp?
  
Back to top
WWW  
IP Logged
 
Carsten
Ex Member


Re: Notif. email subject omits [brackets]
Reply #1 - May 30th, 2009 at 6:37pm
Post Tools
The sharp brackets are obviously removed to avoid ubbc code (from board name) in e-mail subjects. The regex is a little simple by removing every bracket and the contens inside them.

This solve the problem:

In Post.pl 'NewNotify' and 'ReplyNotify' sub routines find
Code
Select All
	$thissubject =~ s/\[.*?\]//g; 


and replace with
Code
Select All
	$thissubject =~ s/\[(\S+?)(.*?)\](.*?)\[\/\1\]/$3/g; 

  
Back to top
 
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Notif. email subject omits [brackets]
May 25th, 2009 at 10:54am
Post Tools
I am subscribed for notification on this thread, which has bracketed items in the subject (i.e. [item]).

When I received my notification email, the subject line completely missed the [bracketed] terms... they were just missing.  The title of that thread is: "Add [thread] and [post] tags to YaBBC" ... but my email subject was: "Topic Notification: Re: Add  and  tags to YaBBC (YaBB 3 Feature Requests and Discussion)" ... notice that the bracketed terms are missing.

Obviously, the terms shouldn't be missing, so the code that creates the subject line seems to be omitting them for some reason.

(The same thing happens for any notification in the bug forums, because they have brackets, too, e.g. this forum: [Need Verification].  That gets omitted in the subject line of notification emails, too.)
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top