Forums

[resolved] [Plugin: User Community] Link comment_author_link to user profile page (21 posts)

  1. tfbpa
    Member
    Posted 3 years ago #

    Hi Jordi,

    I really love that the <?php the_author_posts_link(); ?> is linking to the user profile page of your plugin and I want to do the same for <?php comment_author_link() ?>, but I have no idea how to do that...

    Normally the comment either links to the commenter's website, if they have specified one, or has no link at all, but I think it would be great if their name would link to their user profile page of your plugin.

    Unfortunately I have no programming skills whatsoever, so I would like to ask if you can help me out.

    I think I have to make adjustments in ../wp-includes/comment-template.php, as there is the function get_comment_author_link() specified, but I do not know what to change so it will link to the profile page of your plugin.

    I know this really has nothing to do with your plugin per se, but I am still hoping you can help me out. :D

    http://wordpress.org/extend/plugins/alkivia/

  2. Txanny
    Member
    Posted 3 years ago #

    That's a nice idea! It can be done by using the get_comment_author_link filter. This filter is used in get_comment_author_link to replace the link. Let me check and see how can we do that in the easiest way and tell you how to do it without hacking your theme.

    Some checks have to be done in comments, as the commenter could not be a registered user and could not exists on the system.

    Also, have to consider what to do if the user has entered a website address. Replace by the profile page or maintain the address the user has entered?

    Most problably I will include it on next plugin release!

  3. tfbpa
    Member
    Posted 3 years ago #

    Ah, the proper way, even better! :D

    For me the user's website can be replaced by the profile page, I would rather have that they spend more time on my website than to leave and see somebody else's.

    But if you will include it in the plugin it would probably be best to have an option to choose from, because other people might want to link to the users website.

    Thanks again for your help, very much appreciated!

  4. Txanny
    Member
    Posted 3 years ago #

    Relase 0.6 is really near with some new features, and a lot of code cleaning and redesign. The links for comments will be included on it.

    As you, I think the best is to try to have the user the most time on our own site ;)

  5. tfbpa
    Member
    Posted 3 years ago #

    Thank you very much, it is also exciting to see what features you will include in future releases, I check http://alkivia.org/tracker/roadmap_page.php frequently!

  6. Txanny
    Member
    Posted 3 years ago #

    As you can see in the roadmap page, just now I've finished, and committed to the development version most of changes. This has been released as 0.6-beta. Now, I will re-test and double check all functions and release it as 0.6 (stable) by this weekend.

    If you want to test it, you can download the 0.6-beta version and test it. But it's a beta version, not fully tested.

  7. tfbpa
    Member
    Posted 3 years ago #

    Great Jordi, am trying it out now!

    I only tested for a few minutes so far and most works great, but I did find one bug.

    It seems that the comment links is not handled correctly for users with spaces.

    For example it gives http://www.mcthailand.com/?page_id=607&user=jack-c-zar instead of the correct http://www.mcthailand.com/?page_id=607&user=jack+c-zar

    That user name is "jack c-zar", so it seems that the comment links interpret spaces as - instead of +.

    But other than that it works great and I am very happy with fast implementation! :D

  8. tfbpa
    Member
    Posted 3 years ago #

    Can you also tell me where I can change the settings for picture moderation?

    At the moment it is on, meaning that every picture has to be approved by the admin, but I would like it to show immediately, so without moderation.

    Thanks again,
    Paul

  9. Txanny
    Member
    Posted 3 years ago #

    I think both bugs are solved in the development version for download.

    Thanks for reporting the bug. It's because I linked the user_nicename instead the user_login. WordPress automatically replaces spaces by dashes when creating the nicename and a urlencoded name will replace it with the plus sign. This bug is also on the post author's link.

    About the Pictures moderation, this is controlled by Capabilities. By default, the plugin sets the capability to upload unmoderated pictures to all existing roles when updating. But, yesterday, testing on one site, I've found a bug on there and the capability was mispelled when checking. So, all uses have the pictures moderated. This is corrected in the development version for download.

    If you plan to have a role with moderated pictures, I recommend to download my Capability Manager plugin: http://wordpress.org/extend/plugins/capsman/ and remove the akuc_unmoderated capability to thos roles you want to moderate ;) This plugin will be also ported as a component for Community in a next release (I think not in this).

  10. tfbpa
    Member
    Posted 3 years ago #

    OK, great, development version indeed fixes it all!

    If I have new feature requests, where do you prefer I place them, here or at your website? For the moment I will put it in this thread.

    What I would also like is an integration of the avatars in WordPress and BBpress.

    So that whatever is uploaded and selected through your plugin as avatar at the WordPress part, is also displayed in BBpress.

    Thanks again,
    Paul

  11. tfbpa
    Member
    Posted 3 years ago #

    Oh, and it would also be great if the post_author_title_link() from BBpress would link to the profile page of your plugin, as I don't see any reason to display the user profile of bbpress while everybody already filled it in in the wordpress part!

    Sorry for all the feature requests, I just really like your plugin and want it to handle a lot! :D

  12. Txanny
    Member
    Posted 3 years ago #

    Nice! I like it, as I'm also using bbPress ;) Will write a bbPress plugin to handle this. I think you have tested the plugin to replace bbPress avatars by Community Gallery avatars. Have you ?

  13. tfbpa
    Member
    Posted 3 years ago #

    That would be great, as usual! :D

    I did not try that before, because I have bbpress 1.0-alpha-6, but to be sure I just tried it and unfortunately that did not work, but that is because I use a different version of bbpress.

    Do you know which version of bbpress will be supported in the future plugin?

  14. Txanny
    Member
    Posted 3 years ago #

    I wrote that plugin for my own use, and works great ;) Now bbPress 1.0 is in RC state. I think it's the moment to start writting plugins for 1.0 and forget 0.9 as soon as 1.0 goes stable.

    At the moment, I did not to much work as most plugins for 0.9 do not work in 1.0, and it's difficult to develop for a version that changes continuosly.

    I just downloaded RC-1 and will start testing it and looking to what has changed to test and move the current plugin and to start writting for it.

  15. Txanny
    Member
    Posted 3 years ago #

    I tested the avatars plugin for bbPress on bbPress 1.0-rc1 and it works as expected.

    Just there is a problem with bbPress 1.0 that it's not in 0.9: The plugin file have to be located exactly at my-plugins folder. You cannot locate it on a subfolder as plugins on my-plugins subfolders do not activate correctly.

  16. tfbpa
    Member
    Posted 3 years ago #

    Hi Jordi,

    thanks for testing, but unfortunately I cannot get it to work...

    I have met all requirements and below are my settings, but it is not showing the user uploaded avatars on the bbpress side of my website.

    I have also tried it on a test website with bbpress RC1, but that also did not show the avatars on the bbpress side.

    Maybe one of my settings are wrong or could it be that it is because I am using WPMU 2.7.1 or do I have to make some changes in the template or...

    Do you have any idea Jordi?

    Thanks,
    Paul

    Alkivia settings

    WordPress avatar settings

    BBpress avatar settings

  17. Txanny
    Member
    Posted 3 years ago #

    Really it's WPMU. I didn't test with it and the WPMU database options are saved in a different structure than WP.

    When using with the bbPress plugin, it reads the WP database, and expects the WP database format. Having options and user metadata saved in a different way makes the plugin not working.

    I have to introduce some changes and checking to see if it's working with WP or WPMU to make it work with WPMU.

  18. tfbpa
    Member
    Posted 3 years ago #

    OK, thanks Jordi.

    Sorry that I didn't say earlier that I used WPMU, but sofar every single plugin that I have used which is written for WP also works for WPMU, so I sorta forgot/did not know about the difference...

  19. tfbpa
    Member
    Posted 3 years ago #

    Hi again Jordi,

    have one question regarding the bbpress avatar in WPMU.

    After some snooping around I found that when I copy the data from WPMU's database table "wp_1_options" and paste that into a new table "wp_options" (and of course changing every reference to reflect the same), it shows the user uploaded avatars on the bbpress side! :D:D

    With that I am very happy and I am also happy to copy that specific table every day so at least the avatars show on the bbpress side, but I was thinking that it might be easy to change the reference somewhere in your plugin so that it looks specifically in table "wp_1_options" instead of table "wp_options" for user metadata 'akucom_gallery'. Below is (I think) the relevant part in file bb_avatar.php.

    /**
    	 * User Gallery data.
    	 * From the user metadata 'akucom_gallery'
    	 * If not gallery is found, it's set to false.
    	 *
    	 * @var array|false
    	 */
    	private $gallery;

    Please let me know if there is an easy fix that I can apply myself, so you do not have to re-write a perfectly working plugin just because some guy is silly enough to use MU instead of normal WP.

    Thanks again!

  20. tfbpa
    Member
    Posted 2 years ago #

    An update to the above.

    After I copied the data from WPMU's database table "wp_1_options" and paste that into a new table "wp_options" (and of course changing every reference to reflect the same), everything works.

    But that I said before, but for some reason, I do NOT have to update the newly created table "wp_options" at all. So whenever a new user registers, uploads an avatar on the wordpress side, that avatar is also showing on the bbpress side of my WPMU site! :D:D

    Really have no idea why, but if you are running WPMU and want the Alkivia avatars to work in the bbpress side, try the above.

  21. sopvib
    Member
    Posted 2 years ago #

    I still can't get the commenters name to link to their profile page. I have updated today and therefore I have the latest version.
    I've been trying to look through the comment.php file in my theme and I know it's this line that I need to change:

    '<div class="comment-meta"><span class="fn n"><?php comment_author_link() ?></span> <?php printf(__('added these words on %1$s <span class="meta-sep">|</span> <a href="%3$s" title="Permalink to this comment">Permalink</a>', 'sandbox'),
    										get_comment_date(),
    										get_comment_time(),
    										'#comment-' . get_comment_ID() );
    										edit_comment_link(__('Edit', 'sandbox'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?></div>'

    But I don't know how.. Hope you can help! I'm only a novice at programming :)

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags