I have an additional table "Players" with ID and Playername.
I want to show the name of a player above every thread that fits to this player.
In VB i solve it like this:
1. showthreads.php takes data from my thread.
2. With the playerid x i fetch the row like
select playername from table players where players.id = threads.playerid
3. I show the name with a new variable in template showthreads.
We dont talk about details or real names, just about this known, made and easy way with VB.
With XF i have now clue how to do it and so i ask for the big picture not for the programing itself, please.
We need a hook?
We need a listener connected to this hook? Means we have a function that sends data to the running script just at this point where the hook is?
We need a class that takes the playerid and fetch my row from table players? It is called when the hook is reached and passes my playername to the listener and with this to an array of data we can use in a template?
So we add players.playername to array threads for example?
We need to pass something like threads.playername in the right template?