Jump to content

Recommended Posts

Posted

I'm using the new comments system and I'm trying to figure out how to display votes.
Looking into the module I found the options but it seems it's not working

<?php echo $page->comments->render(array(
   'headline' => '<h4 class="small-title">Comments</h4>',
   'commentHeader' => '<a href="/profile/{cite}/">{cite}</a> <span class="timeago text-muted" title="{created}">{created}</span>',
   'dateFormat' => 'c',
   'encoding' => 'UTF-8',
   'admin' => false,
   'useVotes' => 1, 
   'upvoteFormat' => '↑{cnt}',
   'downvoteFormat' => '↓{cnt}', 
   ));  ?>

In comment field options votes are enabled also and both css and js are included...any idea?

  • 1 month later...
Posted

I was just trying to change the arrow thing and the code seems to work fine for me...

    $out .= $page->comments->renderAll(array(
        'headline' => '',
        'upvoteFormat' => '{cnt}',
        'encoding' => 'UTF-8',
        'admin' => false, // shows unapproved comments if true
    ));

Basically the same as yours, so I'm note sure why it's not working for you. Are you using a one of the later PW dev versions? Initially I made the silly mistake of trying to use this on an master branch!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...