| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 5205|Reply: 6
Collapse the left

patch for the notify of reply.

[Copy link]

 Vietnam

Post time: 2012-04-11 22:45
| Show all posts |Read mode
Edited by fanha99 at 2012-4-11 23:51

hi, because Discuz save the full sentence into the database, and it will get the text when it save. It is difficult to make it change when display.

So my solution is, replace "replied your post in thread" with "{action}" inside the text id: 'reppost_noticeauthor'
  1.         'reppost_noticeauthor'        => '{actor} {action} <a href="forum.php?mod=redirect&goto=findpost&ptid={tid}&pid={pid}" target="_blank">{subject}</a>   <a class="lit" href="forum.php?mod=redirect&goto=findpost&pid={pid}&ptid={tid}" target="_blank">View</a>',
Copy the Code
then I add a new text id:
  1. 'post_action' => 'replied your post in thread',
Copy the Code
then, when display the notify, I just call this
  1. $value['note'] = str_replace('{action}', lang('notification', $value['type'].'_action'), $value['note']);
Copy the Code
It work as charm.
if the solution is accepted I will replace all the notify text with this, and add an text file call 'notification_action' to store all the action text.

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Russia

Post time: 2012-04-12 10:27
| Show all posts
Discuz save the full sentence into the database

Did you see the notification code in X2ML?

I have made a different algorithm:
1) Every notification stored in a Database as "notification type" (it is a key), and plus an array of the notification data.
2) At display time I get the notification template (corresponding to the current language), and insert the notification data into this template.

 Vietnam

 Author| Post time: 2012-04-16 15:44
| Show all posts
hi,

I did not check the X2 code.
but with this forum, I see it work fine.

just confuse why don't you apply it to X2.5?
or I missing st? in my site, it still there the "array" text

 Russia

Post time: 2012-04-16 16:32
| Show all posts
X2.5ML is not finished yet...

 Vietnam

 Author| Post time: 2012-05-25 10:32
| Show all posts
any news with this bug?

 Russia

Post time: 2012-05-25 12:03
| Show all posts
r#59 fixed this bug in x2.5 too.

 Vietnam

 Author| Post time: 2012-05-25 12:50
| Show all posts
thx
thread close
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-22 03:42 GMT+3 , Processed in 0.060873 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list