The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    Friend / Foe List

    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Friend / Foe List

    Post by TamDonCo 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
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Friend / Foe List

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

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

    Huh
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

    Post by TamDonCo 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 ..
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Friend / Foe List

    Post by Ch@lo Valdez 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
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

    Post by TamDonCo 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
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Friend / Foe List

    Post by Ch@lo Valdez 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
        });
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

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

    Thanks, looks like on the right track

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


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Friend / Foe List

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




    Friend / Foe List Slgray10

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


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

    Post by TamDonCo 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
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

    Post by TamDonCo 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 ?
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Friend / Foe List

    Post by Ch@lo Valdez 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
    });
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Friend / Foe List

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

    Thank You, Ch@lo Valdez

    I got both now
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Friend / Foe List

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

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



    Friend / Foe List Slgray10

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

      Current date/time is November 11th 2024, 6:43 pm