← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website

 

Your suggestions has been supplied.

On thing we could optionally do is to change the post text of the e-mail body. See the diff comment.

Diff comments:

> === modified file 'templates/notification/email_body.txt'
> --- templates/notification/email_body.txt	2009-02-20 16:46:21 +0000
> +++ templates/notification/email_body.txt	2015-03-16 07:01:06 +0000
> @@ -1,6 +1,5 @@
>  {% load i18n %}{% blocktrans %}You have received the following notice from {{ current_site }}:
>  
>  {{ message }}
> -
>  To see other notices or change how you receive notifications, please go to {{ notices_url }}.
> -{% endblocktrans %}
> +{% endblocktrans %}
> \ No newline at end of file
> 
> === modified file 'templates/notification/forum_new_post/full.txt'
> --- templates/notification/forum_new_post/full.txt	2010-06-10 12:13:43 +0000
> +++ templates/notification/forum_new_post/full.txt	2015-03-16 07:01:06 +0000
> @@ -1,7 +1,10 @@
> -{% load i18n %}{% blocktrans with topic.get_absolute_url as topic_url %} A new forum post was added under topic "{{ topic }}" by "{{ user }}".
> +{% load i18n %}A new forum post was added to the topic "{{ topic }}":
>  
> -http://{{ current_site }}{{ topic_url }}
> -{% endblocktrans %}
> -{{ topic }}:
> +"{{ user }}" wrote:
>  
>  {{ post.body_text }}

We could change this to {{ post.body  }}. The result will be, that the post is displayed with full syntax, like as you write in the forum. Advantage: Quotes are better displayed, f.e.:

"kaputtnik" wrote:

> *someone wrote:*
> 
> some text
> 
> Heres is a picture: ![image](http://link_to_image.jpg)

Answer with quote

But i don't know if this could be a security whole.

> +{% blocktrans with post.get_absolute_url as post_url and topic.get_absolute_url as topic_url %} 
> +–––––––––––
> +Link to post: http://{{ current_site }}{{ post_url }}
> +Link to topic: http://{{ current_site }}{{ topic_url }}
> +{% endblocktrans %}
> \ No newline at end of file
> 
> === modified file 'templates/notification/forum_new_post/notice.html'
> --- templates/notification/forum_new_post/notice.html	2010-06-10 12:13:43 +0000
> +++ templates/notification/forum_new_post/notice.html	2015-03-16 07:01:06 +0000
> @@ -1,2 +1,2 @@
>  {% load i18n %}{% url profile_view user.username as user_url %}
> -{% blocktrans with topic.get_absolute_url as topic_url %}A new forum post has be created in forum under topic <a href="{{ topic_url }}">{{ topic }}</a> by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
> +{% blocktrans with topic.get_absolute_url as topic_url and post.get_absolute_url as post_url%}<a href="{{ user_url }}">{{ user }}</a> has <a href="{{ post_url }}">replied</a> to the forum topic <a href="{{ topic_url }}">{{ topic }}</a>.{% endblocktrans %}
> 


-- 
https://code.launchpad.net/~franku/widelands-website/forum_notifyings_contain_links_to_post/+merge/253003
Your team Widelands Developers is requested to review the proposed merge of lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website.


References