public static function url()
 {
     $args = func_get_args();
     $userName = array_shift($args);
     $media = array_shift($args);
     $settings = array_shift($args);
     $url = '/export/' . $userName . '/' . base64_encode($settings) . '/image.png';
     return UrlHelper::absoluteUrl($url);
 }
 /**
  * This method constructs the URL that is going to be used in layouts,
  * views, etc.
  */
 public static function url()
 {
     $args = func_get_args();
     $userName = array_shift($args);
     $media = array_shift($args);
     $urlParts = static::getUrlParts();
     $bestPart = array_shift($urlParts);
     while (empty($bestPart) and !empty($urlParts)) {
         $bestPart = array_shift($urlParts);
     }
     $url = '/' . $userName;
     $url .= '/' . $bestPart;
     if (!empty(static::getMediaAvailability())) {
         $url .= ',' . Media::toString($media);
     }
     return UrlHelper::absoluteUrl($url);
 }
        printf('* [%s / %s](#%s)' . PHP_EOL, ucfirst(Media::toString($media)), $groupData->{'wiki-title'}, md5($media . $groupData->{'wiki-title'}));
    }
    printf(PHP_EOL);
}
printf(PHP_EOL);
foreach (Media::getConstList() as $media) {
    printf('## %s achievements' . PHP_EOL, ucfirst(Media::toString($media)));
    foreach ($achList[$media] as $groupData) {
        printf('<div id="%s"></div>' . PHP_EOL, md5($media . $groupData->{'wiki-title'}));
        printf('### %s / %s  ' . PHP_EOL, ucfirst(Media::toString($media)), $groupData->{'wiki-title'});
        if (isset($groupData->{'wiki-desc'})) {
            printf($groupData->{'wiki-desc'});
        }
        printf(PHP_EOL);
        printf(PHP_EOL);
        printf('<table>');
        foreach ($groupData->achievements as $achievement) {
            printf('<tr><td>');
            if (isset($achievement->path)) {
                $url = '/media/img/ach/' . $achievement->path;
                printf('![%s](%s)' . PHP_EOL, $achievement->id, UrlHelper::absoluteUrl($url));
            }
            printf('</td><td>');
            printf('**%s**  ' . PHP_EOL, $achievement->title);
            printf('%s' . PHP_EOL, $achievement->desc);
            printf('</td></tr>' . PHP_EOL);
        }
        printf('</table>' . '&nbsp;' . PHP_EOL);
    }
    printf(PHP_EOL);
}