Update to Navbar - Member Info and Avatars

Hah. New default avatar instead of Mr Blue (default) - no problem now. Thanks.

Probably belongs to a separate thread, but...
Any chance to increase the font size for the code tags body?
It's barely readable as it stands..

Sorry, I'm not following you. The code tags are already huge (see attached) on all versions of my desktop browser (Chrome, Safari and FF) and on Chrome on mobile.

The code font size are the same as they have been for years.

1 Like

Sorry, I stand corrected - my zoom was at 90% in FF.
Sorry again..

1 Like

No worries.

It's easy to get confused with a site is changing.

That's why "the big companies" offer previews and "go back to the old site" links until the transition is done.

We don't have the luxury of operating like a company with a building full of web developers, but we can use the same tools.

I am considering changing all the legacy tables to use Bootstrap table CSS.

I'm happy with the numbers in various colored circles around the avatar.

I'm still concerned about manually clearing confidential post counts by hitting the "Mark Forums Read" button. Hitting that button builds in a race condition that can clear notification of unread confidential posts before I receive notice that new confidential messages have been posted.

It was that way before.

When one of our admins wrote that plugin years go he did not add any hooks to update the notification system (to my knowledge) when a confidential post is viewed; and so it was the same before; however, it was not noticeable because it always appeared in the text area (at least for me) so I always had to clear notifications for confidential posts the same way. Nothing has changed from before except the fact it is more noticeable now because of using badges.

The notification feature increments not only for confidential posts, but according to the code, increments for all notices (posts in mod queue, picture comments to moderate, etc) except PMs. It may be that the notifications will update (decrement) with the vB cron during periodic system updates, but I've not testing this yet.

I will write some debugging log code in the notification system and see if I can understand how to make this even better; because I would like for these notifications to update in near real time without refreshing the page (or marking the forums read); and that goes for the PMs as well.

Thanks for staying on top of this.

OK. I just checked (step 1) and the plugin that is responsible for the confidential posts does not use the built in notification system and instead sets it on global var for each user:

$newhiddenposts

I'll dig further and see if I can get this to update after a confidential post is read.

Here is the PHP code to update the $newhiddenposts global var (and I searched the plugin code in the DB and this is the only reference to that $newhiddenposts var:

if (can_moderate()) 
{ 
    $posts = $db->query_first(" 
        SELECT COUNT(postid) AS count 
        FROM " . TABLE_PREFIX . "post AS post 
        LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post') 
        WHERE visible = 3 AND " . TABLE_PREFIX . "post.dateline > " . $vbulletin->userinfo[lastvisit] . " 
            AND deletionlog.primaryid IS NULL 
    "); 
    $newhiddenposts = intval($posts['count']); 
}  

And there seems no built in cron to update:

neo@www:/var/www/includes/cron# grep notification *php
neo@www:/var/www/includes/cron# grep notice *php
neo@www:/var/www/includes/cron# grep hiddenpost *php
neo@www:/var/www/includes/cron# grep hidden *php

OK Don,

Looking at the code above, all confidential posts are retrieved:

  WHERE visible = 3 AND " . TABLE_PREFIX . "post.dateline > " . $vbulletin->userinfo[lastvisit] . "

So, these should clear when the dateline of the post is greater than the time of your last visit, which is based on logging on after logging off.

So, the current system is set up to clear these based on login/logoff times. It is not necessary to "Mark Forums Read" if you logout and then log back on.

However, I am still interested in adding some new code that marks each one of these read; but if we do it automatically, then if you later want to come back and review it, it will not be easy to find; so that's not a perfect solution, either.

Since they do clear and update based on logoff/login, I'm going to move on to other tasks, as call this "good enough for now" unless Scott wants to work on this when he has time since he wrote this great plugin and he might have a good idea how to address this.

Did first integration of Bootstrap with the advanced stats on the first page:

Now:

<div style="border-style:solid;border-width:1px;margin-bottom:20px;padding:0px;overflow:auto;">
<table  class="table table-sm" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%" align="center" style="margin:0;" >
/* old code  */
</div>

Was:

<table  class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%" align="center" " >

Looks OK and seems to work smoother, but will not be responsive until I do the other embedded tables in that code :frowning:

But the good news is that finally, finally, the scrollbars work on this code block :slight_smile:

Right now I have this happening......

I login and get avatar top right with a white 2 in a blue circle.

I click on the 2 and it opens the sidebar showing all my details, location, etc.

It says "New condfidential posts:2" and pointing to it says "Go to your confidential posts" (whatever that means? My conf posts or other people's conf posts on threads to which I've subscribed?).

Clicking on that gives me:

which then, after 10+ seconds times-out to the Forum Search page.

Clicking on the "Search Last 24 Hours" shown above doesn't get me anywhere either.

Am I doing something stupid or missing something here??

Sounds like you are doing something you do not understand unrelated to CSS and coding issues LOL

Hmmmm......logged out and back in......2 is now 1.....open sidebar....click on confidential posts.....and it works!!! What the heck?

(Chrome on Win7)

1 Like

Could be anything, LOL

I'm changing a lot of CSS, CSS libs, JS, JS libs, HTML and more and testing in real time, so clean your cache out often or close and restart your browser from time-to-time if things are weird.

Today I changed a number of tables to Bootstrap table classes and added some div wrappers to many tables, sometimes things break and I have to fix them.

Seems to be fine for the most part and I'm happy with Bootstrap, but I've only touched a small number of tables compared to the entire site; and so far when I try to go deeper into tables to make them more responsive, things break.

OK. Recoded the JS to stop blinking and only show the badge.

Thanks.

1 Like

Update:

Did a lot more today:

[LEFT]1. Updated the center nav bar, adding a drop down for man pages.
2. Added some more menu items to the drop down and rearranged.
3. Added a few things back to the quick link drop down.
4. Cleaned up more code and fixes some formatting issues in the usercp and options area (by turning off Bootstrap CSS on those pages and more).
5. Used some JS to collapse some things (forums, activity, whois, etc) by default on the home page. However, if you uncollapse them they will stay visible.
6. Fixes some drop downs for guest users (search and man).
7. Change the background color of the code tags (for fun, from very opaque green to opaque blue) but left the quote tags very opaque green for now:[/LEFT]

background-color:  rgba(7, 27, 183, .05);

If you want other colors for the code and quote tags backgrounds, please post with rbga() suggestion. Also, if having some the forums on the home page collapsed by default is annoying let me know which ones you don't want collapsed by default).

Thanks.

I'm still getting (what I think is) strange behaviour.

I log in, click on "New Topics" from the menu bar, it says "Sorry" there are none, etc, but then, if I don't touch anything (just let it sit there), it times-out after 10+ seconds and goes to the "Search Forums" page.

Is it supposed to do that? Or, again, I'm I doing something stupid?

I can see me being banned. ;oDD
Both logged in and NOT logged in, not sure if this is a bug or required by yourself...
Hope the gibberish makes sense...

When the mouse pointer is over the pull down menus they switch perfectly.

BUT, when the pointer is over a non pull down menu ready to be accessed they don't cancel.

They do close down IF the other menus are actually accessed.
The cancel if you click anywhere outside the the pull down menu area.

In the image the snapshot does not show the pointer, BUT, the menu is highlighted to show the pointer is over the HOME menu...

See image of NON logged in mode...

EDIT:
OSX 10.13.5 using fully updated FireFox.

I have tried the menus on FF, Chome and Safari (all on the Mac) and they work the same they have always worked for the past 10 years. There is no changed behavior because the JS is the same.

You click on the little arrows, they open; you click on the arrow again, it closes; and you click on an arrow it opens and you move the mouse to another area and the new menu opens and the prior menu closes.

This code is controlled by a JS which has not changed a decade and it works fine on all three browsers (FF, Chrome, Safari) and works the same when logged in and logged out.

In other words, nothing has changed since 10 years, the behavior has not been modified because the behavior is based on the original, unmodified "vbmenu_control" and associated JS, and I just tested and it works fine.