Version 21.94: Apr 25, 2022 Working on design of dark theme.

This commit is contained in:
acanas 2022-04-25 18:27:24 +02:00
parent 72d536fe6c
commit 13e6dcd07f
34 changed files with 186 additions and 5157 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +1,102 @@
<div> <div style="width:20%;">
<div class="FOOT_LIST_CONT" style="width:20%;"> <h2 title="Information">Information</h2>
<h2 title="Information" class="FOOT_LIST_TITLE">Information</h2> <ul>
<ul class="FOOT_LIST"> <li><a href="https://openswad.org/info/" target="_blank" title="What is SWAD?">
<li><a href="https://openswad.org/info/" target="_blank" class="FOOT_LINK" title="What is SWAD?"> What is SWAD?</a></li>
What is SWAD?</a></li> <li><a href="http://openswad.wordpress.com/" target="_blank" title="Blog">
<li><a href="http://openswad.wordpress.com/" target="_blank" class="FOOT_LINK" title="Blog"> Blog</a></li>
Blog</a></li> <li><a href="https://openswad.org/paper/" target="_blank" title="Publications">
<li><a href="https://openswad.org/paper/" target="_blank" class="FOOT_LINK" title="Publications"> Publications</a></li>
Publications</a></li> <li><a href="https://openswad.org/press/" target="_blank" title="Press">
<li><a href="https://openswad.org/press/" target="_blank" class="FOOT_LINK" title="Press"> Press</a></li>
Press</a></li> <li><a href="https://openswad.org/logo/" target="_blank" title="Logos">
<li><a href="https://openswad.org/logo/" target="_blank" class="FOOT_LINK" title="Logos"> Logos</a></li>
Logos</a></li> <li><a href="http://www.cafepress.com/swad_ugr_es/" target="_blank" title="Shop">
<li><a href="http://www.cafepress.com/swad_ugr_es/" target="_blank" class="FOOT_LINK" title="Shop"> Shop</a></li>
Shop</a></li> </ul>
</ul> </div>
</div> <div style="width:20%;">
<div class="FOOT_LIST_CONT" style="width:20%;"> <h2 title="Documentation">Documentation</h2>
<h2 title="Documentation" class="FOOT_LIST_TITLE">Documentation</h2> <ul>
<ul class="FOOT_LIST"> <li><a href="https://openswad.org/SWAD-manual-EN.pdf" target="_blank" title="Manual (EN)">
<li><a href="https://openswad.org/SWAD-manual-EN.pdf" target="_blank" class="FOOT_LINK" title="Manual (EN)"> Basic manual (EN)</a></li>
Basic manual (EN)</a></li> <li><a href="https://openswad.org/SWAD-manual-ES.pdf" target="_blank" title="Manual (ES)">
<li><a href="https://openswad.org/SWAD-manual-ES.pdf" target="_blank" class="FOOT_LINK" title="Manual (ES)"> Manual b&aacute;sico (ES)</a></li>
Manual b&aacute;sico (ES)</a></li> <li><a href="https://openswad.org/presentation/" target="_blank" title="Presentations">
<li><a href="https://openswad.org/presentation/" target="_blank" class="FOOT_LINK" title="Presentations"> Presentations</a></li>
Presentations</a></li> <li><a href="https://openswad.org/video/" target="_blank" title="Videotutorials">
<li><a href="https://openswad.org/video/" target="_blank" class="FOOT_LINK" title="Videotutorials"> Videotutorials</a></li>
Videotutorials</a></li> <li><a href="https://openswad.org/tool/" target="_blank" title="Tools">
<li><a href="https://openswad.org/tool/" target="_blank" class="FOOT_LINK" title="Tools"> Tools</a></li>
Tools</a></li> </ul>
</ul> </div>
</div> <div style="width:20%;">
<div class="FOOT_LIST_CONT" style="width:20%;"> <h2 title="Information">Social</h2>
<h2 title="Information" class="FOOT_LIST_TITLE">Social</h2> <ul>
<ul class="FOOT_LIST"> <li><a href="http://twitter.com/openswad" target="_blank" title="Twitter">
<li><a href="http://twitter.com/openswad" target="_blank" class="FOOT_LINK" title="Twitter"> Twitter</a></li>
Twitter</a></li> <li><a href="https://www.facebook.com/OpenSWAD/" target="_blank" title="facebook">
<li><a href="https://www.facebook.com/OpenSWAD/" target="_blank" class="FOOT_LINK" title="facebook"> Facebook</a></li>
Facebook</a></li> <li><a href="https://en.wikipedia.org/wiki/SWAD_%28software%29" target="_blank" title="Wikipedia">
<li><a href="https://en.wikipedia.org/wiki/SWAD_%28software%29" target="_blank" class="FOOT_LINK" title="Wikipedia"> Wikipedia</a></li>
Wikipedia</a></li> <li><a href="https://plus.google.com/u/0/109453568780563947088/about/p/pub" target="_blank" title="Google+">
<li><a href="https://plus.google.com/u/0/109453568780563947088/about/p/pub" target="_blank" class="FOOT_LINK" title="Google+"> Google+</a></li>
Google+</a></li> <li><a href="http://www.youtube.com/channel/UCDk02lUBCoqp_v2A25t6orQ/about" target="_blank" title="YouTube">
<li><a href="http://www.youtube.com/channel/UCDk02lUBCoqp_v2A25t6orQ/about" target="_blank" class="FOOT_LINK" title="YouTube"> YouTube</a></li>
YouTube</a></li> <li><a href="http://alternativeto.net/software/swad/" target="_blank" title="alternativeTo">
<li><a href="http://alternativeto.net/software/swad/" target="_blank" class="FOOT_LINK" title="alternativeTo"> alternativeTo</a></li>
alternativeTo</a></li> <li><a href="http://www.startupranking.com/openswad" target="_blank" title="startupRANKING">
<li><a href="http://www.startupranking.com/openswad" target="_blank" class="FOOT_LINK" title="startupRANKING"> startupRANKING</a></li>
startupRANKING</a></li> <li><a href="https://github.com/acanas/swad-core" target="_blank" title="GitHub">
<li><a href="https://github.com/acanas/swad-core" target="_blank" class="FOOT_LINK" title="GitHub"> GitHub</a></li>
GitHub</a></li> <li><a href="https://www.openhub.net/p/swad-core" target="_blank" title="Open HUB">
<li><a href="https://www.openhub.net/p/swad-core" target="_blank" class="FOOT_LINK" title="Open HUB"> Open HUB</a></li>
Open HUB</a></li> </ul>
</ul> </div>
</div> <div style="width:20%;">
<div class="FOOT_LIST_CONT" style="width:20%;"> <h2 title="Free software">Free software</h2>
<h2 title="Free software" class="FOOT_LIST_TITLE">Free software</h2> <ul>
<ul class="FOOT_LIST"> <li><a href="https://openswad.org/source/" target="_blank" title="Source code">
<li><a href="https://openswad.org/source/" target="_blank" class="FOOT_LINK" title="Source code"> Source code</a></li>
Source code</a></li> <li><a href="https://openswad.org/download/" target="_blank" title="Download">
<li><a href="https://openswad.org/download/" target="_blank" class="FOOT_LINK" title="Download"> Download</a></li>
Download</a></li> <li><a href="https://openswad.org/install/" target="_blank" title="Install">
<li><a href="https://openswad.org/install/" target="_blank" class="FOOT_LINK" title="Install"> Install</a></li>
Install</a></li> <li><a href="https://openswad.org/database/" target="_blank" title="Database">
<li><a href="https://openswad.org/database/" target="_blank" class="FOOT_LINK" title="Database"> Database</a></li>
Database</a></li> <li><a href="https://openswad.org/translation/" target="_blank" title="Translation">
<li><a href="https://openswad.org/translation/" target="_blank" class="FOOT_LINK" title="Translation"> Translation</a></li>
Translation</a></li> <li><a href="https://openswad.org/ws/" target="_blank" title="Plugins">
<li><a href="https://openswad.org/ws/" target="_blank" class="FOOT_LINK" title="Plugins"> Plugins</a></li>
Plugins</a></li> <li><a href="https://openswad.org/changelog/" target="_blank" title="Changelog">
<li><a href="https://openswad.org/changelog/" target="_blank" class="FOOT_LINK" title="Changelog"> Changelog</a></li>
Changelog</a></li> <li><a href="https://openswad.org/roadmap/" target="_blank" title="Roadmap">
<li><a href="https://openswad.org/roadmap/" target="_blank" class="FOOT_LINK" title="Roadmap"> Roadmap</a></li>
Roadmap</a></li> <li><a href="https://openswad.org/author/" target="_blank" title="Authors">
<li><a href="https://openswad.org/author/" target="_blank" class="FOOT_LINK" title="Authors"> Authors</a></li>
Authors</a></li> <li><a href="https://openswad.org/pfc/" target="_blank" title="Final Year Projects">
<li><a href="https://openswad.org/pfc/" target="_blank" class="FOOT_LINK" title="Final Year Projects"> Final Year Projects</a></li>
Final Year Projects</a></li> </ul>
</ul> </div>
</div> <div style="width:20%;">
<div class="FOOT_LIST_CONT" style="width:20%;"> <h2 title="Mobile">Mobile</h2>
<h2 title="Mobile" class="FOOT_LIST_TITLE">Mobile</h2> <ul>
<ul class="FOOT_LIST"> <li>
<li> <a href="https://openswad.org/swadroid/" target="_blank" title="SWADroid: SWAD App for Android">
<a href="https://openswad.org/swadroid/" target="_blank" class="FOOT_LINK" title="SWADroid: SWAD App for Android"> SWADroid</a></li>
SWADroid</a></li> <a href="https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid" target="_blank" title="SWADroid: SWAD App for Android">
<a href="https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid" target="_blank" class="FOOT_LINK" title="SWADroid: SWAD App for Android"> SWADroid Google Play</a></li>
SWADroid Google Play</a></li> <li><a href="http://swadroid.wordpress.com/" target="_blank" title="SWADroid Blog">
<li><a href="http://swadroid.wordpress.com/" class="FOOT_LINK" target="_blank" title="SWADroid Blog"> SWADroid Blog</a></li>
SWADroid Blog</a></li> <li><a href="http://twitter.com/swadroid" target="_blank" title="@SWADroid">
<li><a href="http://twitter.com/swadroid" class="FOOT_LINK" target="_blank" title="@SWADroid"> SWADroid Twitter</a></li>
SWADroid Twitter</a></li> <li><a href="https://plus.google.com/115615684349730524355/posts" target="_blank" title="SWADroid Blog">
<li><a href="https://plus.google.com/115615684349730524355/posts" class="FOOT_LINK" target="_blank" title="SWADroid Blog"> SWADroid Google+</a></li>
SWADroid Google+</a></li> <li><a href="https://github.com/Amab/SWADroid" target="_blank" title="SWADroid GitHub">
<li><a href="https://github.com/Amab/SWADroid" class="FOOT_LINK" target="_blank" title="SWADroid GitHub"> SWADroid GitHub</a></li>
SWADroid GitHub</a></li> <li><a href="https://www.openhub.net/p/swadroid" target="_blank" title="SWADroid GitHub">
<li><a href="https://www.openhub.net/p/swadroid" class="FOOT_LINK" target="_blank" title="SWADroid GitHub"> SWADroid Open HUB</a></li>
SWADroid Open HUB</a></li> <li><a href="http://twitter.com/iswad_ugr" target="_blank" title="@iswad_ugr">
<li><a href="http://twitter.com/iswad_ugr" class="FOOT_LINK" target="_blank" title="@iswad_ugr"> iSWAD Twitter</a></li>
iSWAD Twitter</a></li> </ul>
</ul>
</div>
</div> </div>

View File

@ -46,12 +46,6 @@ struct MAC_Params
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address
}; };
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private prototypes ****************************/ /***************************** Private prototypes ****************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include <string.h> // For string functions #include <string.h> // For string functions
#include "swad_account.h" #include "swad_account.h"

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include <string.h> // For string functions #include <string.h> // For string functions
#include "swad_box.h" #include "swad_box.h"

View File

@ -925,7 +925,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"", HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/* Center status */ /* Center status */
@ -1398,7 +1398,7 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
/***** Center requester *****/ /***** Center requester *****/
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"", HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/***** Center status *****/ /***** Center status *****/

View File

@ -606,14 +606,16 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia. TODO: Attach pdf files in multimedia.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.93.7 (2022-04-25)" #define Log_PLATFORM_VERSION "SWAD 21.94 (2022-04-25)"
#define CSS_FILE "swad21.93.7.css" #define CSS_FILE "swad21.94.css"
#define JS_FILE "swad21.92.js" #define JS_FILE "swad21.92.js"
/* /*
Version 21.94: Apr 25, 2022 Working on design of dark theme. (323457 lines)
Version 21.93.8: Apr 25, 2022 Added m.youtube.com. Suggested by Javier Fernández Baldomero. (323455 lines)
Version 21.93.7: Apr 25, 2022 Working on design of dark theme. (323432 lines) Version 21.93.7: Apr 25, 2022 Working on design of dark theme. (323432 lines)
Version 21.93.6: Apr 25, 2022 Working on design of dark theme. (323358 lines) Version 21.93.6: Apr 25, 2022 Working on design of dark theme. (323358 lines)
Copy the following icons to icon public directory: Copy the following icons to icon public directory:
sudo cp icon/info-circle-blue.svg.svg /var/www/html/swad/icon/ sudo cp icon/info-circle-blue.svg /var/www/html/swad/icon/
sudo cp icon/check-circle-green.svg /var/www/html/swad/icon/ sudo cp icon/check-circle-green.svg /var/www/html/swad/icon/
Version 21.93.5: Apr 23, 2022 Working on design of dark theme. (323346 lines) Version 21.93.5: Apr 23, 2022 Working on design of dark theme. (323346 lines)

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_box.h" #include "swad_box.h"
#include "swad_cookie.h" #include "swad_cookie.h"

View File

@ -1274,7 +1274,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/* Course status */ /* Course status */
@ -1393,7 +1393,7 @@ static void Crs_PutFormToCreateCourse (void)
/***** Course requester *****/ /***** Course requester *****/
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/***** Course status *****/ /***** Course status *****/

View File

@ -468,7 +468,7 @@ static void Deg_ListDegreesForEdition (void)
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/* Degree status */ /* Degree status */
@ -596,7 +596,7 @@ static void Deg_PutFormToCreateDegree (void)
/***** Degree requester *****/ /***** Degree requester *****/
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/***** Degree status *****/ /***** Degree status *****/

View File

@ -28,6 +28,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdbool.h> // For boolean type #include <stdbool.h> // For boolean type
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_database.h" #include "swad_database.h"
#include "swad_degree_config.h" #include "swad_degree_config.h"

View File

@ -923,7 +923,10 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
NewPst ? "MSG_BG_NEW" : NewPst ? "MSG_BG_NEW" :
"MSG_BG"); "MSG_BG");
/***** Write subject *****/ /***** Write subject *****/
HTM_TD_Begin ("class=\"LT %s_%s\"", HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
NewPst ? "MSG_TIT_NEW" :
"MSG_TIT",
The_GetSuffix (),
NewPst ? "MSG_BG_NEW" : NewPst ? "MSG_BG_NEW" :
"MSG_BG", "MSG_BG",
The_GetSuffix ()); The_GetSuffix ());
@ -994,7 +997,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS, Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
Msg_WriteMsgAuthor (&UsrDat,Enabled,NULL); Msg_WriteMsgAuthor (&UsrDat,Enabled);
if (Enabled) if (Enabled)
/* Write number of posts from this user */ /* Write number of posts from this user */
For_WriteNumberOfPosts (Forums,UsrDat.UsrCod); For_WriteNumberOfPosts (Forums,UsrDat.UsrCod);
@ -2084,7 +2087,7 @@ static void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums
-1L, -1L,
-1L); -1L);
HTM_BUTTON_Submit_Begin (Txt_FORUM_THREAD_HELP_ORDER[Order], HTM_BUTTON_Submit_Begin (Txt_FORUM_THREAD_HELP_ORDER[Order],
"BT_LINK"); "class=\"BT_LINK\"");
if (Order == Forums->ThreadsOrder) if (Order == Forums->ThreadsOrder)
HTM_U_Begin (); HTM_U_Begin ();
HTM_Txt (Txt_FORUM_THREAD_ORDER[Order]); HTM_Txt (Txt_FORUM_THREAD_ORDER[Order]);
@ -2269,8 +2272,8 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Forums,Thr.ThrCod, Forums,Thr.ThrCod,
Thr.Enabled[Dat_STR_TIME], Thr.Enabled[Dat_STR_TIME],
Thr.Subject, Thr.Subject,
Thr.NumUnreadPosts ? "BOLD FORM_IN" : Thr.NumUnreadPosts ? "BOLD PAG_TXT" :
"FORM_IN", "PAG_TXT",
true); true);
HTM_TD_End (); HTM_TD_End ();
@ -2288,7 +2291,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
HTM_TD_Begin ("class=\"LT %s_%s %s\"", HTM_TD_Begin ("class=\"LT %s_%s %s\"",
Class,The_GetSuffix (),BgColor); Class,The_GetSuffix (),BgColor);
Msg_WriteMsgAuthor (&UsrDat,Thr.Enabled[Order],BgColor); Msg_WriteMsgAuthor (&UsrDat,Thr.Enabled[Order]);
HTM_TD_End (); HTM_TD_End ();
/* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */ /* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_action.h" #include "swad_action.h"
#include "swad_box.h" #include "swad_box.h"

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_error.h" #include "swad_error.h"
#include "swad_figure_cache.h" #include "swad_figure_cache.h"

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include <string.h> #include <string.h>
#include "swad_box.h" #include "swad_box.h"

View File

@ -29,6 +29,7 @@
#include <mysql/mysql.h> // To access MySQL databases #include <mysql/mysql.h> // To access MySQL databases
#include <stddef.h> // For NULL #include <stddef.h> // For NULL
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_action.h" #include "swad_action.h"
#include "swad_assignment_database.h" #include "swad_assignment_database.h"

View File

@ -1071,7 +1071,7 @@ static void Ins_ListInstitutionsForEdition (void)
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS, Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/* Institution status */ /* Institution status */
@ -1524,7 +1524,7 @@ static void Ins_PutFormToCreateInstitution (void)
/***** Institution requester *****/ /***** Institution requester *****/
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"", HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
The_GetSuffix ()); The_GetSuffix ());
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/***** Institution status *****/ /***** Institution status *****/

View File

@ -27,7 +27,8 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <string.h> // For strcasecmp #include <stdlib.h> // For free
#include <string.h> // For strcasecmp
#include "swad_box.h" #include "swad_box.h"
#include "swad_database.h" #include "swad_database.h"

View File

@ -1065,6 +1065,7 @@ static void Med_GetAndProcessYouTubeFromForm (const char *ParamURL,
FULL, // www.youtube.com/watch? FULL, // www.youtube.com/watch?
EMBED, // www.youtube.com/embed/ EMBED, // www.youtube.com/embed/
} YouTube = WRONG; } YouTube = WRONG;
bool CodeFound = false; bool CodeFound = false;
/***** Set media status *****/ /***** Set media status *****/
@ -1108,6 +1109,11 @@ static void Med_GetAndProcessYouTubeFromForm (const char *ParamURL,
YouTube = FULL; YouTube = FULL;
PtrPath = &PtrHost[16]; PtrPath = &PtrHost[16];
} }
else if (!strncasecmp (PtrHost,"m.youtube.com/" ,14)) // Host starts by m.youtube.com/
{
YouTube = FULL;
PtrPath = &PtrHost[14];
}
else if (!strncasecmp (PtrHost,"youtube.com/" ,12)) // Host starts by youtube.com/ else if (!strncasecmp (PtrHost,"youtube.com/" ,12)) // Host starts by youtube.com/
{ {
YouTube = FULL; YouTube = FULL;

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_box.h" #include "swad_box.h"
#include "swad_database.h" #include "swad_database.h"

View File

@ -2101,7 +2101,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat, Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS, Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/***** Write subject *****/ /***** Write subject *****/
@ -2308,7 +2308,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
/*****************************************************************************/ /*****************************************************************************/
// Input: UsrDat must hold user's data // Input: UsrDat must hold user's data
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor) void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled)
{ {
extern const char *Txt_Unknown_or_without_photo; extern const char *Txt_Unknown_or_without_photo;
static const char *ClassPhoto[PhoSha_NUM_SHAPES] = static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
@ -2332,40 +2332,26 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
/***** Begin first column with author's photo /***** Begin first column with author's photo
(if author has a web page, put a link to it) *****/ (if author has a web page, put a link to it) *****/
if (BgColor) HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
HTM_TD_Begin ("class=\"CT %s\" style=\"width:30px;\"",BgColor); if (WriteAuthor)
else Pho_ShowUsrPhotoIfAllowed (UsrDat,
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\""); ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
false);
if (WriteAuthor) else
Pho_ShowUsrPhotoIfAllowed (UsrDat, Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM, ClassPhoto[Gbl.Prefs.PhotoShape]);
false);
else
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
ClassPhoto[Gbl.Prefs.PhotoShape]);
HTM_TD_End (); HTM_TD_End ();
/***** Second column with user name (if author has a web page, put a link to it) *****/ /***** Second column with user name (if author has a web page, put a link to it) *****/
if (WriteAuthor) if (WriteAuthor)
{ {
if (BgColor) HTM_TD_Begin ("class=\"LT\"");
HTM_TD_Begin ("class=\"LT %s\"",BgColor); HTM_DIV_Begin ("class=\"AUTHOR_2_LINES\""); // Limited width
else Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_TD_Begin ("class=\"LT\""); HTM_DIV_End ();
HTM_DIV_Begin ("class=\"AUTHOR_2_LINES\""); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_DIV_End ();
} }
else else
{ HTM_TD_Begin ("class=\"LM\"");
if (BgColor)
HTM_TD_Begin ("class=\"LM %s\"",BgColor);
else
HTM_TD_Begin ("class=\"LM\"");
}
/***** End second column *****/ /***** End second column *****/
HTM_TD_End (); HTM_TD_End ();

View File

@ -113,7 +113,7 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
char **ContentStr,long MsgCod,bool GetContent); char **ContentStr,long MsgCod,bool GetContent);
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg); void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg);
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor); void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled);
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg); void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg);
void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1], void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
bool InsertLinks,bool ChangeBRToRet); bool InsertLinks,bool ChangeBRToRet);

View File

@ -520,7 +520,7 @@ void Ntf_ShowMyNotifications (void)
HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"", HTM_TD_Begin ("class=\"LT %s_%s %s_%s\"",
ClassAuthor,The_GetSuffix (), ClassAuthor,The_GetSuffix (),
ClassBg,The_GetSuffix ()); ClassBg,The_GetSuffix ());
Msg_WriteMsgAuthor (&UsrDat,true,NULL); Msg_WriteMsgAuthor (&UsrDat,true);
HTM_TD_End (); HTM_TD_End ();
/* Write location */ /* Write location */

View File

@ -273,7 +273,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
free (Title); free (Title);
} }
else else
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt); HTM_SPAN_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
if (FirstMsgEnabled) if (FirstMsgEnabled)
HTM_Txt (Subject); HTM_Txt (Subject);
else else
@ -391,14 +391,16 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
if (asprintf (&Title,Txt_Page_X_of_Y,1,Pagination->NumPags) < 0) if (asprintf (&Title,Txt_Page_X_of_Y,1,Pagination->NumPags) < 0)
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title, HTM_BUTTON_Submit_Begin (Title,
"class=\"BT_LINK PAG %s\"",ClassTxt); "class=\"BT_LINK PAG PAG_%s %s_%s\"",
The_GetSuffix (),
ClassTxt,The_GetSuffix ());
HTM_Unsigned (1); HTM_Unsigned (1);
HTM_BUTTON_End (); HTM_BUTTON_End ();
free (Title); free (Title);
Frm_EndForm (); Frm_EndForm ();
if (Pagination->LeftPage > 2) if (Pagination->LeftPage > 2)
{ {
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt); HTM_SPAN_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
HTM_Txt ("&hellip;"); HTM_Txt ("&hellip;");
HTM_SPAN_End (); HTM_SPAN_End ();
} }
@ -506,14 +508,16 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Pagination->LeftPage,Pagination->NumPags) < 0) Pagination->LeftPage,Pagination->NumPags) < 0)
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title, HTM_BUTTON_Submit_Begin (Title,
"class=\"BT_LINK PAG %s\"",ClassTxt); "class=\"BT_LINK PAG PAG_%s %s_%s\"",
The_GetSuffix (),
ClassTxt,The_GetSuffix ());
HTM_Unsigned (Pagination->LeftPage); HTM_Unsigned (Pagination->LeftPage);
HTM_BUTTON_End (); HTM_BUTTON_End ();
free (Title); free (Title);
Frm_EndForm (); Frm_EndForm ();
if (Pagination->LeftPage < Pagination->StartPage - 1) if (Pagination->LeftPage < Pagination->StartPage - 1)
{ {
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt); HTM_SPAN_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
HTM_Txt ("&hellip;"); HTM_Txt ("&hellip;");
HTM_SPAN_End (); HTM_SPAN_End ();
} }
@ -528,7 +532,8 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage) if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage)
{ {
HTM_SPAN_Begin ("title=\"%s\" class=\"PAG_CUR %s\"",Title,ClassTxt); HTM_SPAN_Begin ("title=\"%s\" class=\"PAG_CUR PAG_CUR_%s %s_%s\"",
Title,The_GetSuffix (),ClassTxt,The_GetSuffix ());
HTM_Unsigned (NumPage); HTM_Unsigned (NumPage);
HTM_SPAN_End (); HTM_SPAN_End ();
} }
@ -629,7 +634,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
break; break;
} }
HTM_BUTTON_Submit_Begin (Title, HTM_BUTTON_Submit_Begin (Title,
"class=\"BT_LINK PAG %s\"",ClassTxt); "class=\"BT_LINK PAG PAG_%s %s_%s\"",
The_GetSuffix (),
ClassTxt,The_GetSuffix ());
HTM_Unsigned (NumPage); HTM_Unsigned (NumPage);
HTM_BUTTON_End (); HTM_BUTTON_End ();
Frm_EndForm (); Frm_EndForm ();
@ -643,7 +650,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
{ {
if (Pagination->RightPage > Pagination->EndPage + 1) if (Pagination->RightPage > Pagination->EndPage + 1)
{ {
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt); HTM_SPAN_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
HTM_Txt ("&hellip;"); HTM_Txt ("&hellip;");
HTM_SPAN_End (); HTM_SPAN_End ();
} }
@ -745,7 +752,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Pagination->RightPage,Pagination->NumPags) < 0) Pagination->RightPage,Pagination->NumPags) < 0)
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title, HTM_BUTTON_Submit_Begin (Title,
"class=\"BT_LINK PAG %s\"",ClassTxt); "class=\"BT_LINK PAG PAG_%s %s_%s\"",
The_GetSuffix (),
ClassTxt,The_GetSuffix ());
HTM_Unsigned (Pagination->RightPage); HTM_Unsigned (Pagination->RightPage);
HTM_BUTTON_End (); HTM_BUTTON_End ();
free (Title); free (Title);
@ -757,7 +766,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
{ {
if (Pagination->NumPags > Pagination->RightPage + 1) if (Pagination->NumPags > Pagination->RightPage + 1)
{ {
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt); HTM_SPAN_Begin ("class=\"%s_%s\"",ClassTxt,The_GetSuffix ());
HTM_Txt ("&hellip;"); HTM_Txt ("&hellip;");
HTM_SPAN_End (); HTM_SPAN_End ();
} }
@ -859,7 +868,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Pagination->NumPags,Pagination->NumPags) < 0) Pagination->NumPags,Pagination->NumPags) < 0)
Err_NotEnoughMemoryExit (); Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title, HTM_BUTTON_Submit_Begin (Title,
"class=\"BT_LINK PAG %s\"",ClassTxt); "class=\"BT_LINK PAG PAG_%s %s_%s\"",
The_GetSuffix (),
ClassTxt,The_GetSuffix ());
HTM_Unsigned (Pagination->NumPags); HTM_Unsigned (Pagination->NumPags);
HTM_BUTTON_End (); HTM_BUTTON_End ();
free (Title); free (Title);

View File

@ -28,6 +28,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stddef.h> // For NULL #include <stddef.h> // For NULL
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_action.h" #include "swad_action.h"
#include "swad_config.h" #include "swad_config.h"

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include <string.h> #include <string.h>
#include "swad_action.h" #include "swad_action.h"

View File

@ -48,12 +48,6 @@
#include "swad_role.h" #include "swad_role.h"
#include "swad_system_config.h" #include "swad_system_config.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private prototypes ****************************/ /***************************** Private prototypes ****************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -35,12 +35,6 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_test_visibility.h" #include "swad_test_visibility.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
/******************************* Show visibility *****************************/ /******************************* Show visibility *****************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include <string.h> #include <string.h>
#include "swad_box.h" #include "swad_box.h"

View File

@ -126,6 +126,7 @@ mysql> SHOW TABLES LIKE 'tml_%';
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <linux/limits.h> // For PATH_MAX #include <linux/limits.h> // For PATH_MAX
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_error.h" #include "swad_error.h"
#include "swad_figure.h" #include "swad_figure.h"

View File

@ -28,6 +28,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <linux/limits.h> // For PATH_MAX #include <linux/limits.h> // For PATH_MAX
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_alert.h" #include "swad_alert.h"
#include "swad_box.h" #include "swad_box.h"

View File

@ -27,6 +27,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_database.h" #include "swad_database.h"
#include "swad_error.h" #include "swad_error.h"

View File

@ -39,12 +39,6 @@
#include "swad_timeline_note.h" #include "swad_timeline_note.h"
#include "swad_timeline_publication.h" #include "swad_timeline_publication.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private prototypes ****************************/ /***************************** Private prototypes ****************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -29,6 +29,7 @@
#define _GNU_SOURCE // For asprintf #define _GNU_SOURCE // For asprintf
#include <linux/limits.h> // For PATH_MAX #include <linux/limits.h> // For PATH_MAX
#include <stdio.h> // For asprintf #include <stdio.h> // For asprintf
#include <stdlib.h> // For free
#include "swad_error.h" #include "swad_error.h"
#include "swad_global.h" #include "swad_global.h"