Esempio n. 1
0
function tab_tag($tab_name, $active_link, $active_tab, $url, $tab_class, $commCount = 0, $forum_link = false)
{
    $tab_title = __($tab_name . '_tab_help');
    $tab_text = __(ucfirst($tab_name));
    if ($commCount) {
        $tab_text = '<span class="reduced">' . $commCount . '</span>' . '<span>' . $tab_text . ' (' . $commCount . ')' . '</span>';
    } else {
        $tab_text = '<span>' . $tab_text . '</span>';
    }
    if ($forum_link) {
        if ($active_link) {
            use_helper('Forum');
            $link = f_link_to($tab_text, $url, array('class' => $tab_class, 'title' => $tab_title));
        } else {
            $link = '<div class="' . $tab_class . '" title="' . $tab_title . '">' . $tab_text . '</div>';
        }
    } else {
        $options_array = array('class' => $tab_class, 'title' => $tab_title);
        if (!$active_link) {
            $options_array['tag'] = 'div';
        }
        $link = link_to_if($active_link, $tab_text, $url, $options_array);
    }
    return '<li' . setActiveIf($tab_name, $active_tab) . '>' . $link . '</li>';
}
Esempio n. 2
0
function button_report()
{
    use_helper('Forum');
    $mod_user_id = sfContext::getInstance()->getUser()->getCulture() == 'it' ? sfConfig::get('app_moderator_it_user_id') : sfConfig::get('app_moderator_user_id');
    return f_link_to(__('Report problem'), 'misc.php?email=' . $mod_user_id . '&doc=' . urlencode($_SERVER['REQUEST_URI']), array('title' => __('Report problem'), 'class' => 'action_report nav_edit'));
}
Esempio n. 3
0
    }
}
echo end_section_tag();
echo start_section_tag('Description', 'description');
include_partial('documents/i18n_section', array('document' => $document, 'languages' => $sf_data->getRaw('languages'), 'needs_translation' => $needs_translation, 'images' => $associated_images, 'filter_image_type' => false));
echo end_section_tag();
include_partial($mobile_version ? 'documents/mobile_map_section' : 'documents/map_section', array('document' => $document));
if ($is_not_archive && $is_not_merged) {
    echo start_section_tag('User outings', 'outings');
    include_partial('outings/linked_outings', array('id' => $id, 'module' => 'users', 'items' => $associated_outings, 'nb_outings' => $nb_outings, 'nb_outings_limit' => $nb_outings_limit, 'empty_list_tips' => 'This user does not have any associated outing.'));
    echo end_section_tag();
    echo start_section_tag('User contributions', 'contributions');
    ?>
    <ul class="contribs">
        <li><span class="picto action_comment"></span> <?php 
    echo f_link_to(__('User-s messages'), 'search.php?action=search&author_id=' . $id) . ' - ' . f_link_to(__('topics'), 'search.php?action=show_user_topics&user_id=' . $id);
    ?>
</li>
        <li><span class="picto picto_images"></span> <?php 
    echo link_to(__('Images uploaded by this user'), "images/list?users={$id}") . ' - ' . link_to(__('collaborative images'), "images/list?ityp=1&users={$id}") . ' - ' . link_to(__('personal images'), "images/list?ityp=2&users={$id}");
    ?>
</li>
        <li><span class="picto picto_articles"></span> <?php 
    echo link_to(__('Personal articles'), "articles/list?users={$id}");
    ?>
</li>
        <li><span class="picto action_description"></span> <?php 
    echo __('Guidebook contribs:');
    echo '<ul>';
    $module_list = array('routes', 'summits', 'sites', 'huts', 'parkings', 'products', 'books', 'areas', 'articles', 'images');
    foreach ($module_list as $module) {
Esempio n. 4
0
    }
    ?>
    <p class="pagelink conr"><?php 
    echo __('Number of comments: ') . $nb_comments;
    ?>
</p>
<?php 
    if ($sf_user->getId() > 1) {
        ?>
    <p class="subscribelink clearb"><?php 
        echo f_link_to(__('Subscribe to this document comments'), 'misc.php?subscribe=' . $topic_id);
        ?>
</p>
    <p class="subscribelink clearb"><?php 
        echo f_link_to(__('Unsubscribe to this document comments'), 'misc.php?unsubscribe=' . $topic_id);
        ?>
</p>
<?php 
    }
    ?>
    <div class="clearer"></div>
  </div>
</div>

<?php 
} else {
    echo f_link_to(__('add a comment'), 'post.php?fid=1&subject=' . $id . '_' . $lang, array('class' => 'add_content', 'rel' => 'nofollow'));
    echo '<br /><br /><br /><br /><br />';
}
echo end_content_tag();
include_partial('common/content_bottom');
Esempio n. 5
0
    </div>
    <div class="menu_entry">
      <div class="menu_item middle">
        <span class="select_button"><?php 
echo __('See');
?>
</span>
        <?php 
echo select_tag('menu_select', options_for_select($menu_see), array('class' => 'menu_select', 'id' => 'menu_select2'));
?>
      </div>
    </div>
    <div class="menu_entry">
      <div class="menu_item middle">
        <?php 
echo f_link_to('<span class="select_button">' . __('Forums') . '</span>', '?lang=' . $lang);
?>
      </div>
    </div>
    <div class="menu_entry">
      <div class="menu_item right">
        <span class="select_button"><?php 
echo __('More...');
?>
</span>
        <?php 
echo select_tag('menu_select', options_for_select($menu_more), array('class' => 'menu_select', 'id' => 'menu_select3'));
?>
      </div>
    </div>
  </div>
            ?>
                <li class="odd">
            <?php 
        } else {
            ?>
                <li class="even">
            <?php 
        }
        $list_item++;
        $num_replies = $item['num_replies'];
        $lang = $forum_langs[$item['forum_id']];
        echo f_link_to($item['subject'], 'viewtopic.php?id=' . $item['id'] . '&action=new', array('hreflang' => $lang));
        if ($num_replies > 0) {
            ?>
                <span class="meta"><?php 
            echo f_link_to("({$num_replies})", 'viewtopic.php?id=' . $item['id'] . '&action=last');
            ?>
</span>
            <?php 
        }
        ?>
            </li>
    <?php 
    }
    ?>
    </ul>
</div>
<?php 
    $cookie_position = array_search('last_mountain_news', sfConfig::get('app_personalization_cookie_fold_positions'));
    echo javascript_tag('C2C.setSectionStatus(\'last_mountain_news\', ' . $cookie_position . ', ' . (!$default_open ? 'false' : 'true') . ");");
    ?>
Esempio n. 7
0
echo picto_tag('picto_tools') . customize_link_to();
?>
</li>
                    <?php 
if ($is_connected) {
    ?>
                    <li><?php 
    echo picto_tag('picto_tools') . personal_preferences_link_to();
    ?>
</li>
                    <li><?php 
    echo picto_tag('picto_tools') . language_preferences_link_to();
    ?>
</li>
                    <li><?php 
    echo picto_tag('action_edit') . f_link_to(__('User profile'), 'profile.php?section=personality');
    ?>
</li>
                    <li><?php 
    echo picto_tag('action_contact') . link_to(__('Mailing lists link'), 'users/mailinglists');
    ?>
</li>
                <?php 
} else {
    ?>
                    <li><?php 
    echo picto_tag('action_edit') . link_to(__('create an account?'), getMetaArticleRoute('create_account'));
    ?>
</li>
                    <?php 
}
            ?>
</span>
            <?php 
        }
        ?>
            </li>
    <?php 
    }
    ?>
    </ul>
<?php 
}
?>
<div class="home_link_list">
<?php 
$connected = $sf_user->isConnected();
echo f_link_to(__('Forum'), $custom_title_link) . ' - ';
if ($connected) {
    echo f_link_to(__('New posts'), 'search.php?action=show_new&lang=' . $culture);
} else {
    echo f_link_to(__('Recent posts'), 'search.php?action=show_24h&lang=' . $culture);
}
?>
</div>
</div>
<?php 
$cookie_position = array_search('last_msgs', sfConfig::get('app_personalization_cookie_fold_positions'));
echo javascript_tag('C2C.setSectionStatus(\'last_msgs\', ' . $cookie_position . ', ' . (!$default_open ? 'false' : 'true') . ");");
?>
</div>
Esempio n. 9
0
}
?>

<div id="header">
  <div id="banner_middle">
    <div id="log">
        <div id="mobile_home">
        <?php 
echo link_to('<span>&nbsp;</span>', '@homepage', array('title' => 'Camptocamp.org'));
?>
        </div>
      <div class="log_elt">
      <?php 
echo select_interface_language(), ' ';
if ($sf_user->isConnected() && PunbbMsg::GetUnreadMsg($sf_user->getId())) {
    echo f_link_to(picto_tag('action_contact', __('mailbox')), 'message_list.php');
}
?>
      </div>
        <div class="log_elt" id="user_mngt">
        <?php 
if ($sf_user->isConnected()) {
    ?>
          <strong><?php 
    echo link_to($sf_user->getUsername(), '@document_by_id?module=users&id=' . $sf_user->getId(), array('id' => 'name_to_use', 'data-user-id' => $sf_user->getId(), 'class' => 'logged_as', 'title' => __('Your are connected as ')));
    ?>
</strong>
          <?php 
    echo link_to(picto_tag('action_cancel', __('Logout')), '@logout');
} else {
    echo login_link_to();
Esempio n. 10
0
function generate_path()
{
    $sf_context = sfContext::getInstance();
    $module = $sf_context->getModuleName();
    $action = $sf_context->getActionName();
    $forum = (bool) strstr($sf_context->getRequest()->getUri(), 'forums');
    if ($action == 'home') {
        return '';
    }
    $path = __('Context:') . ' ' . link_to(__('Home'), '@homepage');
    if ($forum) {
        use_helper('Forum');
        $path .= ' &gt; ' . f_link_to(__('Forum'), '?lang=' . $sf_context->getUser()->getCulture());
    } elseif ($module != 'documents') {
        $path .= ' &gt; ' . link_to(ucfirst(__($module)), "@default_index?module={$module}");
    }
    return '<nav ' . ($forum ? '' : 'itemprop="breadcrumb" ') . 'id="path">' . $path . '</nav>';
}
Esempio n. 11
0
    <div id="menu">
      <ul>
        <li class="active"><?php 
    echo link_to(__('ecomobility'), '@cdasearch');
    ?>
</li>
        <li><a href="http://www.mountainwilderness.fr/component/content/article/3031" target="_blank"><?php 
    echo __('contest');
    ?>
</a></li>
        <li><?php 
    echo link_to(__('picturial'), '@default?module=images&action=list&owtp=yes&orderby=oid&order=desc', array('target' => '_blank'));
    ?>
</li>
        <li><?php 
    echo f_link_to(__('questions?'), 'viewforum.php?id=42', array('target' => '_blank'));
    ?>
</li>
        <li><a href="/map?zoom=7&lat=44.5&lon=3.3&layerNodes=public_transportations&bgLayer=gmap_physical" target="_blank"><?php 
    echo __('map (cda)');
    ?>
</a></li>
      </ul>
    </div>
    <?php 
}
?>
  </header>
  <div id="container">
      <?php 
echo $sf_data->getRaw('sf_content');
Esempio n. 12
0
<?php

echo '(' . f_link_to($UnreadMsg, 'message_list.php') . ')';
if ($UnreadMsg && !c2cTools::mobileVersion()) {
    use_helper('JavascriptQueue');
    echo javascript_queue("\$.ajax({ url: '" . minify_get_combined_files_url('/static/js/tinycon.min.js') . "', dataType: 'script', cache: true })\n      .done(function() { Tinycon.setBubble({$UnreadMsg}); });");
}
Esempio n. 13
0
    }
    ?>
<div id="nav_news" class="nav_box">
    <div class="nav_box_top"></div>
    <div class="nav_box_content">
        <?php 
    echo nav_title('news', __('c2corg news'), 'list');
    ?>
        <div class="nav_box_text" id="nav_news_section_container">
            <ul>
            <?php 
    foreach ($items as $item) {
        $lang = $forum_langs[$item['forum_id']];
        ?>
                 <li><?php 
        echo f_link_to($item['subject'], 'viewtopic.php?id=' . $item['id'] . '&action=new', array('hreflang' => $lang));
        ?>
</li>
            <?php 
    }
    ?>
            </ul>
        </div>
        <?php 
    $cookie_position = array_search('nav_news', sfConfig::get('app_personalization_cookie_fold_positions'));
    echo javascript_tag('C2C.setSectionStatus(\'nav_news\', ' . $cookie_position . ', ' . (!$default_open ? 'false' : 'true') . ");");
    ?>
    </div>
    <div class="nav_box_down"></div>
</div>