The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Friend / Foe List

View previous topic View next topic Go down

Solved Friend / Foe List

Post by TamDonCo on September 9th 2016, 5:50 pm

Is it possible we use script to get Friend / Foe List ??


Last edited by TamDonCo on September 10th 2016, 2:18 pm; edited 1 time in total

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by Ch@lo Valdez on September 9th 2016, 5:56 pm

please explain better
add friends? or display a friend list in specific place you want?

Huh

Ch@lo Valdez
Forumember

Male Posts : 33
Reputation : 12
Language : spanish

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 9th 2016, 6:00 pm

@Ch@lo Valdez wrote:please explain better
add friends? or display a friend list in specific place you want?

Huh

get a list of friends / foes under current login user ..

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by Ch@lo Valdez on September 9th 2016, 6:07 pm

is possible but where we will place the list?

users logged -- check
always visible?
the place of this list ....

thinks your idea and give more complete specifications

Ch@lo Valdez
Forumember

Male Posts : 33
Reputation : 12
Language : spanish

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 9th 2016, 6:19 pm

@Ch@lo Valdez wrote:is possible but where we will place the list?

users logged -- check
always visible?
the place of this list ....

thinks your idea and give more complete specifications

I do not want to place any where, just get the list and I do something with my code

for testing just use console.log

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by Ch@lo Valdez on September 9th 2016, 7:23 pm

for test in the console:
Code:

var id = '1' //<--- change the id
$.get('/u' + id + 'friends', function (e) {
       
        console.log(e); //<--- all html tree from friend page in the profile
    });

Ch@lo Valdez
Forumember

Male Posts : 33
Reputation : 12
Language : spanish

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 9th 2016, 8:03 pm

Thanks, looks like on the right track

How do I strip out the name list or ID list ?

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by SLGray on September 9th 2016, 9:50 pm



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35677
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 9th 2016, 11:51 pm

Thanks SLGray, I will take a look


@Ch@lo Valdez

That code works only for ADMIN right, normal user gets blank even his/her friends/foes

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 10th 2016, 2:33 am

@Ch@lo Valdez

just update, the code works fine

it did not work before because I disable "view profile" , only Admin right can do it


how about foe list ?

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by Ch@lo Valdez on September 10th 2016, 7:04 am

foes list :

Code:

 $.get('/profile?mode=editprofile&page_profil=friendsfoes', function(e) {
 var a = $('.panel:eq(4)', e).html(); console.log(a) //  foes list
});

Ch@lo Valdez
Forumember

Male Posts : 33
Reputation : 12
Language : spanish

Back to top Go down

Solved Re: Friend / Foe List

Post by TamDonCo on September 10th 2016, 2:18 pm

Thank You, Ch@lo Valdez

I got both now

TamDonCo
Forumember

Posts : 172
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Friend / Foe List

Post by SLGray on September 10th 2016, 10:31 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35677
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum