Пример #1
0
/**
 * Return a themed set of links.
 *
 * @param $links
 *   A keyed array of links to be themed.
 * @param $attributes
 *   A keyed array of attributes
 * @return
 *   A string containing an unordered list of links.
 */
function art_links_woker($links, $attributes = array('class' => 'links'))
{
    $output = '';
    if (count($links) > 0) {
        $output = '';
        $num_links = count($links);
        $index = 0;
        foreach ($links as $key => $link) {
            $class = $key;
            if (strpos($class, "read_more") !== FALSE) {
                break;
            }
            // Automatically add a class to each link and also to each LI
            if (isset($link['attributes']) && isset($link['attributes']['class'])) {
                $link['attributes']['class'] .= ' ' . $key;
            } else {
                $link['attributes']['class'] = $key;
            }
            if ($index > 0) {
                $output .= '  | ';
            }
            // Add first and last classes to the list of links to help out themers.
            $extra_class = '';
            if ($index == 1) {
                $extra_class .= 'first ';
            }
            if ($index == $num_links) {
                $extra_class .= 'last ';
            }
            if ($class) {
                if (strpos($class, "comment") !== FALSE) {
                    ob_start();
                    ?>
<img class="metadata-icon" src="<?php 
                    echo get_full_path_to_theme();
                    ?>
/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon"/> <?php 
                    $output .= ob_get_clean();
                } else {
                    ob_start();
                    ?>
<img class="metadata-icon" src="<?php 
                    echo get_full_path_to_theme();
                    ?>
/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon"/> <?php 
                    $output .= ob_get_clean();
                }
            }
            $index++;
            $output .= get_html_link_output($link);
        }
    }
    return $output;
}
Пример #2
0
function art_links_woker($links, $attributes = array('class' => 'links'))
{
    $output = '';
    if (!empty($links)) {
        $output = '';
        $num_links = count($links);
        $index = 0;
        foreach ($links as $key => $link) {
            $class = $key;
            if (strpos($class, "read_more") !== FALSE) {
                continue;
            }
            if (isset($link['attributes']) && isset($link['attributes']['class'])) {
                $link['attributes']['class'] .= ' ' . $key;
            } else {
                $link['attributes']['class'] = $key;
            }
            $extra_class = '';
            if ($index == 1) {
                $extra_class .= 'first ';
            }
            if ($index == $num_links) {
                $extra_class .= 'last ';
            }
            $link_output = get_html_link_output($link);
            if (!empty($class)) {
                if (strpos($key, "comment") !== FALSE) {
                    if ($index > 0 && !empty($link_output) && !empty($output)) {
                        $output .= '&nbsp;|&nbsp;';
                    }
                    ob_start();
                    ?>
        <span class="free-templates-lt-postcommentsicon"><?php 
                    $output .= ob_get_clean();
                    $output .= $link_output;
                    $index++;
                    ob_start();
                    ?>
        </span><?php 
                    $output .= ob_get_clean();
                    continue;
                }
                if ($index > 0 && !empty($link_output) && !empty($output)) {
                    $output .= '&nbsp|&nbsp';
                }
                ob_start();
                ?>
        <span class="free-templates-lt-postcategoryicon"><?php 
                $output .= ob_get_clean();
                $output .= $link_output;
                $index++;
                ob_start();
                ?>
        </span><?php 
                $output .= ob_get_clean();
            } else {
                $output .= '&nbsp;|&nbsp;' . $link_output;
                $index++;
            }
        }
    }
    return $output;
}
Пример #3
0
/**
 * Return a themed set of links.
 *
 * @param $links
 *   A keyed array of links to be themed.
 * @param $attributes
 *   A keyed array of attributes
 * @return
 *   A string containing an unordered list of links.
 */
function art_links_woker($links, $attributes = array('class' => 'links'))
{
    $output = '';
    if (!empty($links)) {
        $output = '';
        $num_links = count($links);
        $index = 0;
        foreach ($links as $key => $link) {
            $class = $key;
            if (strpos($class, "read_more") !== FALSE) {
                continue;
            }
            // Automatically add a class to each link and also to each LI
            if (isset($link['attributes']) && isset($link['attributes']['class'])) {
                $link['attributes']['class'] .= ' ' . $key;
            } else {
                $link['attributes']['class'] = $key;
            }
            // Add first and last classes to the list of links to help out themers.
            $extra_class = '';
            if ($index == 1) {
                $extra_class .= 'first ';
            }
            if ($index == $num_links) {
                $extra_class .= 'last ';
            }
            if (!empty($class)) {
                if (strpos($class, "comment") !== FALSE) {
                    if ($index > 0) {
                        $output .= '&nbsp;|&nbsp;';
                    }
                    ob_start();
                    ?>
         <?php 
                    $output .= ob_get_clean();
                    $output .= get_html_link_output($link);
                    $index++;
                    continue;
                }
                if (strpos($class, "comment") === FALSE) {
                    if ($index > 0) {
                        $output .= '&nbsp|&nbsp';
                    }
                    ob_start();
                    ?>
         <?php 
                    $output .= ob_get_clean();
                    $output .= get_html_link_output($link);
                    $index++;
                }
            }
        }
    }
    return $output;
}
Пример #4
0
if ($submitted) {
    ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php 
    echo art_submitted_worker($date, $name);
    ?>

</div>
<?php 
}
?>
<div class="art-PostContent">
<div class="art-article"><?php 
echo $content;
if (isset($node->links['node_read_more'])) {
    echo '<div class="read_more">' . get_html_link_output($node->links['node_read_more']) . '</div>';
}
?>
</div>
</div>
<div class="cleared"></div>
<?php 
if (is_art_links_set($node->links) || !empty($terms)) {
    ?>
<div class="art-PostFooterIcons art-metadata-icons">
<?php 
    echo art_node_worker($node);
    ?>

</div>
<?php 
Пример #5
0
function artReadMoreLink($link)
{
    $link['attributes']['class'] .= ' art-button';
    return '<div class="read_more"><p>' . get_html_link_output($link) . '</p></div><div class="cleared"></div>';
}