WordPress.org

Support

Support » Plugins and Hacks » Event Calendar » [Resolved] Ajax Event Calendar minicalendar widget

[Resolved] Ajax Event Calendar minicalendar widget

  • I would apreciate any information about the planes to create a minicalendar widget (almost the same as calendar, but only the basic) or the requirements to include one in the code … as it uses fullcalendar code from third parts.

    I need this function to put in our departamental portal.

    Many thanks.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Contributor Eran Miller

    @eranmiller

    I will consider adding this functionality to a future release of the plugin. FYI, it is unlikely that it will make it into the next release.

    Thank you for your feedback.
    Eran

    Perhaps i can help to do it, and if i can have some guidance from you, I can make de propper code in php, not sure about css.

    Plugin Contributor Eran Miller

    @eranmiller

    Thanks,

    I have the php completed for this widget, php isn’t the obstacle, it’s the passing asynchronous data via javascript that requires lots of attention.

    Eran

    + 1 for minicalendar widget 🙂

    I just redid some of the plugin to just hack it a little. Added my own template to utilize the calendar. I didn’t want to create a whole new widget but none the less it works.

    In custom template_page.php:

    <div class="layout-cell sidebar1">
    
    <div class="block-body">
    	<div class="blockheader">
    		<h3 class="t" style="font-size:22px">Custom Event Schedule</h3>
    		<h3 class="t custom-date"><?php echo date("M") . " " .date("Y"); ?></h3>
    	</div>
    	<br />
    	<br />
    	<div class="blockcontent">
    	        <div class="blockcontent-body">
    		        <?php echo do_shortcode("[calendar]"); ?>
    	        </div>
            </div>
    </div>
    </div>

    in custom_plugin.php:

    if(!is_page("calendar")){
    add_action("wp_footer", "add_custom_tcn_javascript");
    function add_custom_tcn_javascript(){
    ?>
    	<script type="text/javascript">
    		(function($) {
    			$("#aec-filter").hide();
    			$("#aec-calendar").next().hide();
    			$("#aec-menu").hide();
    			$("#aec-calendar > .fc-header").hide();
    			var monthName=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
    			if($(".custom-date").length > 0){
    			$(".fc-button-prev").live("click", function(){
    				var oldDate = $(".custom-date").html();
    				oldDate = oldDate.split(/ /);
    				var x = 0;
    				for(x in monthName)
    				{
    					if(oldDate[0] == monthName[x])
    					{
    						var newMonth = parseInt(x) - 1;
    						var newYear = parseInt(oldDate[1]);
    						if(oldDate[0] == "Jan")
    						{
    							var newMonth = parseInt(x) + 11;
    							var newYear = parseInt(oldDate[1]) - 1;
    						}
    					}
    				}
    				$(".custom-date").html(monthName[newMonth] + " " + newYear);
    			});
    			$(".fc-button-next").live("click", function(){
    				var oldDate = $(".custom-date").html();
    				oldDate = oldDate.split(/ /);
    				var newMonth = 0;
    				for(x in monthName)
    				{
    					if(oldDate[0] == monthName[x])
    					{
    						var newMonth = parseInt(x) + 1;
    						var newYear = parseInt(oldDate[1]);
    						if(oldDate[0] == "Dec")
    						{
    							var newMonth = parseInt(x) - 11;
    							var newYear = parseInt(oldDate[1]) + 1;
    						}
    					}
    				}
    				$(".custom-date").html(monthName[newMonth] + " " + newYear);
    			});
    			$(".fc-button-today").live("click", function(){
    				var newDate = new Date();
    				$(".custom-date").html(monthName[newDate.getMonth()] + " " + newDate.getFullYear());
    			});
    			}
    		})(jQuery);
    	</script>
    <?php
    }
    }// END if statement

    css:

    .content-layout .sidebar1 {
        border-right: 1px solid #6CACE6;
        max-width: 200px;
        width: 200px;
    }
    .blockcontent {
        margin: 0 auto;
        min-height: 1px;
        min-width: 1px;
        position: relative;
    }
    .blockcontent-body {
        color: #666666;
        font-family: "Century Gothic";
        font-size: 12px;
        padding: 7px;
        position: relative;
    }

    Not really the best scenario but a fun implementation to say the least. I def could have done it better and not my best work but it was fun doing it.

    Let me know if you have any questions or would like an explanation or whatever.

    This is what mine looked like after it was done:
    here

    Thats mean that using “[calendar]” we can get the minicalendar?, so if that is true, and we also want to have the full calendar, how we can do to have working “[minicalendar] and “[calendar]” in diferent ways?

    The objetive is to present the minicalendar with days remarked on events and linked to a page with all events in that day. Is that possible?

    Plugin Contributor Eran Miller

    @eranmiller

    Plugin version 0.9.9.1 is now available for download.
    Due to feature prioritization, mini-calendar functionality has been postponed.

    Plugin Contributor Eran Miller

    @eranmiller

    I stumbled upon a solution today for a minicalendar via shortcode which I will make available in the next plugin release. The functionality will be identical to the larger calendar and in the next release I will be adding additional shortcode options that allows you to control the calendar height (the width is automatically calculated).

    Just thought I’d let you know.
    Eran

    I stumbled upon a solution today for a minicalendar via shortcode

    Great news, Eran, could you, please, post the link to this article when you have done? I’d like to test it.
    Thanks in advance

    Mac

    Great news, Eran, could you, please, post the link to this article when you have done? I’d like to test it.

    Yes! I am also eagerly anticipating this feature!

    Same! can’t wait for this 🙂

    I need it right now. No pressure :). When? Is it in beta?

    I modded the events calendar plugin you can see it in action here: http://tottrade.net/sign-up.

    Plugin Contributor Eran Miller

    @eranmiller

    @halmir: probably another week before it goes beta, then another week or two before it goes live.

    Thats great. It would not make sense to use two different calendars.
    I could make Finnish translation, or is someone making it?
    I have done in past translation to Ubuntu linux.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] Ajax Event Calendar minicalendar widget’ is closed to new replies.
Skip to toolbar