WordPress.org

Ready to get started?Download WordPress

Forums

Appointment Calendar
Display button only (14 posts)

  1. anilreddy0102
    Member
    Posted 1 year ago #

    I want to display only the schedule an appointment button. Currently a calender is displayed below that button which I don't want. Once the user clicks the button there is popup calender which is enough for me. Please tell me how to remove the calender below the button

    http://wordpress.org/extend/plugins/appointment-calendar/

  2. FARAZFRANK
    Member
    Posted 1 year ago #

    Hi Anilreddy0102,

    Here the instruction:

    Just find div <div id='calendar'> in appointment-calendar-shortcode.php file, available in plugin directory.

    Change (remove id attribute from div tag)
    <div id='calendar'>
    To
    <div>

    We will add a new button Short-Code in next release.

    Thanks & Happy New year.
    -Frank

  3. adch
    Member
    Posted 6 months ago #

    Hi Frank,

    Can you help me into this: i wabt to display into a page only the button and only the calendar into another.
    Thanks

  4. FARAZFRANK
    Member
    Posted 6 months ago #

    Hi Adch,

    For this you need to do some logical programming in short code file.

    Something Like This:

    If(PageId == 1) {
       ...
       // Show only button on this page
       // comment out calendar div code
       ...
    }
    
    If(PageId == 2) {
       ...
       // Show only calendar on this page
       // comment out button HTML code
       ...
    }

    [1] Create 2 pages and add short-code [APCAL]

    Assuming
    Page Name - Id
    --------------
    Page1 - 43
    Page2 - 45
    --------------

    [2] File where to code: appointment-calendar-shortcode.php

    [3] Modify code and add conditional logic (line no 633 to 649)

    <?php
    // get page id
    if(isset($_GET['page_id'])) {
        $PageID = $_GET['page_id'];
    }
    
    if($PageID == 43) {
    ?>
    <!---Add New Appointment Button--->
    <div id="bkbtndiv" align="center" style="padding:5px;">
        <button name="addappointment" class="apcal_btn apcal_btn-primary" type="submit" id="addappointment">
            <i class="icon-calendar icon-white"></i> <?php
            if($AllCalendarSettings['booking_button_text'])
                echo $AllCalendarSettings['booking_button_text'];
            else echo _e("Schedule New Appointment", "appointzilla");
        ?>
        </button>
    </div>
    <?php }
    if($PageID == 45) {?>
    <!---Show appointment calendar--->
    <div id='calendar'>
        <div align="right">Appointment Calendar Powered By: <a href="http://appointzilla.com/" title="Appointment Scheduling plugin for WordPress" target="_blank">AppointZilla</a></div>
        <!---AppSecondModal For Schedule New Appointment--->
        <div id="AppSecondModalDiv" style="display:none;"></div>
    </div>
    <?php } ?>

    And you done.
    Let me know if all works fine.
    (Note: Please make sure plugin deactivated before doing editing in code if your site is live. )

    Best Regards
    Frank

  5. adch
    Member
    Posted 6 months ago #

    hi Frank,
    i have already done something like your solution, but just hiding the 'id=calendar'.
    My code:
    $pageID = get_the_ID();
    if ($pageID == 401) echo "<div>";
    else echo "<div id='calendar'>";?>

    It is working.

    A point not so important because i use the above solution, but a question:
    ....before that i tried a way with AJAX (hide/show the <div id='calendar'>, but when i hit the 'show' button displays only the table with the arrows and the button "Today" and not the calendar. If then click an arrow or the "Today" btn, it displays the calendar.
    Where is the error?

    Thanks in advance

  6. FARAZFRANK
    Member
    Posted 6 months ago #

    Hi Adch,

    May be possible you are not activating modal dialog window, that's why only inner HTML of modal window code appearing only.

  7. adch
    Member
    Posted 6 months ago #

    Frank really thankyou for your quick replies.
    The modal dialog window i will check it later.

    But just now figured that your plugin conflict with my theme Bretheon.
    To be more spesific actually it conflicts with the css (ex. i have a background image and when your plugin is enabled it hides the background image).
    Do you know to tell me what to check?

    Thanks in advance

  8. adch
    Member
    Posted 6 months ago #

    I suppose jquery conflict?

  9. adch
    Member
    Posted 6 months ago #

    when i enable the plugin i get this notice "The plugin generated 3 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin."

    Is there any solution?

    thanks anyway

  10. adch
    Member
    Posted 6 months ago #

    Also i have a big problem with my Media library when i try to insert an image into a post via "add Media" button....it doesn't display the uploaded images and i can't upload a new one!!

  11. FARAZFRANK
    Member
    Posted 5 months ago #

    But plugin loads all JS & and CSS files only on Appointment Calendar specified pages.

    So, there should no chance to JS conflicts or break other WordPress functionality.

    Deactivate plugin and try to upload media files.

    If any problem then, let me know.

    Thanks
    Frank

  12. adch
    Member
    Posted 5 months ago #

    I understand what you say, but unfortunately it conflicts and i don't know what to do actually.
    If disable the plugin everything works fine.

    In addition with those error i wrote in my earlier reply, also the favicon.ico doesn't work....strange...too strange!
    I don't know, maybe my theme has problems...i try to check it again and i'll write back!

    Thanks anyway

  13. adch
    Member
    Posted 5 months ago #

    also when i activate the plugin i get this error:
    "The plugin generated 3 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin."

    I don't have any idea what it says

  14. FARAZFRANK
    Member
    Posted 5 months ago #

    Hi,

    Could you please send/share all error snaps?

    And list the plugin you are using with Appointment Calendar.

    Thanks
    Frank

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic