AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] API] Problem with avatar link

14 Posts
2 Users
6 Reactions
2,329 Views
Posts: 7
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@allezpaillade)
Active Member
Joined: 5 years ago
[#15317]

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
13 Replies
Alvina
Posts: 1857
Moderator
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@alvina)
Member
Joined: 7 years 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.


Posts: 7
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@allezpaillade)
Active Member
Joined: 5 years 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
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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.


(@allezpaillade)
Joined: 5 years ago

Active Member
Posts: 7
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@alvina

Hi !

 

Ok thanks. Could you give me your hook pls ?

 

Best regards

Mathieu


Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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.


Posts: 7
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@allezpaillade)
Active Member
Joined: 5 years ago

Hi 

 

ok thanks you


7 Replies
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@allezpaillade,

Below is provided a promised hook:

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

(@allezpaillade)
Joined: 5 years ago

Active Member
Posts: 7
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@alvina great new and Nice support. Thanks 

mathieu


Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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.


(@allezpaillade)
Joined: 5 years ago

Active Member
Posts: 7
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

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
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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;
});
 

(@allezpaillade)
Joined: 5 years ago

Active Member
Posts: 7
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hello, 

Your hook work correctly now !

 

Thanks


Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
Alvina
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@allezpaillade,

Thank you for letting us know.

Glad to hear it worked.


Share: