From f8b4fcbba52a25a338fa44d64d43c06033a4a463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 13 Jan 2016 17:47:22 +0100 Subject: [PATCH] Version 15.110.16 --- css/swad15.110.13.css | 3 ++- swad_changelog.h | 5 +++-- swad_social.c | 48 ++++++++++++++++++++++++++++++++----------- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/css/swad15.110.13.css b/css/swad15.110.13.css index ce11387ad..34a671f60 100644 --- a/css/swad15.110.13.css +++ b/css/swad15.110.13.css @@ -1528,9 +1528,10 @@ a:hover img.CENTRE_PHOTO_SHOW .USR_ID {color:#404040; font-size:18pt; font-weight:bold;} .DAT {color:#404040; font-size:13pt;} +.DAT_NOBR {color:#404040; font-size:13pt; white-space:nowrap;} +.DAT_BOLD {color:#404040; font-size:13pt; font-weight:bold;} .DAT_GREEN {color:#008000; font-size:13pt;} .DAT_LIGHT {color:#A0A0A0; font-size:13pt;} -.DAT_NOBR {color:#404040; font-size:13pt; white-space:nowrap;} .DAT_N {color:black; font-size:13pt;} .DAT_NOBR_N {color:black; font-size:13pt; white-space:nowrap;} .DAT_N_BOLD {color:black; font-size:13pt; font-weight:bold;} diff --git a/swad_changelog.h b/swad_changelog.h index ea7606eeb..e32a9fa43 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -128,14 +128,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.110.15 (2016-01-13)" +#define Log_PLATFORM_VERSION "SWAD 15.110.16 (2016-01-13)" #define CSS_FILE "swad15.110.13.css" #define JS_FILE "swad15.110.13.js" // 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 /* - Version 15.110.15:Jan 13, 2016 Form to go to public profile of author in timeline. + Version 15.110.16:Jan 13, 2016 Form to go to public profile of author of comment in timeline. (192563 lines) + Version 15.110.15:Jan 13, 2016 Form to go to public profile of author of note in timeline. Extensions '.exe' and '.com' not allowed (Google reported malware). (192543 lines) Version 15.110.14:Jan 13, 2016 Form to go to public profile of sharer/commenter in timeline. (192525 lines) Version 15.110.13:Jan 13, 2016 Time in social timeline without seconds. (192495 lines) diff --git a/swad_social.c b/swad_social.c index d26f7cf9e..3d0e44b16 100644 --- a/swad_social.c +++ b/swad_social.c @@ -217,7 +217,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot, bool ShowNoteAlone, bool ViewTopLine); static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub); -static void Soc_WriteAuthorName (struct UsrData *UsrDat); +static void Soc_WriteAuthorNote (struct UsrData *UsrDat); static void Soc_WriteDateTime (time_t TimeUTC); static void Soc_GetAndWriteSocialPost (long PstCod); static void Soc_PutFormGoToAction (const struct SocialNote *SocNot); @@ -237,6 +237,7 @@ static void Soc_WriteCommentsInSocialNote (long NotCod, const char IdNewComment[Soc_MAX_LENGTH_ID]); static void Soc_WriteSocialComment (struct SocialComment *SocCom, bool ShowCommentAlone); +static void Soc_WriteAuthorComment (struct UsrData *UsrDat); static void Soc_PutFormToRemoveComment (long ComCod); static void Soc_PutDisabledIconShare (unsigned NumShared); static void Soc_PutFormToShareSocialNote (long NotCod); @@ -861,7 +862,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot, fprintf (Gbl.F.Out,"
"); /* Write author's full name and nickname */ - Soc_WriteAuthorName (&UsrDat); + Soc_WriteAuthorNote (&UsrDat); /* Write date and time */ Soc_WriteDateTime (SocNot->DateTimeUTC); @@ -1077,10 +1078,10 @@ static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub) } /*****************************************************************************/ -/*************** Write sharer/commenter if distinct to author ****************/ +/************ Write name and nickname of autor of a social note **************/ /*****************************************************************************/ -static void Soc_WriteAuthorName (struct UsrData *UsrDat) +static void Soc_WriteAuthorNote (struct UsrData *UsrDat) { extern const char *Txt_View_public_profile; @@ -1090,7 +1091,7 @@ static void Soc_WriteAuthorName (struct UsrData *UsrDat) Act_FormStart (ActSeePubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_View_public_profile,"DAT_N_BOLD"); - Str_LimitLengthHTMLStr (UsrDat->FullName,17); + Str_LimitLengthHTMLStr (UsrDat->FullName,16); fprintf (Gbl.F.Out,"%s",UsrDat->FullName); Act_FormEnd (); @@ -1554,7 +1555,7 @@ static void Soc_PutHiddenFormToWriteNewPost (void) /* Write author's full name and nickname */ strcpy (FullName,Gbl.Usrs.Me.UsrDat.FullName); - Str_LimitLengthHTMLStr (FullName,17); + Str_LimitLengthHTMLStr (FullName,16); fprintf (Gbl.F.Out,"
" "%s" " @%s" @@ -1856,12 +1857,7 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom, fprintf (Gbl.F.Out,"
"); /* Write author's full name and nickname */ - Str_LimitLengthHTMLStr (UsrDat.FullName,14); - fprintf (Gbl.F.Out,"
" - "%s" - " @%s" - "
", - UsrDat.FullName,UsrDat.Nickname); + Soc_WriteAuthorComment (&UsrDat); /* Write date and time */ Soc_WriteDateTime (SocCom->DateTimeUTC); @@ -1890,6 +1886,34 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom, } } +/*****************************************************************************/ +/****** Write name and nickname of autor of a comment to a social note *******/ +/*****************************************************************************/ + +static void Soc_WriteAuthorComment (struct UsrData *UsrDat) + { + extern const char *Txt_View_public_profile; + + fprintf (Gbl.F.Out,"
"); + + /***** Show user's name inside form to go to user's public profile *****/ + Act_FormStart (ActSeePubPrf); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + Act_LinkFormSubmit (Txt_View_public_profile,"DAT_BOLD"); + Str_LimitLengthHTMLStr (UsrDat->FullName,12); + fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + Act_FormEnd (); + + /***** Show user's nickname inside form to go to user's public profile *****/ + Act_FormStart (ActSeePubPrf); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + Act_LinkFormSubmit (Txt_View_public_profile,"DAT_LIGHT"); + fprintf (Gbl.F.Out," @%s",UsrDat->Nickname); + Act_FormEnd (); + + fprintf (Gbl.F.Out,"
"); + } + /*****************************************************************************/ /********************** Form to remove social comment ************************/ /*****************************************************************************/