← WordPress

K2 - Adicionar plugin nos post (votação, email...)

Lida 5097 vezes

Offline

[A]visaPT 
Membro
Mensagens 256 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Bem eu antes não usava o K2 e agora para adicionar aquilo de poder enviar a notíçia por email, imprimi-la votar e assim não da porque no index.php já não tem os mesmo ficheiros...
Eu queria adicionar estes campos mas agora no K2 não sei onde é...
Código: [Seleccione]
<?php if&#40;function_exists&#40;'the_ratings'&#41;&#41; &#123; the_ratings&#40;&#41;; &#125; ?>
<?php if&#40;function_exists&#40;'wp_print'&#41;&#41; &#123; print_link_image&#40;&#41;; &#125;&#123; print_link&#40;&#41;; &#125; ?>
<?php if&#40;function_exists&#40;'wp_email'&#41;&#41; &#123; email_link_image&#40;&#41;; &#125;&#123; email_link&#40;&#41;; &#125; ?>
<?php if&#40;function_exists&#40;'the_views'&#41;&#41; &#123; the_views&#40;&#41;; &#125; ?>


Alguem sabe qual é o ficheiro onde se tem agora de adicionar isso...
O indes só tem isso agora...
Código: [Seleccione]
<?php get_header&#40;&#41;; ?>

<div class="content">

<div id="primary">
<div id="current-content">

<?php include &#40;TEMPLATEPATH . '/rollingarchive.php'&#41;; ?>

</div> <!-- #current-content -->

<div id="dynamic-content"></div>
</div> <!-- #primary -->

<?php get_sidebar&#40;&#41;; ?>

</div> <!-- .content -->

        <?php if &#40;!is_paged&#40;&#41; && is_home&#40;&#41;&#41; &#123; ?>

         <?php include&#40;"bottomblock.php"&#41;; ?>

<?php &#125; ?>

<?php get_footer&#40;&#41;; ?>
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Se bem me lembro tem la um ficheiro chamado the_loop.php
Offline

[A]visaPT 
Membro
Mensagens 256 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Pois eu tambem tinha andado ai a ver... Mas a linha que eu procudo para la por ao lado não apareçe...
Eu queria que isso fica-se ao lado do:
 Filed under WebatHigh.  |4 Comments
podes ver em
http://www.webathigh.com/portal/index.php

O meu código do file theloop é este:
Código: [Seleccione]
<?php
// This is the loop, which fetches entries from your database.
// It is a very delicate piece of machinery. Be gentle!

// Get core WP functions when loaded dynamically
if &#40;isset&#40;$_GET['rolling'&#93;&#41;&#41; &#123;
require &#40;dirname&#40;__FILE__&#41;.'/../../../wp-blog-header.php'&#41;;
&#125;

// Get the asides category
$k2asidescategory get_option&#40;'k2asidescategory'&#41;;
?>


<?php /* Headlines for archives */ if &#40;&#40;!is_single&#40;&#41; and !is_home&#40;&#41;&#41; or is_paged&#40;&#41;&#41; &#123; ?>
<h2>
<?php // Figure out what kind of page is being shown
if &#40;is_category&#40;&#41;&#41; &#123;
if &#40;$cat != $k2asidescategory&#41; &#123;
printf&#40;__&#40;'Archive for the \'%s\' Category','k2_domain'&#41;, single_cat_title&#40;'', false&#41;&#41;;
&#125; else &#123;
echo single_cat_title&#40;&#41;;
&#125;

&#125; elseif &#40;is_day&#40;&#41;&#41; &#123;
printf&#40;__&#40;'Archive for %s','k2_domain'&#41;, get_the_time&#40;__&#40;'F jS, Y','k2_domain'&#41;&#41;&#41;;

&#125; elseif &#40;is_month&#40;&#41;&#41; &#123;
printf&#40;__&#40;'Archive for %s','k2_domain'&#41;, get_the_time&#40;__&#40;'F, Y','k2_domain'&#41;&#41;&#41;;

&#125; elseif &#40;is_year&#40;&#41;&#41; &#123;
printf&#40;__&#40;'Archive for %s','k2_domain'&#41;, get_the_time&#40;__&#40;'Y','k2_domain'&#41;&#41;&#41;;

&#125; elseif &#40;is_search&#40;&#41;&#41; &#123;
printf&#40;__&#40;'Search Results for \'%s\'','k2_domain'&#41;, $s&#41;;

&#125; elseif &#40;function_exists&#40;'is_tag'&#41; and is_tag&#40;&#41;&#41; &#123;
printf&#40;__&#40;'Tag Archive for \'%s\'','k2_domain'&#41;, get_query_var&#40;'tag'&#41; &#41;;

&#125; elseif &#40;is_author&#40;&#41;&#41; &#123;
    $post $wp_query->post$the_author $wpdb->get_var&#40;"SELECT meta_value FROM $wpdb->usermeta WHERE user_id = '$post->post_author' AND meta_key = 'nickname'"&#41;;
printf&#40;__&#40;'Author Archive for %s','k2_domain'&#41;, $the_author &#41;;

&#125; elseif &#40;is_paged&#40;&#41; and &#40;$paged > 1&#41;&#41; &#123; 
 printf&#40;__&#40;'Archive Page %s','k2_domain'&#41;, $paged &#41;;
&#125; ?>

</h2>
<?php &#125; ?>

<?php if &#40;&#40;get_option&#40;'k2rollingarchives'&#41; == 0&#41; and !is_single&#40;&#41; and !is_home&#40;&#41; and is_paged&#40;&#41;&#41; include &#40;TEMPLATEPATH . '/navigation.php'&#41;; ?>

<?php /* Check if there are posts */
if &#40; have_posts&#40;&#41; &#41; &#123;
/* It saves time to only perform the following if there are posts to show */

// Count if there are 2+ users
$count_users $wpdb->get_var&#40;"SELECT COUNT&#40;1&#41; FROM $wpdb->usermeta WHERE meta_key = '" . $table_prefix . "user_level' AND meta_value > 1 LIMIT 2"&#41;;

// If there are 2+ users, this is a multiple-user blog
$multiple_users = &#40;$count_users > 1&#41;;

// Get the user information
get_currentuserinfo&#40;&#41;;
global $user_level;

// Post index for semantic classes
$post_index 1;

// Check if to display asides inline or not
if&#40;is_archive&#40;&#41; or is_search&#40;&#41; or is_single&#40;&#41; or &#40;function_exists&#40;'is_tag'&#41; and is_tag&#40;&#41;&#41;&#41; &#123;
$k2asidescheck '0';
&#125; else &#123;
$k2asidescheck get_option&#40;'k2asidesposition'&#41;;
&#125;
?>


<?php /* Start the loop */
while &#40; have_posts&#40;&#41; &#41; &#123;
the_post&#40;&#41;;

// Post is an aside
$post_asides in_category&#40;$k2asidescategory&#41;;
?>


<?php /* Permalink nav has to be inside loop */ if &#40;is_single&#40;&#41;&#41; include &#40;TEMPLATEPATH . '/navigation.php'&#41;; ?>







<?php /* Only display asides if sidebar asides are not active */ if&#40;!$post_asides || $k2asidescheck == '0'&#41; &#123; ?>

<div id="post-<?php the_ID&#40;&#41;; ?>" class="<?php k2_post_class&#40;$post_index++, $post_asides&#41;; ?>">


<div class="entry-head">
<h3 class="entry-title"><a href="<?php the_permalink&#40;&#41; ?>" rel="bookmark" title='<?php printf&#40; __&#40;'Permanent Link to "%s"','k2_domain'&#41;, wp_specialchars&#40;get_the_title&#40;&#41;,1&#41; &#41;; ?>'><?php the_title&#40;&#41;; ?></a></h3><span class="chronodata">
<?php /* Date & Author */
printf&#40; __&#40;'%1$s %2$s','k2_domain'&#41;,
&#40; $multiple_users ? sprintf&#40;__&#40;'%s','k2_domain'&#41;, '<span class="vcard author"><a href="' . get_author_link&#40;0, $authordata->ID, $authordata->user_nicename&#41; .'" class="url fn"></a></span>'&#41; &#58; &#40;''&#41; &#41;, 
'<abbr class="published" title="'get_the_time&#40;'Y-m-d\TH&#58;i&#58;sO'&#41; . '">' .
 
&#40; function_exists&#40;'time_since'&#41; ? sprintf&#40;__&#40;'%s ago','k2_domain'&#41;, time_since&#40;abs&#40;strtotime&#40;$post->post_date_gmt . " GMT"&#41;&#41;, time&#40;&#41;&#41;&#41; &#58; get_the_time&#40;__&#40;'dMy','k2_domain'&#41;&#41; &#41; 
 
'</abbr>'
 
&#41;; 
 
?>

</span>
<?php /* Support for Noteworthy plugin */ if &#40;function_exists&#40;'nw_noteworthyLink'&#41;&#41; &#123; nw_noteworthyLink&#40;$post->ID&#41;; &#125; ?>
<?php /* Edit Link */ edit_post_link&#40;__&#40;'Edit','k2_domain'&#41;, '<span class="entry-edit">','</span>'&#41;; ?>

</div> <!-- .entry-head -->

<div class="entry-content">

     


<?php if &#40;is_archive&#40;&#41; or is_search&#40;&#41; or &#40;function_exists&#40;'is_tag'&#41; and is_tag&#40;&#41;&#41;&#41; &#123;
the_excerpt&#40;&#41;;
&#125; else &#123;
the_content&#40;__&#40;'Continue reading','k2_domain'&#41; . " '" . the_title&#40;'', '', false&#41; . "'"&#41;;
&#125; ?>


<?php link_pages&#40;'<p><strong>'.__&#40;'Pages&#58;','k2_domain'&#41;.'</strong> ', '</p>', 'number'&#41;; ?>
</div> <!-- .entry-content -->
<small class="entry-meta">
<?php /* Categories */ if &#40;!$post_asides&#41; &#123; printf&#40;__&#40;'<span class="entry-category">Filed under  %s.</span>','k2_domain'&#41;, k2_nice_category&#40;', ', __&#40;' and ','k2_domain'&#41;&#41; &#41;; &#125; ?>&nbsp;&nbsp;|<?php /* Comments */ comments_popup_link&#40;'0&nbsp;<span>'.__&#40;'Comments','k2_domain'&#41;.'</span>', '1&nbsp;<span>'.__&#40;'Comment','k2_domain'&#41;.'</span>', '%&nbsp;<span>'.__&#40;'Comments','k2_domain'&#41;.'</span>', 'commentslink', '<span class="commentslink">'.__&#40;'Closed','k2_domain'&#41;.'</span>'&#41;; ?>



<?php /* Tags */ if &#40;is_single&#40;&#41; and function_exists&#40;'UTW_ShowTagsForCurrentPost'&#41;&#41; &#123; ?>
<span class="entry-tags"><?php _e&#40;'Tags&#58;','k2_domain'&#41;; ?> <?php UTW_ShowTagsForCurrentPost&#40;"commalist"&#41; ?>.</span>
<?php &#125; ?>
</small> <!-- .entry-meta -->
</div> <!-- #post-ID -->

<?php &#125; /* End sidebar asides test */ ?>

<?php &#125; /* End The Loop */ ?>

<?php /* Insert Paged Navigation */ if &#40;!is_single&#40;&#41; and get_option&#40;'k2rollingarchives'&#41; != 1&#41; &#123; include &#40;TEMPLATEPATH.'/navigation.php'&#41;; &#125; ?>

<?php /* If there is nothing to loop */  &#125; else &#123; $notfound = '1'; ?>

<div class="hentry four04">

<div class="entry-head">
<h3 class="center"><?php _e&#40;'Not Found','k2_domain'&#41;; ?></h2>
</div>

<div class="entry-content2">
<p><?php _e&#40;'Oh no! You\'re looking for something which just isn\'t here! Fear not however, errors are to be expected, and luckily there are tools on the sidebar for you to use in your search for what you need.','k2_domain'&#41;; ?></p>
</div>

</div> <!-- .hentry .four04 -->

<?php &#125; /* End Loop Init  */ ?>
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Tenta ler o código...
:)
Offline

[A]visaPT 
Membro
Mensagens 256 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Não faço a mínima como fica depois os espaços e assim...
Ainda tou aprender...
O tutorial da instalação desses mods não é igual :cry:
Offline

[A]visaPT 
Membro
Mensagens 256 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Quem puder ajudar sff que não sei por o código corectamente.
Offline

[A]visaPT 
Membro
Mensagens 256 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Já consegui pus antes do:
Código: [Seleccione]
</small> <!-- .entry-meta -->