How do I display the number of posts a member has in Index.template?

Started by Biology Forums, April 22, 2014, 02:04:09 PM

Previous topic - Next topic

Biology Forums

I'm trying

echo $context['user']['posts'];

But it's not working.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Biology Forums

Quote from: Krash. on April 22, 2014, 02:20:02 PM


$message['member']['posts']



Make sure $message is globalized.



Didn't work, I even globalized Global $message;

Deaks

cant remember exactly where but I remember doing this a few years ago I needed to modify Load.php but this was when 1.0 was the main version so unsure if that is still needed
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Sir Osis of Liver

Hmm, don't know why that doesn't work. 

This does -



$user_info['posts']



Globalize $user_info.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

margarett

You need to globalize $user_info and echo $user_info['posts']

Works the same for 1.1 and 2.0 ;)

edit: ninja'd :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sir Osis of Liver

Why doesn't $message['member']['posts'] work?  Is the query not made until display template loads?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


Advertisement: