Version 16.185.1

This commit is contained in:
Antonio Cañas Vargas 2017-04-19 14:27:52 +02:00
parent 0d59b16b3d
commit 0aaddb086a
6 changed files with 148 additions and 59 deletions

View File

@ -406,7 +406,7 @@ void Ann_ShowFormAnnouncement (void)
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_New_announcement; extern const char *Txt_New_announcement;
extern const char *Txt_MSG_Subject; extern const char *Txt_MSG_Subject;
extern const char *Txt_MSG_Message; extern const char *Txt_MSG_Content;
extern const char *Txt_Users; extern const char *Txt_Users;
extern const char *Txt_Create_announcement; extern const char *Txt_Create_announcement;
@ -419,7 +419,7 @@ void Ann_ShowFormAnnouncement (void)
/***** Announcement subject and body *****/ /***** Announcement subject and body *****/
Ann_PutSubjectMessage ("Subject",Txt_MSG_Subject, 2); Ann_PutSubjectMessage ("Subject",Txt_MSG_Subject, 2);
Ann_PutSubjectMessage ("Content",Txt_MSG_Message,20); Ann_PutSubjectMessage ("Content",Txt_MSG_Content,20);
/***** Users' roles who can view the announcement *****/ /***** Users' roles who can view the announcement *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"

View File

@ -214,13 +214,15 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.185 (2017-04-19)" #define Log_PLATFORM_VERSION "SWAD 16.185.1 (2017-04-19)"
#define CSS_FILE "swad16.184.css" #define CSS_FILE "swad16.184.css"
#define JS_FILE "swad16.181.js" #define JS_FILE "swad16.181.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.185.1: Apr 19, 2017 Changes in forums.
New help URLs for forums. (217793 lines)
Version 16.185: Apr 19, 2017 Code refactoring in forums. (217708 lines) Version 16.185: Apr 19, 2017 Code refactoring in forums. (217708 lines)
Version 16.184: Apr 18, 2017 Changes in layout of page numbers. (217724 lines) Version 16.184: Apr 18, 2017 Changes in layout of page numbers. (217724 lines)
Version 16.183.1: Apr 18, 2017 Changes in layout of forums. (217719 lines) Version 16.183.1: Apr 18, 2017 Changes in layout of forums. (217719 lines)

View File

@ -967,7 +967,7 @@ void For_RemoveUsrFromReadThrs (long UsrCod)
static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message) static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message)
{ {
extern const char *Hlp_SOCIAL_Forums; extern const char *Hlp_SOCIAL_Forums_posts;
extern const char *Txt_Thread; extern const char *Txt_Thread;
struct ForumThread Thr; struct ForumThread Thr;
char LastSubject[Cns_MAX_BYTES_SUBJECT + 1]; char LastSubject[Cns_MAX_BYTES_SUBJECT + 1];
@ -1006,7 +1006,7 @@ static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Messag
/***** Start frame *****/ /***** Start frame *****/
sprintf (FrameTitle,"%s: %s",Txt_Thread,Thr.Subject); sprintf (FrameTitle,"%s: %s",Txt_Thread,Thr.Subject);
Lay_StartRoundFrame (NULL,FrameTitle,For_PutIconNewPost, Lay_StartRoundFrame (NULL,FrameTitle,For_PutIconNewPost,
Hlp_SOCIAL_Forums); Hlp_SOCIAL_Forums_posts);
/***** Get posts of a thread from database *****/ /***** Get posts of a thread from database *****/
sprintf (Query,"SELECT PstCod,UNIX_TIMESTAMP(CreatTime)" sprintf (Query,"SELECT PstCod,UNIX_TIMESTAMP(CreatTime)"
@ -2467,7 +2467,7 @@ void For_ShowForumTheads (void)
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted, static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
Lay_AlertType_t AlertType,const char *Message) Lay_AlertType_t AlertType,const char *Message)
{ {
extern const char *Hlp_SOCIAL_Forums; extern const char *Hlp_SOCIAL_Forums_threads;
extern const char *Txt_Forum; extern const char *Txt_Forum;
extern const char *Txt_MSG_Subject; extern const char *Txt_MSG_Subject;
extern const char *Txt_FORUM_THREAD_HELP_ORDER[2]; extern const char *Txt_FORUM_THREAD_HELP_ORDER[2];
@ -2552,7 +2552,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
/***** Start frame for threads of this forum *****/ /***** Start frame for threads of this forum *****/
sprintf (FrameTitle,"%s: %s",Txt_Forum,ForumName); sprintf (FrameTitle,"%s: %s",Txt_Forum,ForumName);
Lay_StartRoundFrame (NULL,FrameTitle,For_PutIconNewThread, Lay_StartRoundFrame (NULL,FrameTitle,For_PutIconNewThread,
Hlp_SOCIAL_Forums); Hlp_SOCIAL_Forums_threads);
/***** List the threads *****/ /***** List the threads *****/
if (NumThrs) if (NumThrs)
@ -3795,19 +3795,22 @@ static void For_RestrictAccess (void)
static void For_WriteFormForumPst (bool IsReply,const char *Subject) static void For_WriteFormForumPst (bool IsReply,const char *Subject)
{ {
extern const char *Hlp_SOCIAL_Forums; extern const char *Hlp_SOCIAL_Forums_new_post;
extern const char *Hlp_SOCIAL_Forums_new_thread;
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_New_post; extern const char *Txt_New_post;
extern const char *Txt_New_thread; extern const char *Txt_New_thread;
extern const char *Txt_MSG_Subject; extern const char *Txt_MSG_Subject;
extern const char *Txt_MSG_Message; extern const char *Txt_MSG_Content;
extern const char *Txt_Send; extern const char *Txt_Send;
/***** Start frame *****/ /***** Start frame *****/
Lay_StartRoundFrame (NULL, Lay_StartRoundFrame (NULL,
IsReply ? Txt_New_post : IsReply ? Txt_New_post :
Txt_New_thread, Txt_New_thread,
NULL,Hlp_SOCIAL_Forums); NULL,
IsReply ? Hlp_SOCIAL_Forums_new_post :
Hlp_SOCIAL_Forums_new_thread);
/***** Start form *****/ /***** Start form *****/
if (IsReply) // Form to write a reply to a message of an existing thread if (IsReply) // Form to write a reply to a message of an existing thread
@ -3868,7 +3871,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
"</textarea>" "</textarea>"
"</td>" "</td>"
"</tr>", "</tr>",
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Message); The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Content);
fprintf (Gbl.F.Out,"</table>"); fprintf (Gbl.F.Out,"</table>");

View File

@ -1792,6 +1792,90 @@ const char *Hlp_SOCIAL_Forums =
"SOCIAL.Forums.en"; "SOCIAL.Forums.en";
#endif #endif
const char *Hlp_SOCIAL_Forums_threads =
#if L==1
"SOCIAL.Forums.es#discusiones";
#elif L==2
"SOCIAL.Forums.en#threads";
#elif L==3
"SOCIAL.Forums.en#threads";
#elif L==4
"SOCIAL.Forums.es#discusiones";
#elif L==5
"SOCIAL.Forums.en#threads";
#elif L==6
"SOCIAL.Forums.es#discusiones";
#elif L==7
"SOCIAL.Forums.en#threads";
#elif L==8
"SOCIAL.Forums.en#threads";
#elif L==9
"SOCIAL.Forums.en#threads";
#endif
const char *Hlp_SOCIAL_Forums_new_thread =
#if L==1
"SOCIAL.Forums.es#nueva-discusi%C3%B3n";
#elif L==2
"SOCIAL.Forums.en#new-thread";
#elif L==3
"SOCIAL.Forums.en#new-thread";
#elif L==4
"SOCIAL.Forums.es#nueva-discusi%C3%B3n";
#elif L==5
"SOCIAL.Forums.en#new-thread";
#elif L==6
"SOCIAL.Forums.es#nueva-discusi%C3%B3n";
#elif L==7
"SOCIAL.Forums.en#new-thread";
#elif L==8
"SOCIAL.Forums.en#new-thread";
#elif L==9
"SOCIAL.Forums.en#new-thread";
#endif
const char *Hlp_SOCIAL_Forums_posts =
#if L==1
"SOCIAL.Forums.es#comentarios";
#elif L==2
"SOCIAL.Forums.en#posts";
#elif L==3
"SOCIAL.Forums.en#posts";
#elif L==4
"SOCIAL.Forums.es#comentarios";
#elif L==5
"SOCIAL.Forums.en#posts";
#elif L==6
"SOCIAL.Forums.es#comentarios";
#elif L==7
"SOCIAL.Forums.en#posts";
#elif L==8
"SOCIAL.Forums.en#posts";
#elif L==9
"SOCIAL.Forums.en#posts";
#endif
const char *Hlp_SOCIAL_Forums_new_post =
#if L==1
"SOCIAL.Forums.es#nuevo-comentario";
#elif L==2
"SOCIAL.Forums.en#new-post";
#elif L==3
"SOCIAL.Forums.en#new-post";
#elif L==4
"SOCIAL.Forums.es#nuevo-comentario";
#elif L==5
"SOCIAL.Forums.en#new-post";
#elif L==6
"SOCIAL.Forums.es#nuevo-comentario";
#elif L==7
"SOCIAL.Forums.en#new-post";
#elif L==8
"SOCIAL.Forums.en#new-post";
#elif L==9
"SOCIAL.Forums.en#new-post";
#endif
/***** MESSAGES tab *****/ /***** MESSAGES tab *****/
const char *Hlp_MESSAGES_Notifications = const char *Hlp_MESSAGES_Notifications =

View File

@ -481,7 +481,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
{ {
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_MSG_Subject; extern const char *Txt_MSG_Subject;
extern const char *Txt_MSG_Message; extern const char *Txt_MSG_Content;
extern const char *Txt_Original_message; extern const char *Txt_Original_message;
char Query[512]; char Query[512];
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
@ -553,7 +553,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
"<td class=\"LEFT_MIDDLE\">" "<td class=\"LEFT_MIDDLE\">"
"<textarea id=\"MsgContent\" name=\"Content\"" "<textarea id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\">", " class=\"MSG_CONTENT\" rows=\"20\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Message); The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Content);
/* Start textarea with a '\n', that will be not visible in textarea. /* Start textarea with a '\n', that will be not visible in textarea.
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"), When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
@ -586,7 +586,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
"<textarea id=\"MsgContent\" name=\"Content\"" "<textarea id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\">", " class=\"MSG_CONTENT\" rows=\"20\">",
The_ClassForm[Gbl.Prefs.Theme], The_ClassForm[Gbl.Prefs.Theme],
Txt_MSG_Message); Txt_MSG_Content);
/* Start textarea with a '\n', that will be not visible in textarea. /* Start textarea with a '\n', that will be not visible in textarea.
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"), When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
@ -2585,7 +2585,7 @@ void Msg_ShowFormToFilterMsgs (void)
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_MSG_From; extern const char *Txt_MSG_From;
extern const char *Txt_MSG_To; extern const char *Txt_MSG_To;
extern const char *Txt_MSG_Message; extern const char *Txt_MSG_Content;
const char *TxtFromTo[Msg_NUM_TYPES_OF_MSGS] = const char *TxtFromTo[Msg_NUM_TYPES_OF_MSGS] =
{ {
Txt_MSG_From, Txt_MSG_From,
@ -2617,7 +2617,7 @@ void Msg_ShowFormToFilterMsgs (void)
"</label>" "</label>"
"</td>", "</td>",
The_ClassForm[Gbl.Prefs.Theme], The_ClassForm[Gbl.Prefs.Theme],
Txt_MSG_Message, Txt_MSG_Content,
Msg_MAX_CHARS_FILTER_CONTENT,Gbl.Msg.FilterContent); Msg_MAX_CHARS_FILTER_CONTENT,Gbl.Msg.FilterContent);
/***** End table *****/ /***** End table *****/
@ -2856,7 +2856,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
extern const char *Txt_MSG_Sent; extern const char *Txt_MSG_Sent;
extern const char *Txt_MSG_From; extern const char *Txt_MSG_From;
extern const char *Txt_MSG_To; extern const char *Txt_MSG_To;
extern const char *Txt_MSG_Message; extern const char *Txt_MSG_Content;
struct UsrData UsrDat; struct UsrData UsrDat;
const char *Title = NULL; // Initialized to avoid warning const char *Title = NULL; // Initialized to avoid warning
bool FromThisCrs = false; // Initialized to avoid warning bool FromThisCrs = false; // Initialized to avoid warning
@ -2984,12 +2984,12 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** Write "Message:" *****/ /***** Write "Content:" *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP MSG_TIT\">" "<td class=\"RIGHT_TOP MSG_TIT\">"
"%s:&nbsp;" "%s:&nbsp;"
"</td>", "</td>",
Txt_MSG_Message); Txt_MSG_Content);
/***** Initialize image *****/ /***** Initialize image *****/
Img_ImageConstructor (&Image); Img_ImageConstructor (&Image);

View File

@ -13360,43 +13360,43 @@ const char *Txt_FORUM_THREAD_HELP_ORDER[For_NUM_ORDERS] =
const char *Txt_FORUM_THREAD_ORDER[For_NUM_ORDERS] = const char *Txt_FORUM_THREAD_ORDER[For_NUM_ORDERS] =
{ {
#if L==1 #if L==1
"Primer mensaje" // Necessita traduccio "Primer comentari"
#elif L==2 #elif L==2
"Erste Nachricht" "Erste Post"
#elif L==3 #elif L==3
"First message" "First post"
#elif L==4 #elif L==4
"Primer mensaje" "Primer comentario"
#elif L==5 #elif L==5
"Premier message" "Premier post"
#elif L==6 #elif L==6
"Primer mensaje" // Okoteve traducción "Primer comentario" // Okoteve traducción
#elif L==7 #elif L==7
"Primo messaggio" "Primo post"
#elif L==8 #elif L==8
"Pierwsza wiadomosc" "Pierwsza post"
#elif L==9 #elif L==9
"Primeira mensagem" "Primeira post"
#endif #endif
, ,
#if L==1 #if L==1
"&Uacute;ltimo mensaje" // Necessita traduccio "&Uacute;ltim comentari"
#elif L==2 #elif L==2
"Letzte Nachricht" "Letzte Post"
#elif L==3 #elif L==3
"Last message" "Last post"
#elif L==4 #elif L==4
"&Uacute;ltimo mensaje" "&Uacute;ltimo comentario"
#elif L==5 #elif L==5
"Dernier message" "Dernier post"
#elif L==6 #elif L==6
"&Uacute;ltimo mensaje" // Okoteve traducción "&Uacute;ltimo comentario" // Okoteve traducción
#elif L==7 #elif L==7
"Ultimo messaggio" "Ultimo post"
#elif L==8 #elif L==8
"Ostatnia wiadomosc" "Ostatnia post"
#elif L==9 #elif L==9
"&Uacute;ltima mensagem" "&Uacute;ltima post"
#endif #endif
}; };
@ -23214,6 +23214,27 @@ const char *Txt_Movement_not_allowed =
"Movimento n&atilde;o permitido"; "Movimento n&atilde;o permitido";
#endif #endif
const char *Txt_MSG_Content = // of a post or message
#if L==1
"Contingut";
#elif L==2
"Inhalt";
#elif L==3
"Content";
#elif L==4
"Contenido";
#elif L==5
"Contenu";
#elif L==6
"Contenido"; // Okoteve traducción
#elif L==7
"Contenuto";
#elif L==8
"Tre&sacute;&cacute;";
#elif L==9
"Conte&uacute;do";
#endif
const char *Txt_MSG_Deleted_without_opening = const char *Txt_MSG_Deleted_without_opening =
#if L==1 #if L==1
"Eliminado sin abrir"; // Necessita traduccio "Eliminado sin abrir"; // Necessita traduccio
@ -23277,27 +23298,6 @@ const char *Txt_MSG_from =
"de"; "de";
#endif #endif
const char *Txt_MSG_Message =
#if L==1
"Missatge";
#elif L==2
"Nachricht";
#elif L==3
"Message";
#elif L==4
"Mensaje";
#elif L==5
"Message";
#elif L==6
"Marandu";
#elif L==7
"Messaggio";
#elif L==8
"Wiadomo&sacute;&cacute;";
#elif L==9
"Mensagem";
#endif
const char *Txt_MSG_New = const char *Txt_MSG_New =
#if L==1 #if L==1
"Nuevo"; // Necessita traduccio "Nuevo"; // Necessita traduccio
@ -29955,7 +29955,7 @@ const char *Txt_post =
#if L==1 #if L==1
"comentari"; "comentari";
#elif L==2 #elif L==2
"Nachricht"; "Post";
#elif L==3 #elif L==3
"post"; "post";
#elif L==4 #elif L==4