SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")="", "", REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")) AS `desc`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-18", DATEDIFF(`media`.`mediaCreated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-18", DATEDIFF(`media`.`mediaUpdated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-18", DATEDIFF(`userLastUpdate`, "2019-08-18"), DATEDIFF("2019-08-18", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-18", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-18"), DATEDIFF("2019-08-18", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=7 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-18", "2018-08-18") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-17", "2019-08-18")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 50;
SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")="", "", REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")) AS `desc`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-18", DATEDIFF(`media`.`mediaCreated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-18", DATEDIFF(`media`.`mediaUpdated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-18", DATEDIFF(`userLastUpdate`, "2019-08-18"), DATEDIFF("2019-08-18", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-18", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-18"), DATEDIFF("2019-08-18", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=7 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-18", "2018-08-18") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-17", "2019-08-18")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 50;
SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")="", "", REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " ")) AS `desc`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-18", DATEDIFF(`media`.`mediaCreated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-18", DATEDIFF(`media`.`mediaUpdated`, "2019-08-18"), DATEDIFF("2019-08-18", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-18", DATEDIFF(`userLastUpdate`, "2019-08-18"), DATEDIFF("2019-08-18", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-26" AND "2019-11-10", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-18", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-18"), DATEDIFF("2019-08-18", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=7 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-18" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-18", IF(`media`.`mediaDate`>"2019-08-18", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-18", "2018-08-18") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-17", "2019-08-18")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 50;
Creative Network / Media / Videos / Videos / TrestleTheatre / 1 to 18 of 18 https://www.creativehertfordshire.com/media/videos/?user=5744&view=rss Trestle Half Masks: Promotional Film Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/trestle-arts-base/ Trestle has created eight brand new half masks following the success of their existing full mask sets. As one of the leading Mask Theatre Companies in the world, Trestles new half masks and accompanying workshops are ... Snow Queen Trailer Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/snowqueen/ Adapted From Hans Christian Andersen’s Magical Tale This unique adaptation brings together an old European story, with Indian mythology and exotic locations – resulting in a performance rich in colour, music and unfor... Working with Trestle Masks: Skills and Ideas Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/workingwithtrestlemasks/ With Trestle Associate Director Oliver Jones Trestle Masks are an exciting addition to any classroom or workshop environment, this short video will introduce you to some of the key ways into working with our three dif... Trestle: A New Focus Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/trestleanewfocus/ Trestle Artistic Director Emily Gray introduces a new focus and website for the Company. Trestle is a mask and physical theatre company based in St Albans, at Trestle Arts Base. Participatory and performance work for ... Introducing Trestle Masks: Emily Gray Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/introducingtrestlemasksemilygray/ An introduction to the versatility and magic of Trestle Masks by Artistic Director Emily Gray. How Trestle Masks Are Made Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/howtrestlemasksaremade/ See how Trestle Masks are made by following the journey of one hand crafted Mask making it's way out into the world. A short film made by www.videofeet.com The Man with the Luggage - Promotional Trailer Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/themanwiththeluggagepromotionaltrailer/ Toured 21 September - 10 December 2011 'Highly theatrical in the presentation the collaborators have also pulled off the tough trick of making it poignant, slightly scary but also funny' - The Stage A man strives t... The Man with the Luggage Animated Promo Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/themanwiththeluggageanimatedpromo/ A man strives to return home, in search of his past, hopeful of his future, and longing for those he left behind. As his journey unfolds, he finds his path repeatedly blocked and his identity endlessly questioned. His lu... Little India Promotional Film 2007 Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/littleindiapromotionalfilm2007/ Toured the UK between 27 September - 10 November 2007 Watching the exhilarating fight sequences that occur when father and son meet, I was left breathless' - Watford Observer Little India told a tale of love, loss,... The Birthday of the Infanta - Promotional Film 2 Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/thebirthdayoftheinfantapromotionalfilm2/ Toured the UK from 2 March - 8 May 2011 Adults and young people alike are invited by the Infanta, the Spanish princess, to her twelfth birthday party. This is the only day of the year she is allowed to play with other... The Birthday of the Infanta: Interview (3) Director Emily Gray Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/thebirthdayoftheinfantainterviewdirectoremilygray/ Toured the UK from 2 March - 8 May 2011 The Birthday of The Infanta, is a funny and mesmerizing journey, exploring themes of love and social hierarchies, revealing the hilarious and often heartbreaking underbelly of s... The Birthday of the Infanta: Interview (2) Director Emily Gray Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/thebirthdayoftheinfantainterview2directoremilygray/ Toured the UK from 2 March - 8 May 2011 The Birthday of The Infanta, is a funny and mesmerizing journey, exploring themes of love and social hierarchies, revealing the hilarious and often heartbreaking underbelly of s... The Birthday Of The Infanta: Interview (1) Director Emily Gray Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/thebirthdayoftheinfantainterview1directoremilygray/ Toured the UK from 2 March - 8 May 2011 The Birthday of The Infanta, is a funny and mesmerizing journey, exploring themes of love and social hierarchies, revealing the hilarious and often heartbreaking underbelly of ... The Birthday of the Infanta - Promotional Film 1 Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/thebirthdayoftheinfantapromotionalfilm1/ Toured the UK from 2 March - 8 May 2011 Adults and young people alike are invited by the Infanta, the Spanish princess, to her twelfth birthday party. This is the only day of the year she is allowed to play with other... Burn My Heart - Promotional Film Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/burnmyheartpromotionalfilm/ Set during the Mau Mau uprising in 1950’s Kenya and the ensuing bloody State of Emergency, two boys’ lives are changed forever as their friendship and loyalty are blown apart by fear and betrayal. Drawing on African mus... Moon Fool; ill met by moonlight Promotional Film Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/moon-foolillmetbymoonlightpromotionalfilm/ "their reconfiguring of Shakespeare plays like jazz variations, beautifully orchestrated" - The Observer Living forever's not easy nowadays - if you're a fairy. The forests are diminishing and humans are so distractin... The Big Give Christmas Challenge Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/doubledonations-big-give-christmas-challenge/ The Big Give Christmas Challenge: Save the Date and Donate! We would like to offer a huge thank you to all those that supported us in raising pledges for The Big Give Christmas Challenge. Every gift we receive onli... Trestle Arts Base | Meet the Building Mon, 30 Nov -001 00:00:00 +0000 https://creativehertfordshire.com/trestletheatre/trestle-arts-base-meet-the-building/ One of the UK’s Top 50 Party Venues, as voted by The Independent Trestle Arts Base is a 100-year-old chapel, beautifully converted into a unique performing arts centre. Situated in the tranquil setting of Highfield Pa...