Users Online in header

Started by cnywrestling, February 03, 2011, 07:49:40 PM

Previous topic - Next topic

C. Davis

Quote from: Novice on October 02, 2015, 07:37:48 PM
How the h_ll do you get to know all of this? Worked Slick!
A lot of trial and error over the years. ;)

Novice

Now I'm just guessing but, If I were to find a mod say from SMFHacks that I would want to add. I would likely need to restore the original file without the code before it would pass the preliminary test before install? Right?

Novice

According to your profile...your only 18. I'm 38 years older than you. So over the years dude means you had a very brain twisting childhood. Thank God!

C. Davis

Quote from: Novice on October 02, 2015, 07:43:02 PM
Now I'm just guessing but, If I were to find a mod say from SMFHacks that I would want to add. I would likely need to restore the original file without the code before it would pass the preliminary test before install? Right?
Not necessarily. The preliminary check only looking for a couple of lines of code. If those lines in particular are modified, then yes. It is likely most mods will work with this modification.

C. Davis

Quote from: Novice on October 02, 2015, 07:45:33 PM
According to your profile...your only 18. I'm 38 years older than you. So over the years dude means you had a very brain twisting childhood. Thank God!
19 in 20 days :P

Novice

Mine is 11/28 I'll be 57. I had this forum Admin stuff thrown at me 8 years ago and had no clue what I was doing or getting into. For that matter I still don't but, I try real hard. Maybe you could suggest a reference like "PHP for Dummies" that could help me understand the terminology.

C. Davis

I've referred many of my friends to this website:
https://www.codecademy.com/

Novice


Novice

If I wanted to add a row to the bottom of the header, would this be done in the css file?

C. Davis

Quote from: Novice on October 02, 2015, 07:59:16 PM
If I wanted to add a row to the bottom of the header, would this be done in the css file?
By row do you mean a space between two groups of text?

Is this what you mean?
                                  <-- Right Here
Is this what you mean?

C. Davis

Also, I would recommend you start with the HTML course, then the CSS, then PHP.

Because a fourth of PHP is HTML.

Novice

No, see in the attachment how the users are half in the white and half in the colored border. I just wanted to move it up and thought I needed to actually move the blue part down by adding a row underneath the user text.

Thanks for the course advice too.

C. Davis

Try changing this:
//End List
echo '</ul>';

to this:
//End List
echo '</ul><br>';

Novice

#53
No Change...

This is the whole thing:

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
         echo '
               <li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
         echo '
               <li>', $context['current_time'], '</li>
            ';
//Get users online
         require_once($sourcedir . '/Subs-MembersOnline.php');
         $membersOnlineOptions = array(
               'show_hidden' => allowedTo('moderate_forum'),
               'sort' => 'log_time',
               'reverse_sort' => true,
         );
         $return = getMembersOnlineStats($membersOnlineOptions);
                        $active_message = str_replace('%1$d','15',$txt['users_active']);
         echo '<li>', $active_message, '</li>';

         echo '<li>
               ', implode(', ', $return['list_users_online']) , '</li>';
         //End List
         echo
               '</ul><br>';
         
echo '
         <style>
            div#upper_section div.user ul {
                padding-left: 0px;
                float: left;
            }
         </style>';

   }

http://castlekotct.knightsofthecointable.org/index.php

C. Davis

Could you link to your forums, because I don't see a blue bar on my install of SMF. Also, the simplemachines forums is running curve as well and I don't see a blue bar either.

Novice

It's at the bottom of the code I sent.

C. Davis

inside of the <style> tags I told you to add, put this:

#header {
    border-radius: 10px 10px 0 0;
    border: 1px solid #ADADAD;
    border-bottom: 0px;
    background: linear-gradient(to top, #FFFFFF , #B8B8FF);
}
#header div.frame {
    background: none;
}

Novice

This changed a lot. Color, the scroll bar? Did I do something wrong?

C. Davis

I don't see a scroll bar...

As for the color, it's created by CSS rather than an image as it used to be.

Novice

After I edited it, I replaced what was in the style brackets. That screwed everything up. I went back in and undone what I did, then added the new to the beginning of the script in between the style brackets. The scroll bar disappeared and the color stayed the same. I like the purple hue. It's relatively soothing for these old eyes.

Here:

echo '
         <style>
            #header {
               border-radius: 10px 10px 0 0;
               border: 1px solid #ADADAD;
               border-bottom: 0px;
               background: linear-gradient(to top, #FFFFFF , #B8B8FF);
            }
            #header div.frame {
               background: none;
            }

            div#upper_section div.user ul {
                padding-left: 0px;
                float: left;
            }
         </style>';

Advertisement: