Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 5 Years, 3 Months, 2 Weeks ago How to check if the users current avatar is located at a specific URL?
#1
Solved: 5 Years, 3 Months, 2 Weeks ago
Is there a way of checking if a Users current avatar is located at a specific URL?
Reply
#2
Solved: 5 Years, 3 Months, 2 Weeks ago
Yeah, it's possible and quite simple really.. Their's two ways to do this, which I'll explain below.

First Method:
Users & Groups -> Users -> Find Users -> Type in the username and go to their profile. Then after you're on their profile, go over to the avatar tab and look for "or Specify Avatar URL"

Second Method:
Right click on their avatar, and click "Copy Image Address" and then paste it somewhere.
Reply
#3
Solved: 5 Years, 3 Months, 2 Weeks ago
(2014-12-17, 04:14 AM)PrivateDonut Wrote: Yeah, it's possible and quite simple really.. Their's two ways to do this, which I'll explain below.

First Method:
Users & Groups -> Users -> Find Users -> Type in the username and go to their profile. Then after you're on their profile, go over to the avatar tab and look for "or Specify Avatar URL"

Second Method:
Right click on their avatar, and click "Copy Image Address" and then paste it somewhere.

I didn't explain myself properly.

I was meaning how to check using an IF statement using PHP.

So, if a Users current avatar URL == "http://www.example.com", then, do "X".

I just don't know the required PHP syntax to achieve this.
Reply
#4
Solved: 5 Years, 3 Months, 2 Weeks ago
(2014-12-17, 04:34 AM)Greg Winston Wrote:
(2014-12-17, 04:14 AM)PrivateDonut Wrote: Yeah, it's possible and quite simple really.. Their's two ways to do this, which I'll explain below.

First Method:
Users & Groups -> Users -> Find Users -> Type in the username and go to their profile. Then after you're on their profile, go over to the avatar tab and look for "or Specify Avatar URL"

Second Method:
Right click on their avatar, and click "Copy Image Address" and then paste it somewhere.

I didn't explain myself properly.

I was meaning how to check using an IF statement using PHP.

So, if a Users current avatar URL == "http://www.example.com", then, do "X".

I just don't know the required PHP syntax to achieve this.

Ah I see, I misunderstood the question in general. I'll let someone else answer your question, as I'm not sure how to do it.

Are you looking to just stop users from uploading certain format images? Or just certain sites in general?
Reply
#5
Solved: 5 Years, 3 Months, 2 Weeks ago
You could do this:
global $mybb;
 if(strpos($mybb->user['avatar'], 'http://www.example.com') !== false)
            {
                echo "YiIiHhHaAa"; // O.o
            }
Reply
#6
Solved: 5 Years, 3 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
https://gist.github.com/Zalvie/b6dbb656da65b80135ef

"oh hey lets make the devs happy by putting in more hooks"

<.<, ofc.

Also I still don't get why they don't actually parse the url before fetching it thus can fix the little "I'm going to add ?dateline cuz that totally works if there's already a query"
Beep Boop          
                                          ~ RIP Server 2014-2014
Reply
#7
Solved: 5 Years, 3 Months, 2 Weeks ago
example
SELECT username,avatar FROM `mybb_users` WHERE avatar like '%gravatar%'
お殴りしてもよろしいですか?
[Image: eff4Bcf.gif]
Reply
#8
Solved: 5 Years, 3 Months, 2 Weeks ago
(2014-12-17, 11:11 AM)SvePu Wrote: You could do this:

global $mybb;
 if(strpos($mybb->user['avatar'], 'http://www.example.com') !== false)
            {
                echo "YiIiHhHaAa"; // O.o
            }

Thanks, that works well.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)