PDA

View Full Version : Miscellaneous Hacks - Mini-Calendar in Header by BOP5 (VB 4.x.x)


BirdOPrey5
06-23-2012, 10:00 PM
Brought to you by BirdOPrey5
www.Qapla.com (http://www.qapla.com/mods/)


https://vborg.vbsupport.ru/attachment.php?attachmentid=139330&stc=1&d=1340545531

Live Demo: Mini-Calendar at Qapla.com (http://www.qapla.com/mods/showthread.php/550)

This mod adds a small "mini-calendar" on the header of every page, next to the logo image.

It uses the built in "ad location" called global_header1. If you use an ad in that spot (most people don't) you will need to move it prior to enabling this mod else it will not show.

If the Calendar doesn't show and you're on a custom style it is likely the style does not have the ad location coded in. See post #15 (https://vborg.vbsupport.ru/showpost.php?p=2342631&postcount=15) in this thread for a fix

There are settings but it is setup to work immediately after installing. Most settings should only be adjusted by advanced users. The font sizes and locations are setup for English day and month names- you may need to manually edit the headcalendar_bop5 template manually for it to look right in other languages.

You can use it as a link to the default vBulletin calendar (default behavior) or not. Also you can choose to disable it in specific styles if need be. Finally you can choose whether it displays the date based off the server's timezone or the user's timezone. (Default is user's timezone.)

New in Version 1.1 - Option to disable the display of the mini-calendar by usergroup. (Primary or secondary will work.)

I don't anticipate there will be much further development on this mod, it was just a simple thing I put together for one of my forums I figured like sharing- it already does everything I can think it needs to do, but if you have a suggestion that adds to the value I will consider it.

Each <div> has a unique id so you can use additional.css to make changes as needed.

You can see the default calendar is "blue" on top. Various other alternative color options are included in the download (red, green, yellow, and more...)

Tested as far back as VB 4.0.8 and as recent as 4.2.0 and expected to work on all 4.x versions.

Please "Mark as Installed" if you use this. :)
Donations Always Appreciated. :up:

BirdOPrey5
06-24-2012, 12:48 PM
Reserved.

Nirjonadda
06-24-2012, 12:51 PM
You can add with Time?

BirdOPrey5
06-24-2012, 12:55 PM
No. It is designed as a calendar, not a clock.

That said, you could edit the "weekday" option in settings to show the time instead of the day of week if you really wanted.

Edit- you can change the setting PHP date() Day of Week to:
g:i a

For time to show in place of the day of the week.

ProFifaLeagues
06-24-2012, 01:02 PM
Works superb on 4.2 thank you

deverill2010
06-24-2012, 01:18 PM
Very cute BOP, will have it installed later! :D

Nirjonadda
06-24-2012, 01:22 PM
Residence Time not working correctly? Its Showing Up 8:20PM When Current local time is 4:20PM

Taurus1
06-24-2012, 01:32 PM
Very nice! If you don't use adblock.......lol

New Joe
06-24-2012, 01:38 PM
Any way to change the color?

edit;
I have just read this

You can see the default calendar is "blue" on top. Various other alternative color options are included in the download (red, green, yellow, and more...)
As you were

RobbieZ
06-24-2012, 01:40 PM
Sexy! Looks ok when your using a left handed banner, when you get a full length then it looks outta place, any chance of it going to the right of bitfields?

RobbieZ
06-24-2012, 01:41 PM
Then again if you have a notice it'll knock that down.. hmmm. nevermind

Mr_Running
06-24-2012, 01:42 PM
Yes, Awesome

Usergroup permissions?

Prefer not to display to guest :)

BirdOPrey5
06-24-2012, 01:54 PM
Residence Time not working correctly? Its Showing Up 8:20PM When Current local time is 4:20PM

Are you sure your timezone is set correctly? Are you using the setting for User's Time? If so it should match the time at the bottom of every page- "The time now is 01:58 PM" for example.

Yes, Awesome

Usergroup permissions?

Prefer not to display to guest :)

I will add that at some point. :up:

deverill2010
06-24-2012, 08:41 PM
Thats a shame, I have just had to unistal it. Apparently my new skin doesn't have that ad location..

BirdOPrey5
06-24-2012, 09:18 PM
Thats a shame, I have just had to unistal it. Apparently my new skin doesn't have that ad location..

You just need to add this code to your header template:


<div class="ad_global_header">
{vb:raw ad_location.global_header1}
{vb:raw ad_location.global_header2}
</div>


In the default VB style it is only 2 lines up from the very end of the header template- above the following code:


<hr />
</div>

ahobilam
06-25-2012, 03:49 AM
Is there any possible to connect with google calendar to show todays event also with the date?

BirdOPrey5
06-25-2012, 09:54 AM
no.

dlewisr
06-25-2012, 05:19 PM
Cute. I like it. Nice work

Mr_Running
06-29-2012, 12:26 AM
User Group Permissions
I will add that at some point. :up:

I am drooling :up: with every passing day. :)

Front Range 4x4
06-29-2012, 09:48 PM
Installed!

Thanks, I like it! To get it to look the way I preferred I did some small changes and used just this portion of the code.

{vb:raw ad_location.global_header1}

Here's where I moved it to and what it looks like on my site.

BirdOPrey5
06-29-2012, 11:19 PM
User Group Permissions


I am drooling :up: with every passing day. :)

LOL... Here you go, version 1.1 released. :up:

Mr_Running
06-30-2012, 12:31 AM
Thank You for release 1.1 :)
Works but maybe one slight adjustment if a user is part of more than one usergroup who does not have permission it will not display.

How about using the Primary Users group?

BirdOPrey5
06-30-2012, 12:42 AM
To switch it to use primary groups go to Admin CP -> Plugin Manager

Edit the TWO plugins Calendar Setup and Cache Header Calendar...

In BOTH find the line:

!is_member_of($vbulletin->userinfo, explode(",", $vbulletin->options['bop5hc_groups'])) AND

and change them to:

!in_array($vbulletin->userinfo['usergroupid'], explode(",", $vbulletin->options['bop5hc_groups'])) AND

Then save the plugins.

Mr_Running
06-30-2012, 02:02 AM
Cheers, :)

WendM
07-11-2012, 10:07 AM
this is excellent, Joe! :)

How can I enlarge it , please?

BirdOPrey5
07-11-2012, 11:04 AM
The calendar background image is 60 x 60 pixels so enlarging it will show distortions in the image- and this was never designed to be enlarged.

But if you want to try it can all be done by adding code to additional.css - for example add this:


#bop5headcalmain {
height:90px !important;
width:90px !important;
background-size: 100%;
}


That will make the calendar background image 90x90 instead of 60x60, but you will still need to do custom code for each of the text lines including the new custom widths and new font sizes, and new spacing in pixels (top values in CSS.)

BirdOPrey5
07-11-2012, 11:10 AM
Here is the complete code to go to 80x80... you can customize the font sizes as you want.


#bop5headcalmain {
height:80px !important;
width:80px !important;
background-size: 100%;
}
#bop5headcalmonth {
top:18px !important;
width:80px !important;
font-size: 8pt !important;
}
#bop5headcalweek {
top:33px !important;
width:80px !important;
font-size: 8pt !important;
}
#bop5headcalday {
top:45px !important;
width:80px !important;
}

WendM
07-11-2012, 12:02 PM
many thanks, Joe! :) One more thing...how can I move it down a notch, please?

WendM
07-11-2012, 01:45 PM
OK, for those who want to know how to push the image down to their own height, then do this:

Open Template: headcalendar_bop5

find: position:relative;

then next to it place this: top:20px;

adjust the number to suit your own position!

demo here:
http://www.hottopowners.co.uk/forum.php

BirdOPrey5
07-11-2012, 03:08 PM
OK, for those who want to know how to push the image down to their own height, then do this:

Open Template: headcalendar_bop5

find: position:relative;

then next to it place this: top:20px;

adjust the number to suit your own position!

demo here:
http://www.hottopowners.co.uk/forum.php

You can also add it to additional.css so you don't have to edit the template if you want:


#bop5headcalmain {
top:20px;
}


In general it's good to avoid editing templates because they will need to be reverted if the mod is ever upgraded and changes made to the template.

BadgerDog
07-12-2012, 10:34 AM
Installed and tested under v4.1.3 ...

Didn't work on our site .. un-installed ...

I think our custom style and logo is getting in the way as it worked with default style of vBulletin ... :up:

Thanks for your efforts ... :)

Regards,
Doug

BirdOPrey5
07-12-2012, 10:46 AM
Probably this:

It uses the built in "ad location" called global_header1. If you use an ad in that spot (most people don't) you will need to move it prior to enabling this mod else it will not show.

BaanFarsang
07-24-2012, 06:26 AM
Does not work on a Royal Flush Skin.

BirdOPrey5
07-24-2012, 10:58 AM
The skin must be missing the ad location in the header.

See Post #15 to put the Ad Location into your header:
https://vborg.vbsupport.ru/showpost.php?p=2342631&postcount=15

doctorsexy
07-24-2012, 05:11 PM
Great...thank you...

fxwoody
07-25-2012, 04:57 PM
Cool little addon for the members :)
I have one little bug tho, when i switch to french, it doesn't show the right info :(

I guess i should had the extra language options?!?

Tks bud

BirdOPrey5
07-25-2012, 05:41 PM
The names of the days and months are from the php install, not phrases in vbulletin. I'm not sure what the PHP date() function offers in terms of different languages, I think it should show for whatever language php is installed under.

http://php.net/manual/en/function.date.php

thecore762
07-26-2012, 01:25 AM
BirdOPrey5, any option to makes this go in a forumblock sidebar? I think it would be super awesome!

BirdOPrey5
07-26-2012, 08:03 AM
It wasn't something I was planning. I will keep it in the back of my mind if I get bored one day.

Bob_R
01-11-2013, 04:57 PM
You just need to add this code to your header template:


<div class="ad_global_header">
{vb:raw ad_location.global_header1}
{vb:raw ad_location.global_header2}
</div>


Using this the calendar shows but there is no day month year.

Bob_R
01-12-2013, 01:46 PM
Uninstalled- No support

Bob_R
01-18-2013, 01:17 AM
Joe, I have an update on this issue over at your place. Let me know where we'll be discussing this so neither of us have to play forum tag.

macroforum
01-18-2013, 08:50 AM
Thanks!
How can i shows the months and days in italian language?
In headcalendar_bop5 template i dont's see months and days names.
Thanks
Antonio

EDIT Ok, i see this post https://vborg.vbsupport.ru/showpost.php?p=2351387&postcount=37

kfyonur
01-20-2013, 11:29 AM
i can't see calendar in my theme but i can see calendar on the other themes..

where can i add this code ?

<div class="ad_global_header">
{vb:raw ad_location.global_header1}
{vb:raw ad_location.global_header2}
</div>

MY HEADER

<div id="pageWrapper">
<div id="topBar">
<div class="topBox">
<div class="topBoxLeft"><div class="topBoxRight">
<span>Audi T?rkiye Kul?b?'ne hoşgeldiniz.
<vb:if condition="$show['member']"> {vb:raw bbuserinfo.username}!<vb:else />! Bu ilk ziyaretiniz mi?</vb:if></span>
<div class="topBoxLinks">
<vb:if condition="$vboptions['enablefacebookconnect']">
<div id="fb_topbar<vb:if condition="$show['facebookuser']">_in</vb:if>">
<ul>
{vb:raw facebook_header}
</ul>
</div>
</vb:if>
<vb:if condition="$vbulletin->options['display_social_icons']==1">
<div class="socialBox">
<vb:if condition="$vbulletin->options['twitter_account']"><a href="http://www.twitter.com/{vb:raw twitter_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-twitter.png" alt="Follow us on Twitter" /></a></vb:if>
<vb:if condition="$vbulletin->options['facebook_account']"><a href="http://www.facebook.com/{vb:raw facebook_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-facebook.png" alt="Follow us on Facebook" /></a></vb:if>
<vb:if condition="$vbulletin->options['youtube_account']"><a href="http://www.youtube.com/{vb:raw youtube_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-youtube.png" alt="Watch us on YouTube" /></a></vb:if>
</div>
</vb:if>
<div class="topBarLinksWrap">
<vb:if condition="$vboptions['archiveenabled']"><a href="archive/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase archive}</a></vb:if>
<a href="#" class="topRSS"><img src="{vb:stylevar imgdir_themedir}/iconRSS.gif" alt="RSS" /></a>
</div>

</div>
</div></div>
</div>
<vb:if condition="$show['registerbutton']">
<a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow" id="clickRegister"><img src="{vb:stylevar imgdir_themedir}/clickRegister_{vb:stylevar left}.png" alt="{vb:rawphrase register}" /></a>
</vb:if>
</div>
<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
<vb:if condition="$stylevar['titleimage']"><span class="logo"><a name="top" href="{vb:link forumhome}"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></span>
<vb:if condition="$vbulletin->options['modern_slogan_enable']">
<span class="slogan">{vb:raw modern_slogan}</span>
</vb:if>

<vb:else />&nbsp;</vb:if>

<vb:if condition="$show['member']">
<div id="toplinks" class="toplinks">
<ul class="isuser">
<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onClick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
<vb:if condition="$show['registerbutton']">
<li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
</vb:if>
<li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase user_control_panel}</a></li>
<li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
<vb:if condition="$notifications_total">
<li class="popupmenu notifications" id="notifications">
<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
<ul class="popupbody popuphover">
{vb:raw notifications_menubits}
</ul>
</li>
<vb:else />
<li class="popupmenu nonotifications" id="nonotifications">
<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
<ul class="popupbody popuphover">
<li>{vb:rawphrase no_new_messages}</li>
<vb:if condition="$show['pmmainlink']"><li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li></vb:if>
</ul>
</li>
</vb:if>
<li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
</ul>
{vb:raw template_hook.header_userinfo}
<vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
</div>
<vb:else />
<div id="loginBox">
<div class="loginBox">
<!-- login form -->
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
<form id="navbar_loginform" action="login.php?{vb:raw session.sessionurl}do=login" method="post" onSubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
<ul>
<li class="inputPad"><div class="loginBoxInput"><input type="text" class="textbox<vb:if condition="!$username"> default-value</vb:if> loginInput" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" /></div></li>
<li class="inputPad"><div class="loginBoxInput">
<input type="password" class="loginInput" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
<input type="text" class="loginInput" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" /></div></li>
<li class="submitPad"><input type="image" src="{vb:stylevar imgdir_themedir}/loginButton.gif" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" /></li>
</ul>
<div class="memberBottom">
<div class="memberLinks">
<a href="login.php?do=lostpw">Forgot password?</a><vb:if condition="$show['registerbutton']"> | <a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></vb:if>
</div>
<div class="rememberMe"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label></div>
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<script type="text/javascript">
YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
vB_XHTML_Ready.subscribe(function()
{
//
YAHOO.util.Event.on('navbar_username', "focus", navbar_username_focus);
YAHOO.util.Event.on('navbar_username', "blur", navbar_username_blur);
YAHOO.util.Event.on('navbar_password_hint', "focus", navbar_password_hint);
YAHOO.util.Event.on('navbar_password', "blur", navbar_password);
});

function navbar_username_focus(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);
if (textbox.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>')
{
//
textbox.value='';
textbox.style.color='{vb:stylevar input_color}';
}
}

function navbar_username_blur(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);
if (textbox.value == '')
{
//
textbox.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>';
textbox.style.color='{vb:stylevar shade_color}';
}
}

function navbar_password_hint(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);

YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "none");
YAHOO.util.Dom.setStyle('navbar_password', "display", "inline");
YAHOO.util.Dom.get('navbar_password').focus();
}

function navbar_password(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);

if (textbox.value == '')
{
YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
}
}
</script>
<!-- / login form -->
</div>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->
<div id="contentMain">
<div class="contentTL"><div class="contentTR"><div class="contentBL"><div class="contentBR">
<div class="contentWrapper">

Amaury
01-30-2013, 01:50 AM
Where does this pull the date format from? Is it built into the modification or does it pull it from the date format we have set in our settings?

We have n/j/Y (1/29/2013) and would like it if this calendar would use that. :)

It would look like this:
Tuesday
1/29/2013

No day in our format, but I would like to keep that. :)

BirdOPrey5
01-31-2013, 04:15 PM
Joe, I have an update on this issue over at your place. Let me know where we'll be discussing this so neither of us have to play forum tag.

Bob is all set- it was his custom style that needed some custom CSS to get the text to show.

i can't see calendar in my theme but i can see calendar on the other themes..

where can i add this code ?

<div class="ad_global_header">
{vb:raw ad_location.global_header1}
{vb:raw ad_location.global_header2}
</div>

MY HEADER

<div id="pageWrapper">
<div id="topBar">
<div class="topBox">
<div class="topBoxLeft"><div class="topBoxRight">
<span>Audi T?rkiye Kul?b?'ne hoşgeldiniz.
<vb:if condition="$show['member']"> {vb:raw bbuserinfo.username}!<vb:else />! Bu ilk ziyaretiniz mi?</vb:if></span>
<div class="topBoxLinks">
<vb:if condition="$vboptions['enablefacebookconnect']">
<div id="fb_topbar<vb:if condition="$show['facebookuser']">_in</vb:if>">
<ul>
{vb:raw facebook_header}
</ul>
</div>
</vb:if>
<vb:if condition="$vbulletin->options['display_social_icons']==1">
<div class="socialBox">
<vb:if condition="$vbulletin->options['twitter_account']"><a href="http://www.twitter.com/{vb:raw twitter_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-twitter.png" alt="Follow us on Twitter" /></a></vb:if>
<vb:if condition="$vbulletin->options['facebook_account']"><a href="http://www.facebook.com/{vb:raw facebook_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-facebook.png" alt="Follow us on Facebook" /></a></vb:if>
<vb:if condition="$vbulletin->options['youtube_account']"><a href="http://www.youtube.com/{vb:raw youtube_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/icon-youtube.png" alt="Watch us on YouTube" /></a></vb:if>
</div>
</vb:if>
<div class="topBarLinksWrap">
<vb:if condition="$vboptions['archiveenabled']"><a href="archive/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase archive}</a></vb:if>
<a href="#" class="topRSS"><img src="{vb:stylevar imgdir_themedir}/iconRSS.gif" alt="RSS" /></a>
</div>

</div>
</div></div>
</div>
<vb:if condition="$show['registerbutton']">
<a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow" id="clickRegister"><img src="{vb:stylevar imgdir_themedir}/clickRegister_{vb:stylevar left}.png" alt="{vb:rawphrase register}" /></a>
</vb:if>
</div>
<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
<vb:if condition="$stylevar['titleimage']"><span class="logo"><a name="top" href="{vb:link forumhome}"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></span>
<vb:if condition="$vbulletin->options['modern_slogan_enable']">
<span class="slogan">{vb:raw modern_slogan}</span>
</vb:if>

<vb:else />&nbsp;</vb:if>

<vb:if condition="$show['member']">
<div id="toplinks" class="toplinks">
<ul class="isuser">
<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onClick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
<vb:if condition="$show['registerbutton']">
<li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
</vb:if>
<li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase user_control_panel}</a></li>
<li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
<vb:if condition="$notifications_total">
<li class="popupmenu notifications" id="notifications">
<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
<ul class="popupbody popuphover">
{vb:raw notifications_menubits}
</ul>
</li>
<vb:else />
<li class="popupmenu nonotifications" id="nonotifications">
<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
<ul class="popupbody popuphover">
<li>{vb:rawphrase no_new_messages}</li>
<vb:if condition="$show['pmmainlink']"><li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li></vb:if>
</ul>
</li>
</vb:if>
<li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
</ul>
{vb:raw template_hook.header_userinfo}
<vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
</div>
<vb:else />
<div id="loginBox">
<div class="loginBox">
<!-- login form -->
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
<form id="navbar_loginform" action="login.php?{vb:raw session.sessionurl}do=login" method="post" onSubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
<ul>
<li class="inputPad"><div class="loginBoxInput"><input type="text" class="textbox<vb:if condition="!$username"> default-value</vb:if> loginInput" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" /></div></li>
<li class="inputPad"><div class="loginBoxInput">
<input type="password" class="loginInput" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
<input type="text" class="loginInput" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" /></div></li>
<li class="submitPad"><input type="image" src="{vb:stylevar imgdir_themedir}/loginButton.gif" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" /></li>
</ul>
<div class="memberBottom">
<div class="memberLinks">
<a href="login.php?do=lostpw">Forgot password?</a><vb:if condition="$show['registerbutton']"> | <a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></vb:if>
</div>
<div class="rememberMe"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label></div>
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<script type="text/javascript">
YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
vB_XHTML_Ready.subscribe(function()
{
//
YAHOO.util.Event.on('navbar_username', "focus", navbar_username_focus);
YAHOO.util.Event.on('navbar_username', "blur", navbar_username_blur);
YAHOO.util.Event.on('navbar_password_hint', "focus", navbar_password_hint);
YAHOO.util.Event.on('navbar_password', "blur", navbar_password);
});

function navbar_username_focus(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);
if (textbox.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>')
{
//
textbox.value='';
textbox.style.color='{vb:stylevar input_color}';
}
}

function navbar_username_blur(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);
if (textbox.value == '')
{
//
textbox.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>';
textbox.style.color='{vb:stylevar shade_color}';
}
}

function navbar_password_hint(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);

YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "none");
YAHOO.util.Dom.setStyle('navbar_password', "display", "inline");
YAHOO.util.Dom.get('navbar_password').focus();
}

function navbar_password(e)
{
//
var textbox = YAHOO.util.Event.getTarget(e);

if (textbox.value == '')
{
YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
}
}
</script>
<!-- / login form -->
</div>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->
<div id="contentMain">
<div class="contentTL"><div class="contentTR"><div class="contentBL"><div class="contentBR">
<div class="contentWrapper">


I'm afraid it's going to be trial and error. Look at a default header template, see where that code is, and try to figure out where it would best go in your custom template.

Where does this pull the date format from? Is it built into the modification or does it pull it from the date format we have set in our settings?

We have n/j/Y (1/29/2013) and would like it if this calendar would use that. :)

It would look like this:
Tuesday
1/29/2013

No day in our format, but I would like to keep that. :)

That simply won't fit in the calendar graphic... But in the mod settings - Header Calendar by BOP5 - there are 3 options, PHP date() Month Setup, Day of week setup, and day setup... You can change one of them to n/j/Y and erase the others if you really wanted- I can't image it looks good though.

QBart2011
05-14-2013, 02:05 AM
So I have this odd issue..

The Tab shows up great and with no problems under Internet Explorer but not under Firefox 20.0.1 release..

I checked all the settings and everything looks right. Also if it works for Internet Explorer I would imagine it is set correctly..

BirdOPrey5
05-14-2013, 09:49 AM
By Tab I assume you mean calendar? Can you post a link to your site?

Do you see the calendar in firefox on the demo site? - http://www.qapla.com/mods/showthread.php/550

QBart2011
05-14-2013, 06:46 PM
By Tab I assume you mean calendar? Can you post a link to your site?

Do you see the calendar in firefox on the demo site? - http://www.qapla.com/mods/showthread.php/550

Yes I meant the Calendar ( Tab )..

Darn I just realized it's my AdBlock that is stopping it from showing up in Firefox..

In "Easy List" was the problem as there are two lines that pop up that block this Calendar Tab..

~318racing.org,~linuxforums.org##.ad_global_header

and

/tapatalkdetect.js

Once I disabled both the tab appeared no problem..

BirdOPrey5
05-15-2013, 12:33 PM
Thanks for posting the solution. :up:

ahobilam
05-17-2013, 04:13 AM
Downloaded and installed,
but it is not suitable for my customized header,
so, uninstalled.

Toorak Times
05-17-2013, 05:10 AM
Works so far on my 4.2.1 www.tooraktimes.com.au did I miss a solution though for my custom skins? Can I turn it off in some skins?

CAG CheechDogg
05-17-2013, 09:03 AM
I added mine on the top right corner right below the avatar...great little mod !

https://vborg.vbsupport.ru/external/2013/05/36.png

Toorak Times
05-17-2013, 11:13 AM
I added mine on the top right corner right below the avatar...great little mod !

https://vborg.vbsupport.ru/external/2013/05/36.png

That's cool, how'd you do that mate?

Bob_R
05-17-2013, 04:36 PM
I'm working on a new theme and when I centered the logo the mini calendar disappeared.

I can see the tippity top of it in the lower left hand side of the theme/centered logo.

Any suggestions?

BirdOPrey5
05-17-2013, 05:59 PM
Use Firebug in Firefox or Inspect Element in Chrome and play with the CSS until it looks right, then add the CSS changes to additional.css.

john7911
02-11-2016, 09:43 AM
Cool little addon for the members :)
I have one little bug tho, when i switch to french, it doesn't show the right info :(

I guess i should had the extra language options?!?

Tks bud

I have the same problem, where can I modify the PHP code for the date?
Thank you :)

BirdOPrey5
02-11-2016, 09:56 PM
In the mod settings, the one that say you shouldn't modify unless you know what you're doing, you would need to modify what is there based on your language version of PHP.

On php.net change to your language, then search for the date() function, and there will be a list of letters you can use for the day of the month, the name of the day, and the name of the month. You need to replace them in the settings with whatever your language uses. It's possible some names of months or days won't fit right, the calendar was designed for English words.

J19784B5A39B
02-12-2016, 12:48 AM
v.3.8 no?

BirdOPrey5
02-12-2016, 06:52 PM
This mod is only for VB 4x. There is no where suitable to put it in 3.x without a lot of template editing.

oldfan
04-14-2023, 01:38 PM
dont work on 4.2.5 php 7.2