R Rayman Member Oct 7, 2014 #1 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.
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.
Mike XenForo developer Staff member Oct 7, 2014 #2 Trophy titles are phrase with names trophy_#_title where # is the ID.
R Rayman Member Oct 8, 2014 #3 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
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
R Rayman Member Oct 12, 2014 #4 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: Oct 13, 2014
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!!
R Rayman Member Oct 13, 2014 #5 Resolved. Replaced "$this->" with: Code: XenForo_Model::create('XenForo_Model_Trophy')->