Esempio n. 1
0
<?php

if ($options[0] == '') {
    $t =& CTag::getInstance();
    $tagsArr = $t->tags($user_id, 'TAG');
    $min = $tagsArr[0]['MIN'];
    $max = $tagsArr[0]['MAX'];
    $step = ($max - $min) / 5;
    if ($variance == 0) {
        $variance = 1;
    }
    echo '<div class="bold"></div>
          <div style="padding:5px; text-align:justify;">';
    foreach ($tagsArr as $k => $v) {
        if ($v['TAG'] != '') {
            $fontSize = tagsize(intval($v['WEIGHT']), $step);
            echo '&nbsp;<a href="/users/' . $username . '/tags/' . $v['TAG'] . '/" style="line-height:30px; font-size:' . $fontSize . 'px;" title="' . $v['TAG_COUNT'] . ' items tagged with ' . $v['TAG'] . '" class="plain">' . $v['TAG'] . '</a></span>&nbsp; ';
        }
    }
    echo '</div>';
} else {
    $fb =& CFotobox::getInstance();
    $fl =& CFlix::getInstance();
    $tagsArr = (array) explode(',', $options[0]);
    $arrFotos = $fb->fotosSearch(array('USER_ID' => $user_id, 'TAGS' => $tagsArr, 'PERMISSION' => PERM_PHOTO_PUBLIC, 'ORDER' => 'P_TAKEN_BY_DAY', 'LIMIT' => 8));
    $arrFlix = $fl->search(array('USER_ID' => $user_id, 'TYPE' => 'slideshow', 'TAGS' => $tagsArr, 'PERMISSION' => PERM_SLIDESHOW_PUBLIC, 'ORDER' => 'P_TAKEN', 'LIMIT' => 3));
    //$arrFotos = $fb->fotosByTags($tagsArr, $user_id, 3, 'P_MOD_YMD', 0, 10);
    //$arrFlix  = $fl->flixByTags($tagsArr, $user_id, 3, 'user', false, 0, 4);
    echo '<div style="padding-left:10px; padding-bottom:8px;">Photos tagged with: ' . $options[0] . '<span style="font-weight:normal;">&nbsp;(<a href="/users/' . $username . '/photos/tags-' . $options[0] . '/">all photos tagged with ' . $options[0] . '</a>)</span></div>
          <div>';
    if (count($arrFotos) > 0) {
Esempio n. 2
0
<?php

include_once dirname($_SERVER['SCRIPT_FILENAME']) . '/_reporter.php';
chdir(dirname(__FILE__));
ob_start();
include_once str_replace('/scripts', '', dirname(__FILE__)) . '/init_constants.php';
include_once PATH_DOCROOT . '/init_database.php';
include_once PATH_CLASS . '/CUser.php';
include_once PATH_CLASS . '/CFotobox.php';
include_once PATH_CLASS . '/CTag.php';
$u = CUser::getInstance();
$fb = CFotobox::getInstance();
$t = CTag::getInstance();
$users = $u->search(array());
$GLOBALS['dbh']->execute('TRUNCATE user_tag_sibling');
foreach ($users as $user) {
    $tags = array();
    $photos = $fb->fotosSearch(array());
    foreach ($photos as $photo) {
        $pTags = (array) explode(',', $photo['P_TAGS']);
        foreach ($pTags as $pTag) {
            if ($pTag == '') {
                continue;
            }
            if (isset($tags[$pTag])) {
                $tags[$pTag] = array_unique(array_merge($tags[$pTag], $pTags));
            } else {
                $tags[$pTag] = $pTags;
            }
        }
    }
Esempio n. 3
0
               {
                 if(document.getElementById("tagwords").value.length > 0)
                 {
                   location.href="/users/' . $username . '/fotos/tags-"+document.getElementById("tagwords").value + "/";
                 }
                 return false;
               }
               
               new Autocompleter.Local("tagwords", "auto_complete_tagwords", userTags, {tokens: ","});
             </script>
           </div>
           <div style="padding-top:5px; padding-bottom:5px;">
             <div style="padding-left:10px;"><a href="/users/' . $username . '/tags/">' . $displayName . '\'s tags</a></div>
           </div>
         </div>';
 $objTags =& CTag::getInstance();
 $arr_tags = $objTags->quickSets($user_id, 0);
 foreach ($arr_tags as $v) {
     $arr_children = $objTags->quickSets($user_id, $v['S_ID']);
     $has_children = count($arr_children) == 0 ? false : true;
     $arrow_html = $has_children === false ? '<img src="images/spacer.gif" width="15" height="15" border="0" />' : '<a href="javascript:_toggle_nav(' . $v['L_ID'] . '); _toggle_arrow(\'_arrow_' . $v['L_ID'] . '\');" title="click to show/hide sub labels"><img src="images/navigation/sub_arrow_closed.gif" width="15" height="15" id="_arrow_' . $v['L_ID'] . '" border="0" /></a>';
     echo '<div class="quickSetParentRow">
            <div>';
     if ($has_children === false) {
         echo '<div style="float:left; padding-left:2px; padding-right:3px;"><img src="images/spacer.gif" width="15" height="15" border="0" /></div>';
     } else {
         echo '<div style="float:left; padding-left:2px; padding-right:3px;"><a href="javascript:_toggle(\'quickSetChild_' . $v['S_ID'] . '\'); _toggle_arrow(\'_arrow_' . $v['S_ID'] . '\');"><img src="images/navigation/sub_arrow_close.gif" id="_arrow_' . $v['S_ID'] . '" width="15" height="15" border="0" /></a></div>';
     }
     if ($v['S_TAGS'] != '') {
         echo '<div style="float:left;"><a href="/users/' . $username . '/fotos/tags-' . $v['S_TAGS'] . '/" class="f_9 f_black bold" style="text-decoration:none;">' . $v['S_NAME'] . '</a></div>';
     } else {