WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Author Avatars List] template tag? (14 posts)

  1. bolagskartan
    Member
    Posted 4 years ago #

    Thanks for a great plugin.

    Is there a way I can insert this in my template tags?

  2. Ben
    Member
    Posted 4 years ago #

    Yes, please have a look at section "Avatar lists without shortcode or widget" on the Developers Guide...

  3. bolagskartan
    Member
    Posted 4 years ago #

    Thanks for your fast reply. However, it does not seem to work? Look at the footer in this?

    http://bolagskartan.com/att-kopa-eller-salja-foretag/

  4. bolagskartan
    Member
    Posted 4 years ago #

    This is the error message:

    Warning: Wrong parameter count for array_slice() in /home/g/gaosse/gaosse/bolagskartan.com/www/wp-content/plugins/author-avatars/lib/UserList.class.php on line 250
    No users found.

  5. bolagskartan
    Member
    Posted 4 years ago #

    By removing: $userlist->limit = 10;

    It now works!

  6. Paul Bearne
    Member
    Posted 4 years ago #

    I guess we will need to check that out

    Thanks for the report

  7. Ben
    Member
    Posted 4 years ago #

    bolagskartan: Thanks for the error message! Are you using an older php version (that is < 5.0.2)? The php function array_slice() which I was using in that function was changed in version 5.0.2 which would explain why you get the error...

    I have fixed the problem in [199070]; you can download the current development trunk if you'd like to test it out.

  8. bolagskartan
    Member
    Posted 4 years ago #

    Thanks! Impressive work!

    I am not quite sure what php version I use =). I have it running and I love it =)

  9. bolagskartan
    Member
    Posted 4 years ago #

    One more question, if I want to align the Avatars horizontal, from the above template code... How do I do that? The avatars is shown in the footer on this link: http:/bolagskartan.com/

    And thanks again for this plugin.

  10. Ben
    Member
    Posted 4 years ago #

    The widget styles are not applied correctly on your website...

    Easiest way to fix it is probably to copy the styles from the widget.css file, adjust them and paste them into your theme's style.css. In your case you have to remove .multiwidget_author_avatars from all style selectors.

  11. bolagskartan
    Member
    Posted 4 years ago #

    Thanks for your reply,

    I am not exactly sure what you mean. I have copied the content of widget.css into my style.css.

    I have named a div (in my footer) to <div class="author-list"> and then paste the recommended content from Developers guide. And then closed with a </div>.

    What else do I need to do?

  12. Ben
    Member
    Posted 4 years ago #

    widget.css expects your author list to be inside a container with the class multiwidget_author_avatars.

    You need to either change the styles (css) and remove .multiwidget_author_avatars from each line, or set the class of that the div to "multiwidget_author_avatars".

  13. corporatefinance
    Member
    Posted 4 years ago #

    EDIT: I solved it myself. This is the correct code:

    $userlist->link_to_authorpage = false;
    $userlist->user_link = bp_memberpage;

    Thanks for a great plugin!

    I have a similar questions on this subject. I am trying to link the Avatar to the bp_memberpage. No matter how I change the following piece of code below, it does not change where it links. I want it to link to the: bp_memberpage, how do I do that, starting with the code below...

    $userlist->link_to_authorpage = true;

    What shall the code above look like? Do I need to add additional lines?

    Like this? $userlist->link_to_bp_memberpage = true; ??

    If that is the correct code I supplied above... I do not think it works =(.

  14. Ben
    Member
    Posted 4 years ago #

    Oh, yes... "link_to_authorpage" is deprecated (i.e. you can delete that line completely); instead one should use user_link... I need to update the documentation for that.

Topic Closed

This topic has been closed to new replies.

About this Topic