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(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,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("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=9 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-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-19", DATEDIFF(`media`.`mediaCreated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-19", DATEDIFF(`media`.`mediaUpdated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-19", DATEDIFF(`userLastUpdate`, "2019-08-19"), DATEDIFF("2019-08-19", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-19", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-19"), DATEDIFF("2019-08-19", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `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(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=9 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`.`mediaApproved`=1 AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=9 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=7055 AND `mediatypes`.`mtID`=2 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-19", "2018-08-19") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-18", "2019-08-19")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
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(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,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("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=9 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-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-19", DATEDIFF(`media`.`mediaCreated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-19", DATEDIFF(`media`.`mediaUpdated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-19", DATEDIFF(`userLastUpdate`, "2019-08-19"), DATEDIFF("2019-08-19", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-19", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-19"), DATEDIFF("2019-08-19", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `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(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=9 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`.`mediaApproved`=1 AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=9 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=7055 AND `mediatypes`.`mtID`=2 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-19", "2018-08-19") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-18", "2019-08-19")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
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(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,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("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=9 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-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-08-19", DATEDIFF(`media`.`mediaCreated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-08-19", DATEDIFF(`media`.`mediaUpdated`, "2019-08-19"), DATEDIFF("2019-08-19", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-08-19", DATEDIFF(`userLastUpdate`, "2019-08-19"), DATEDIFF("2019-08-19", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-05-27" AND "2019-11-11", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-08-19", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-08-19"), DATEDIFF("2019-08-19", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `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(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(53.644394))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-1.784605))+SIN(RADIANS(53.644394))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=9 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`.`mediaApproved`=1 AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=9 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=7055 AND `mediatypes`.`mtID`=2 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-08-19" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-08-19", IF(`media`.`mediaDate`>"2019-08-19", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-08-19", "2018-08-19") AND IF(`mediatypes`.`mtFuture`=1, "2020-08-18", "2019-08-19")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
News from Creative Kirklees / News / Creative Kirklees / 1 to 15 of 80

News

The latest arts and creative news from members of the Creative Kirklees directory.

News posted on the site is regularly featured in the newsletter and our social media, which reach thousands of local individuals and businesses.

To share your news, register and log into MyAccount.

News / Creative Kirklees / 1 to 15 of 80

Show All / Today / Aug / Jul / Jun / May / Apr / Mar / Feb / Jan / Dec / Nov / Oct / Sep / Archive

Locala Community Fund 2019 – Opening 1st September

Thu 15 Aug 2019

Locala Community Fund 2019 – Opening 1st September

The next round of applications for the Locala Community Fund 2019 will open on 1st September 2019. Community, third sector and voluntary groups based in Kirklees, Calderdale or Bradford can apply for up to £1500 in f.....Read more

Have your Say on Arts Council England 10 year strategy

Thu 01 Aug 2019

Have your Say on Arts Council England 10 year strategy

Arts Council England plan to publish their next 10-year strategy - this will shape how they deliver their development, advocacy and investment approach for the next decade from April 2020. They have developed a draft.....Read more

The Huddersfield Masterplan Shop

Tue 30 Jul 2019

The Huddersfield Masterplan Shop

There is now a shop on the Piazza where you can go in and see the full plan for the Huddersfield Blueprint and talk to others to find out more information. One of the biggest transformation plans for Huddersfield tow.....Read more

ESSENTIAL GUIDANCE - Bouncy castles & inflatables

Mon 29 Jul 2019

ESSENTIAL GUIDANCE - Bouncy castles & inflatables

School’s out and summer is here so that means there are lots of outdoor events, local galas and even private parties where bouncy castles or other inflatable play equipment are available. Whilst they are seen as gre.....Read more

Decline in local authority culture spend slows

Mon 15 Jul 2019

Decline in local authority culture spend slows

Cuts to local authorities’ culture budgets are slowing, with a 1% drop across England reported to the Government this year. Figures for 2019/20 show councils and other authorities are allocating a total of £38.7bn for .....Read more

Marsden Jazz Festival needs your help & support

Tue 09 Jul 2019

Marsden Jazz Festival needs your help & support

Award-winning Marsden Jazz Festival has launched a funding campaign and needs to raise £10,000 by 21 July to secure the festival for this October. The 28th Marsden Jazz Festival will take place from Friday 11th - Sund.....Read more

'Landscape Through Language' - Tom Ratcliffe

Fri 05 Jul 2019

'Landscape Through Language' - Tom Ratcliffe

You are invited to join Creative Arts Hub for the launch of Tom Ratcliffe’s latest exhibition, this Friday from 6pm (5 July). “My work is influenced by the theoretical writings of the philosopher Michel Foucault and c.....Read more

Digital Enterprise Phase 2

Thu 04 Jul 2019

Digital Enterprise Phase 2

In September, phase two of the Digital Enterprise programme (DE 2.0) will launch, offering an enhanced programme of support for SMEs in the Leeds City Region that are keen to develop their digital capabilities. The progr.....Read more

Can you help our young people?

Mon 01 Jul 2019

Can you help our young people?

Can you help young Producers bring their ideas to life? Pledge today: crowdfunder.co.uk/paper-peace A team of 48 young producers aged 18 to 25 around the country have been working for a year on training and heritage p.....Read more

The Art of Pricing - Last chance to have your say

Fri 28 Jun 2019

The Art of Pricing - Last chance to have your say

More and more arts organisations are having to tread the tightrope between prices that build audiences and prices that build revenues. Set prices too high and you’re in danger of limiting access, but set them too low and.....Read more

Arts Council England - Shaping the next ten years

Fri 28 Jun 2019

Arts Council England - Shaping the next ten years

Arts Council England have published a draft strategy 2020-30, setting out a proposed vision and outcomes for the next ten years. An online consultation on the draft strategy 2020-2030 will open from 1 July to 23 Septe.....Read more

Leeds to be home of the UK's first Centre of Cultural Value

Fri 28 Jun 2019

Leeds to be home of the UK's first Centre of Cultural Value

The new Centre for Cultural value, funded by the Arts and Humanities Research Council, Paul Hamlyn Foundation and Arts Council England, will be based at the University of Leeds. The centre will focus on the role of arts .....Read more

Have Your Say on the Future of UK Fashion

Thu 20 Jun 2019

Have Your Say on the Future of UK Fashion

Do you work in Fashion Textiles and Technology? If you're interested in playing a role in shaping the future sustainable development of the industry, take this consultation survey and help to inform research and developm.....Read more

Have your say... The art of pricing

Mon 03 Jun 2019

Have your say... The art of pricing

More and more arts organisations are having to tread the tightrope between prices that build audiences and prices that build revenues. Set prices too high and you’re in danger of limiting access. But set them too low .....Read more

Banner Campaign in Huddersfield 2019

Tue 28 May 2019

Banner Campaign in Huddersfield 2019

Have you seen our new banners which have gone up around Huddersfield Town Centre? They are in place around Huddersfield to showcase many arts and cultural organisations and events going on in Kirklees. The current fla.....Read more

1 / 2 / 3 / 4 / 5 / 6 /