NickTheGreek's Blog
NickTheGreek's Blog

Make Youself @ home
Rating 5

My Picture


Site Statistics

user posted image

Blog Functions


Logo

user posted image

What Do I Know About You Already


Facebook Page


Where To Be Found :


Wallpaper Of The Day



2 user(s) viewing

2 guest(s)
0 member(s)
0 anonymous member(s)

Latest Visitors



26 May 2025 - 22:55


27 Jul 2024 - 5:34


13 Oct 2023 - 1:04


26 Apr 2023 - 11:50


31 Jan 2023 - 10:17

Blog Date Fix

Posted by NickTheGreek, 21 Jan 2015, 08:01 PM

Took me quite some time to remember this, had this fixed again 3-4 years ago...

in

CODE
./sources/components_public/blog/lib/lib_post.php


you need to change line 423 accordingly

CODE
/* Build year dropdown */
                for( $i = 2006; $i < 2020; $i++ )


and the code block in total is:

CODE
        function html_date_field( $curr_date='' )
        {
                /* INI */
                $curr_date = $curr_date ? $curr_date : time();
                $_days     = '';
                $_months   = '';
                $_years    = '';

                /* Defaults */
                $_defaults = explode( '/', date( "m/d/Y/G/i", $curr_date ) );

                /* Build day dropdown */
                for( $i = 1; $i < 32; $i++ )
                {
                        $sel    = $_defaults[1] == $i ? ' selected=\'selected\'' : '';
                        $_days .= "<option value='{$i}'{$sel}>{$i}</option>";
                }

                /* Build month dropdown */
                for( $i = 1; $i < 13; $i++ )
                {
                        $sel      = $_defaults[0] == $i ? ' selected=\'selected\'' : '';
                        $_months .= "<option value='{$i}'{$sel}>{$this->ipsclass->lang['M_'.$i]}</option>";
                }

                /* Build year dropdown */
                for( $i = 2006; $i < 2015; $i++ )
                {
                        $sel     = $_defaults[2] == $i ? ' selected=\'selected\'' : '';
                        $_years .= "<option value='{$i}'{$sel}>{$i}</option>";
                }

                /* Return HTML */
                return $this->ipsclass->compiled_templates['skin_blog_post']->date_fields( $_days, $_months, $_years, $_defaults[3], $_defaults[4] );
        }



Comments

There are no comments on this entry


 
« Next Oldest · NickTheGreek's Blog · Next Newest »