How to retrieve Trophy Title using Trophy ID

Rayman

Member
Hi,

I had a look through the MySQL Tables and I can't seem to find any way of finding the Trophy Title using the Trophy ID.

I would appreciate any help on how I can retrieve the Trophy Title using the Trophy ID via MySQL or any other way.
 
Trophy titles are phrase with names trophy_#_title where # is the ID.
 
How would I go by searching the phrases for that particular phrase by just using the ID?

Code:
        $trophyID = '11';
        $trophyTitle = new XenForo_Phrase('trophy_'.$trophyID.'');//Phrase object
        $trophyTitle = $trophyTitle->render(); //Phrase text
 
I managed to find a default function that already does this:
Code:
$this->getTrophyMasterTitlePhraseValue($trophyId);

However it throws the error "Call to undefined method" because of the "$this->" bit.

Does anyone know what I have to do to get $this-> to work? It is my first add-on, so my apologies, this is all new to me :)

Many thanks in-advance!!
 
Last edited:
Back
Top Bottom