Jump to content

Selector for this specific $pages->get


Harmster
 Share

Recommended Posts

Hey,

I am trying to make a selector to check something on my website (A social site)

So i want to check if there's a friend relation between 2 users. but here's the thing:

I've got a user template that has the following fields (and some more):

-summoner_id (text)

-summoner_name (text)

And i've got a match template having a repeater field called fellow_players this fellow players has a summoner_id field aswell so:

-summoner_id (text)

Now i've got a friend template with a few fields including 

-user1 (page to user template)

-user2 (page to user template)

Now what i want is to check if there's a friend template with user1->summoner_id OR user2->summoner_id == fellow_player->summoner_id

Is this doable with a selector or do i need to use more php?

Link to comment
Share on other sites

Hi, Harmster. Your explanation is a bit vague in terms of what you want to achieve on a conceptual level.

Where do you want to place your code?

What is the relation between fellow player and user1/user2?

Are fellow players users? What about summoner?)

These questions, while may seem a bit excessive, will exclude double-meaning and help others get your idea more easily. (and you will get help quicker :-X)

Link to comment
Share on other sites

The purpose for this is basicly to check if a user that is logged in is friended with one of the fellow players listed in match->fellow_players

A fellow player summoner_id might not exist in the user templates at all. 

A friend is saved in the friend template user_1 and user_2 being either the logged in user or the friended user.

I hope this clearified anything... Its hard to explain

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...