WordPress.org

Plugin Directory

Changeset 1565605


Ignore:
Timestamp:
01/01/17 09:08:58 (12 months ago)
Author:
imran2w
Message:

update 851

Location:
bangla-date-display/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bangla-date-display/trunk/bangla-date-display.php

    r1372409 r1565605  
    55Description: Displays Bangla, Gregorian and Hijri date in bangla language via widgets and shortcodes! Options for displaying post/page's time, date, comment count, archive calendar etc in Bangla language. 
    66Author: M.A. IMRAN 
    7 Version: 8.5 
     7Version: 8.5.1 
    88Author URI: http://facebook.com/imran2w 
    99*/ 
     
    4747    else { echo "রাত "; } 
    4848     
    49     echo en_to_bn(gmdate("g:i", time()+$offset)); 
     49    $str = en_to_bn(gmdate("g:i", time()+$offset)); 
     50    return $str; 
    5051    } 
    5152 
     
    5657        $bddp_options = array( 'bangla_tz' => '6' ); } 
    5758         
    58     echo en_to_bn(gmdate("l", time()+$bddp_options['bangla_tz']*60*60)); 
     59    $str = en_to_bn(gmdate("l", time()+$bddp_options['bangla_tz']*60*60)); 
     60    return $str; 
    5961    } 
    6062 
     
    7577    $day_number = array( "১" => "১লা", "২" => "২রা", "৩" => "৩রা", "৪" => "৪ঠা", "৫" => "৫ই", "৬" => "৬ই", "৭" => "৭ই", "৮" => "৮ই", "৯" => "৯ই", "১০" => "১০ই", "১১" => "১১ই", "১২" => "১২ই", "১৩" => "১৩ই", "১৪" => "১৪ই", "১৫" => "১৫ই", "১৬" => "১৬ই", "১৭" => "১৭ই", "১৮" => "১৮ই", "১৯" => "১৯শে", "২০" => "২০শে", "২১" => "২১শে", "২২" => "২২শে", "২৩" => "২৩শে", "২৪" => "২৪শে", "২৫" => "২৫শে", "২৬" => "২৬শে", "২৭" => "২৭শে", "২৮" => "২৮শে", "২৯" => "২৯শে", "৩০" => "৩০শে", "৩১" => "৩১শে" ); 
    7678     
    77     if ( $bddp_options['ord_suffix'] == "1" ) { echo $day_number[$day] . ' ' . $month_year . $last_word; } 
    78     elseif ( $bddp_options['ord_suffix'] == "" ) { echo $day . ' ' . $month_year . $last_word; } 
     79    ob_start(); // begin output buffering 
     80     
     81    if ( $bddp_options['ord_suffix'] == "1" ) { printf('%s', $day_number[$day] . ' ' . $month_year . $last_word); } 
     82    else { printf ( $day . ' ' . $month_year . $last_word); } 
     83     
     84    $output = ob_get_contents(); // end output buffering 
     85    ob_end_clean(); // grab the buffer contents and empty the buffer 
     86    return $output; 
    7987} 
    8088 
     
    8997    $month = sprintf( '%s', implode( ' ', $bdtmonth ) ); 
    9098     
    91     if($month == "বৈশাখ" || $month == "জ্যৈষ্ঠ") { echo "গ্রীষ্মকাল"; } 
    92     elseif($month == "আষাঢ়" || $month == "শ্রাবণ") { echo "বর্ষাকাল"; } 
    93     elseif($month == "ভাদ্র" || $month == "আশ্বিন") { echo "শরৎকাল"; } 
    94     elseif($month == "কার্তিক" || $month == "অগ্রহায়ণ") { echo "হেমন্তকাল"; } 
    95     elseif($month == "পৌষ" || $month == "মাঘ") { echo "শীতকাল"; } 
    96     else { echo "বসন্তকাল"; } 
     99    if($month == "বৈশাখ" || $month == "জ্যৈষ্ঠ") { return "গ্রীষ্মকাল"; } 
     100    elseif($month == "আষাঢ়" || $month == "শ্রাবণ") { return "বর্ষাকাল"; } 
     101    elseif($month == "ভাদ্র" || $month == "আশ্বিন") { return "শরৎকাল"; } 
     102    elseif($month == "কার্তিক" || $month == "অগ্রহায়ণ") { return "হেমন্তকাল"; } 
     103    elseif($month == "পৌষ" || $month == "মাঘ") { return "শীতকাল"; } 
     104    else { return "বসন্তকাল"; } 
    97105} 
    98106 
     
    115123    elseif ( $bddp_options['ord_suffix'] == "" ) { $day_number = array( "1" => "১", "2" => "২", "3" => "৩", "4" => "৪", "5" => "৫", "6" => "৬", "7" => "৭", "8" => "৮", "9" => "৯", "10" => "১০", "11" => "১১", "12" => "১২", "13" => "১৩", "14" => "১৪", "15" => "১৫", "16" => "১৬", "17" => "১৭", "18" => "১৮", "19" => "১৯", "20" => "২০", "21" => "২১", "22" => "২২", "23" => "২৩", "24" => "২৪", "25" => "২৫", "26" => "২৬", "27" => "২৭", "28" => "২৮", "29" => "২৯", "30" => "৩০", "31" => "৩১" ); } 
    116124     
     125    ob_start(); // begin output buffering 
     126     
    117127    $offset = $bddp_options['en_tz']*60*60; 
    118     echo $day_number[gmdate("j", time()+$offset)] . " " . en_to_bn(gmdate("F", time()+$offset)); echo $bddp_options['separator'] . en_to_bn(gmdate("Y", time()+$offset)) . $last_word; 
     128     
     129    printf ('%s', $day_number[gmdate("j", time()+$offset)] . " " . en_to_bn(gmdate("F", time()+$offset)) . $bddp_options['separator'] . en_to_bn(gmdate("Y", time()+$offset)) . $last_word); 
     130    $output = ob_get_contents(); // end output buffering 
     131    ob_end_clean(); // grab the buffer contents and empty the buffer 
     132    return $output; 
    119133} 
    120134 
     
    142156     
    143157    $month_name = array( "Muh" => "মুহাররম", "Saf" => "সফর", "Rb1" => "রবিউল-আউয়াল", "Rb2" => "রবিউস-সানি", "Jm1" => "জমাদিউল-আউয়াল", "Jm2" => "জমাদিউস-সানি", "Raj" => "রজব", "Shb" => "শাবান", "Rmd" => "রমযান", "Shw" => "শাওয়াল", "DhQ" => "জিলক্বদ", "DhH" => "জিলহজ্জ" ); 
    144      
    145     echo $day_number[$d->date("j", time()+$offset)] . " " . $month_name[$d->date("M", time()+$offset)] . $bddp_options['separator'] . en_to_bn($d->date("Y", time()+$offset)) . $last_word; 
     158    ob_start(); // begin output buffering 
     159     
     160    printf('%s', $day_number[$d->date("j", time()+$offset)] . " " . $month_name[$d->date("M", time()+$offset)] . $bddp_options['separator'] . en_to_bn($d->date("Y", time()+$offset)) . $last_word); 
     161     
     162    $output = ob_get_contents(); // end output buffering 
     163    ob_end_clean(); // grab the buffer contents and empty the buffer 
     164    return $output; 
    146165} 
    147166 
  • bangla-date-display/trunk/bddp_admin.php

    r1372409 r1565605  
    66    ?> 
    77    <div class="wrap"> 
    8     <h1 style="margin-bottom:5px;">Bangla Date Display Settings <a href="#how_to_use" class="button button-secondary">How to use?</a> <a href="#credits" class="button button-secondary">Credits</a></h1> 
     8    <h1 style="margin-bottom:5px;">Bangla Date Display Settings <a href="#how_to_use" class="button button-secondary">How to use?</a> <a href="#credits" class="button button-secondary">Credits</a> <a target="_blank" href="http://xhostbd.com" class="button button-secondary">xHOSTBD.com</a></h1> 
    99    <br/> 
    1010 
    11 <?php if($_POST["restore_defaults"] == "1") { delete_option('bddp_options'); } ?> 
     11<?php if(isset($_POST["restore_defaults"]) == "1") { delete_option('bddp_options'); } ?> 
    1212     
    1313    <form method="post" action="options.php"> 
     
    5757        <tr valign="top"> 
    5858        <td></td> 
    59         <td><input id="bddp_options[trans_cmnt]" type="checkbox" name="bddp_options[trans_cmnt]" value="1" <?php if($bddp_options['trans_cmnt']==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_cmnt]">Comment Count</label></td> 
    60         <td><input id="bddp_options[trans_num]" type="checkbox" name="bddp_options[trans_num]" value="1" <?php if($bddp_options['trans_num']==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_num]">Dashboard Numbers</label></td> 
    61         <td><input id="bddp_options[trans_cal]" type="checkbox" name="bddp_options[trans_cal]" value="1" <?php if($bddp_options['trans_cal']==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_cal]">Archive Calendar</label></td> 
     59        <td><input id="bddp_options[trans_cmnt]" type="checkbox" name="bddp_options[trans_cmnt]" value="1" <?php if(isset($bddp_options['trans_cmnt'])==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_cmnt]">Comment Count</label></td> 
     60        <td><input id="bddp_options[trans_num]" type="checkbox" name="bddp_options[trans_num]" value="1" <?php if(isset($bddp_options['trans_num'])==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_num]">Dashboard Numbers</label></td> 
     61        <td><input id="bddp_options[trans_cal]" type="checkbox" name="bddp_options[trans_cal]" value="1" <?php if(isset($bddp_options['trans_cal'])==1) echo('checked="checked"'); ?>/><label for="bddp_options[trans_cal]">Archive Calendar</label></td> 
    6262        </tr> 
    6363    </table> 
     
    232232    <br/> 
    233233     
     234<div class="postbox"> 
     235    <h3 class="hndle" style="padding: 10px; margin: 0; text-align: center;"><span>Avertisement</span></h3> 
     236    <div class="inside"> 
     237        <p align="center"> 
     238            <a target="_blank" href="http://xhostbd.com"><img src="http://xhostbd.com/advertisements/advert1.jpg"/></a> 
     239        </p> 
     240    </div> 
     241</div> 
     242 
    234243<a name="how_to_use"></a> 
    235244<div class="postbox"> 
     
    295304    <p>Developer: <a href="http://facebook.com/imran2w">M.A. IMRAN</a><br /> 
    296305    E-Mail: imran2w@gmail.com<br /> 
    297     Web: <a href="http://i-onlinemedia.net">www.i-onlinemedia.net</a></p><br/> 
     306    Web: <a href="http://i-onlinemedia.net">www.i-onlinemedia.net</a> - <a href="http://xhostbd.com">www.xhostbd.com</a></p><br/> 
    298307    <p align="justify">This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or ( at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License</a> for more details.</p><br/> 
    299308    <p align="justify">A project of <a href="http://i-onlinemedia.net">Islamic Online Media</a> - An extra-ordinary Islamic website of Bangladesh based on pure tawheed and sahih sunnah.</p> 
     
    309318}(document, 'script', 'facebook-jssdk'));</script> 
    310319 
     320    <div class="fb-like-box" data-href="https://www.facebook.com/xhostbd" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div> 
     321    </td> 
     322    <td> 
     323    <div id="fb-root"></div> 
     324<script>(function(d, s, id) { 
     325  var js, fjs = d.getElementsByTagName(s)[0]; 
     326  if (d.getElementById(id)) return; 
     327  js = d.createElement(s); js.id = id; 
     328  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=330291150372591&version=v2.0"; 
     329  fjs.parentNode.insertBefore(js, fjs); 
     330}(document, 'script', 'facebook-jssdk'));</script> 
     331 
    311332    <div class="fb-like-box" data-href="https://www.facebook.com/islamiconlinemedia" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div> 
    312333    </td> 
     
    336357     
    337358    global $bddp_hook; 
    338     $bddp_hook = add_options_page('Bangla Date Display Settings', 'Bangla Date Display', 8, 'bangla-date-display', 'bddp_options_page'); 
     359    $bddp_hook = add_options_page('Bangla Date Display Settings', 'Bangla Date Display', 'edit_pages', 'bangla-date-display', 'bddp_options_page'); 
    339360} 
    340361 
  • bangla-date-display/trunk/readme.txt

    r1502426 r1565605  
    22Contributors: imran2w 
    33Developer link: http://facebook.com/imran2w 
    4 Donate link: https://paypal.me/imran2x 
    54Tags: Bangla, Bengali, Bangla Date, Bangla Calendar, Bangla Archive, Bangladesh, Bangla Time, Bangla Season, Hijri Date 
    65Requires at least: 3.0 
    7 Tested up to: 4.6 
     6Tested up to: 4.7 
    87Stable tag: trunk 
    98 
     
    4443* E-Mail: imran2w@gmail.com 
    4544* Website: [www.i-onlinemedia.net](http://www.i-onlinemedia.net) 
    46 * Donate to this plugin: https://paypal.me/imran2x 
    4745 
    4846 
    4947== Changelog == 
     48 
     49= 8.5.1 = 
     50* Bug fixed. Now all shortcodes can be used in a single line without any problem. Example: [bangla_date] [english_date] [hijri_date].... etc. 
    5051 
    5152= 8.5 = 
  • bangla-date-display/trunk/translator.php

    r1261710 r1565605  
    1414} 
    1515 
    16 if ( $bddp_options['trans_cmnt'] == "1" ) { 
     16if ( isset($bddp_options['trans_cmnt']) == "1" ) { 
    1717    add_filter('comments_number', 'en_to_bn'); 
    1818    add_filter('get_comment_count', 'en_to_bn'); 
    1919} 
    2020 
    21 if($bddp_options['trans_num'] == "1") { 
     21if(isset($bddp_options['trans_num']) == "1") { 
    2222    add_filter('number_format_i18n', 'en_to_bn', 10, 1); 
    2323} 
    2424 
    25 if($bddp_options['trans_cal'] == "1") { 
     25if(isset($bddp_options['trans_cal']) == "1") { 
    2626    add_filter('get_archives_link', 'bddp_en_to_bangla'); 
    2727    add_filter('wp_list_categories', 'bddp_en_to_bangla'); 
Note: See TracChangeset for help on using the changeset viewer.