#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
API] Problem with a...
 
Share:
Notifications
Clear all

[Solved] API] Problem with avatar link  

    Last Post
RSS

Allezpaillade
Posts: 7
 Allezpaillade
Topic starter
December 2, 2020 11:49 am
(@allezpaillade)
Active Member
Joined: 1 month ago

Hello,

I am using a wordpress plugin which collect the site member's profile picture link with api. Wpforo displays avatar links in the following form: "//: www.xxxxxx.com/upload / ....."

This link is not recognized and created a display error in my other plugin which prevents its functioning.

Can I modify a line of code to be able to display the urls in the following form ? https: //www.xxxx.com/upload / ....

Thank you in advance for your help.

best regards Mathieu

Topic Tags
avatars hook
13 Replies
Alvina
Posts: 1883
Alvina - Facebook Alvina - Twitter
 Alvina
Moderator
December 2, 2020 2:18 pm
(@alvina)
Member
Joined: 1 year ago

Hi @allezpaillade,

This is designed and works in this way for the following reason.
If the URL in the following format "//:sayt.com.img.jpg" the browser puts the http:// and https:// depend on your site protocol. This means that it will work for the http: // and https: // protocols as well.

I am using a wordpress plugin which collect the site member's profile picture link with api. Wpforo displays avatar links in the following form: "//: www.xxxxxx.com/upload / ....."

This link is not recognized and created a display error in my other plugin which prevents its functioning.

Regarding the plugin(plugin you use for profile pictures) that does not recognize the above-mentioned format, wpForo has a hook for this purpose. In case, if you have developers we can provide a hook that allows your developers to make it work.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade
Posts: 7
 Allezpaillade
Topic starter
December 2, 2020 2:59 pm
(@allezpaillade)
Active Member
Joined: 1 month ago

Hello thanks for your help . 
i have’nt any developers for that.

my site is only in https and it will remain so in the future. how can i modify this in hard or via function.php file ?

 

thanks for your help

best regards

mathieu

3 Replies
Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 3, 2020 9:57 am
Reply toAllezpailladeAllezpaillade

@allezpaillade, 

As far as the issue does not have any relation to the wpForo, it comes from the plugin you use for profile pictures. Thus I'm sorry but we can't provide any solution for you. We only may suggest you contact that plugin support and let them know about the issue.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade
 Allezpaillade
(@allezpaillade)
Joined: 1 month ago

Active Member
Posts: 7
December 6, 2020 3:32 pm
Reply toAlvinaAlvina
Allezpaillade

@alvina

Hi !

 

Ok thanks. Could you give me your hook pls ?

 

Best regards

Mathieu

Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 7, 2020 11:02 am
Reply toAllezpailladeAllezpaillade
Alvina
Allezpaillade

@allezpaillade,

Could you give me your hook pls ?

The hook will be available in the next version update, and we will be able to provide it you.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade
Posts: 7
 Allezpaillade
Topic starter
December 10, 2020 7:57 am
(@allezpaillade)
Active Member
Joined: 1 month ago

Hi 

 

ok thanks you

BlackRaz and Alvina liked
7 Replies
Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 11, 2020 12:14 pm
Reply toAllezpailladeAllezpaillade

@allezpaillade,

Below is provided a promised hook:

$avatar_url = apply_filters('wpforo_avatar_url', $avatar_url, $userid);

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade liked
Allezpaillade
 Allezpaillade
(@allezpaillade)
Joined: 1 month ago

Active Member
Posts: 7
December 11, 2020 11:11 pm
Reply toAlvinaAlvina
Allezpaillade

@alvina great new and Nice support. Thanks 

mathieu

Alvina liked
Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 12, 2020 9:58 am
Reply toAllezpailladeAllezpaillade
Alvina
Allezpaillade

@allezpaillade,

We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade
 Allezpaillade
(@allezpaillade)
Joined: 1 month ago

Active Member
Posts: 7
December 22, 2020 6:17 am
Reply toAlvinaAlvina
Allezpaillade
Alvina
Allezpaillade

Hi, 

i have already rating add 😉

 

chatroll support can’t use correctly your hook.. doesn’t Work.

pls follow their reply

Please contact WpForo to ask for exact instructions (i.e. a specific PHP code example) to retrieve the avatar image URL.

Any solution for that ? Your hook gives link with

//www.website.com/

But i want

https://www.website.com

 

Thanks for your support

best regards

math

Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 22, 2020 11:12 am
Reply toAllezpailladeAllezpaillade
Alvina
Allezpaillade
Alvina
Allezpaillade

@allezpaillade,

Please use the following hook to make it work:
 
add_filter('wpforo_avatar_url', function ($avatar_url){
if( strpos($avatar_url, 'http') !== 0 ) $avatar_url = 'https:' . $avatar_url;
return $avatar_url;
});
 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Allezpaillade liked
Allezpaillade
 Allezpaillade
(@allezpaillade)
Joined: 1 month ago

Active Member
Posts: 7
December 26, 2020 4:32 pm
Reply toAlvinaAlvina
Allezpaillade
Alvina
Allezpaillade
Allezpaillade

Hello, 

Your hook work correctly now !

 

Thanks

Alvina liked
Alvina
 Alvina
Moderator
(@alvina)
Joined: 1 year ago

Member
Posts: 1883
Alvina - Facebook Alvina - Twitter
December 28, 2020 11:26 am
Reply toAllezpailladeAllezpaillade
Alvina
Allezpaillade
Alvina
Allezpaillade

@allezpaillade,

Thank you for letting us know.

Glad to hear it worked.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • Profile Images not updating
    1 month ago
  • Which Files Contain Log In & Register Modal Code
    7 months ago
  • Is there a way to block links to competitor sites?
    8 months ago
  • Add the number of categories to the statistics in the footer
    9 months ago
  • All Profile Pictures on Forums are of the Owner (Me)
    2 years ago
Topic Tags:  avatars (3), hook (5),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages  wpforo-advanced-attachments-128x128  wpforo-embeds-128x128 wpForo User Custom Fields addon  wpForo – Blog Cross Posting addon  wpForo Ads Manager
View all Addons »

Recent Topics

  • Help please

    By Creationweb, 3 hours ago

  • Settings for attachements cannot be saved

    By Jheronimus, 3 hours ago

  • Reply button problem

    By xfok, 4 hours ago

  • Advanced search including date fields as the default home page

    By Arik, 8 hours ago

  • Adding members, recent posts and my profile to the forum menu

    By Xaleah, 19 hours ago

  • How to change class of link in button??

    By civilenggnotes, 19 hours ago

Topic Tags

  • new features43
  • seo39
  • translation36
  • plugin conflict35
  • forum32
  • buddypress31
  • login31
  • threaded layout30
  • registration29
  • ultimate member28
  • moderation27
  • editor25
  • avatar24
  • shortcode23
  • css23
  • tags21
  • migration20
  • url20
  • menu20
  • colors19
View all tags (1465)

Recent Posts

  • RE: PHP error, need help

    You should check to make sure all folders have 755 perm...

    By Percysgrowroom, 23 mins ago

  • RE: slow queries

    This is the official post about caching: I'm not f...

    By dimalifragis, 1 hour ago

  • RE: Why wpForo using two Font Awesome files?

    @adisaputro, I'm sorry but it's not possible, they a...

    By Robert, 2 hours ago

  • RE: Help please

    @Martin Thank you for your prompt response, I attach ne...

    By Creationweb, 2 hours ago

  • RE: Settings for attachements cannot be saved

    Thank you so much, that worked! Sorry, newbie here!

    By Jheronimus, 3 hours ago

  • RE: Reply button problem

    Hi @xfok, Could you please show me on a screenshot wh...

    By Martin, 3 hours ago

  • RE: Advanced File Attachments

    @bujkilla, You should use the forum icon in "Forum Ic...

    By Sofy, 5 hours ago

Share:
  Forum Statistics
20 Forums
7,752 Topics
38.9 K Posts
5 Online
14.8 K Members

Latest Post: PHP error, need help Our newest member: marquis2502 Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2021 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Documentation