News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Wee bit of coding help

Started by jaccione, August 01, 2006, 09:14:56 AM

Previous topic - Next topic

jaccione

I was using an old theme on rc1 and have upgraded to rc2 now, with shiny new theme.

My old theme had a display showing   #### Posts in #### topics by ### members - Latest member  - abcd

at the top.

i think i have found the slab of coding for it and what i want to do is put it in my seciton under the
you have # messages, # are new
total time logged in.....etc


i think this is the bit of code i need

echo '
               <div class="infobarbg" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
               <div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
                  <img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
                  <div style="height: 35px; padding: 5px;" class="smalltext">
                     <b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
                     ', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
                  </div>
               </div>';


and i think i need to put it under this bit in new theme


// Show the total time logged in?
      if (!empty($context['user']['total_time_logged_in']))
      {
         echo '
                     <br />', $txt['totalTimeLogged1'];

         // If days is just zero, don't bother to show it.
         if ($context['user']['total_time_logged_in']['days'] > 0)
            echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

         // Same with hours - only show it if it's above zero.
         if ($context['user']['total_time_logged_in']['hours'] > 0)
            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

         // But, let's always show minutes - Time wasted here: 0 minutes ;).
         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
      }
      echo '<br />
                     <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
                     <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
                     ', $context['current_time'];
   }




but every time i put it in (in a 1000 variations i have tried) i get parse errros

any help would be greatly apprecaited

thanks
jacs
www.math.net.au for all your math homework needs

Advertisement: