%META:TOPICINFO{author="TWikiContributor" date="1514787124" format="1.1" version="4"}% ---+ %MAKETEXT{"Change Profile Picture of [_1]" args="%URLPARAM{ "wikiname" default=" " }%" }% %CALCULATE{$SET(PatternSkinVersion, $VALUE($SUBSTITUTE(%INCLUDE{ "%SYSTEMWEB%.PatternSkin" pattern=".*Skin Version: *. *([0-9\-]+).*" }%, -,)))$IF($GET(PatternSkinVersion)<20140522, , )}%
%MAKETEXT{"Current picture"}%:
%CALCULATE{$SET(current-image, %FORMFIELD{ "Image" topic="%URLPARAM{wikiname}%" encode="safe" }%)}%
%MAKETEXT{"Upload new picture"}%:
%IF{ "defined 'wikiname'" then="  [[%URLPARAM{wikiname}%][%MAKETEXT{"Cancel"}%]]" }%
%T% %MAKETEXT{"Recommended step before upload: Crop the image to about square size, and resize it to a width of 200 pixels. This makes it load faster."}%
%MAKETEXT{"Select existing picture"}%:
%CALCULATE{$LISTJOIN(  , $LISTMAP(
, $LISTIF($NOT($EXACT($item,undef)), %SEARCH{ "%URLPARAM{wikiname}%" scope="topic" topic="%URLPARAM{wikiname}%" nonoise="1" limit="1" format="$query(attachments[name~'*.jpg'].name), $query(attachments[name~'*.JPG'].name), $query(attachments[name~'*.png'].name), $query(attachments[name~'*.PNG'].name), $query(attachments[name~'*.gif'].name), $query(attachments[name~'*.GIF'].name)" }%)))}%
%IF{ "defined 'wikiname'" then="__%MAKETEXT{"Return to"}%:__ [[%URLPARAM{wikiname}%]]" }%