WordPress.org

Ready to get started?Download WordPress

Forums

Appointment Calendar
Position of Text vs. Calendar on Page (21 posts)

  1. RandyKing
    Member
    Posted 1 year ago #

    I am testing an appointment page and do the following:

    ---------------------------
    Blah blah blah stuff here introducing the calendar, providing instructions, and all that...

    [APCAL]
    ---------------------------

    The result is that the booking calendar is FIRST on the page and my text comes after it. I need to have this instructional text ABOVE the calendar, not below it! I may be able to force the issue using DIVs, but it seems to me that the plugin should leave text exactly where I place it.

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

  2. FARAZFRANK
    Member
    Posted 1 year ago #

    Hi RandyKing,

    Here the instruction:

    1. Open file appointment-calendar-shortcode.php, file path = wp-content\plugins\appointment-calendar

    2. Search comment (around line no. 647)

    <!----- Add New Appointment Button -------->


    3.
    Make a div before it, like:

    <div id="mycustomtext">
       Blah blah blah stuff here
       Introducing the calendar
       Provide instructions
    </div>
    
    <!----- Add New Appointment Button -------->

    Thanks, you done.
    -Frank Faraz

  3. bailey88
    Member
    Posted 1 year ago #

    Making a div before the calender to include content/text will fix the positioning problem, but still doesn't really help if the shortcode is used in the middle of a page.

    The problem occurs because the shortcode function is using 'echo', rather than 'return'. Here is a fix which will position the calender exactly in the corrct position by 'returning' the whole function at the end.

    Open appointment-calendar-shortcode.php, near the top of the page (around line 5) is the function 'appointment_calendar_shortcode()'. Paste the code in bold shown below at the very start of the function.

    `function appointment_calendar_shortcode()

    { ob_start();

    Now go to the very bottom of the page and find the closing bracket for the function (//end of short code function). Paste the code shown below in bold just BEFORE the closing bracket.

    $apcalpositionfix = ob_get_clean();
    return $apcalpositionfix;

    Save the changes and upload the file to your FTP. Refresh the page and the calender should be in the correct position.

  4. FARAZFRANK
    Member
    Posted 1 year ago #

    Hi Bailey88,

    Thanks for your kind support.

    Frank

  5. Michael Aronoff
    Member
    Posted 1 year ago #

    Bailey88, no matter what I do your code is not working.

    Is it possible an update broke it?

  6. FARAZFRANK
    Member
    Posted 1 year ago #

    Hi MasterK,

    What problems are you facing Text vs. Calendar postion?

    Let me know to help you.

    Thanks
    Frank

  7. Michael Aronoff
    Member
    Posted 1 year ago #

    I want to put text above the calendar and I tried to follow what Bailey88 wrote but it broke the page and I got only a blank screen. So for now I have used your method of editing appointment-calendar-shortcode.php however that will be lost by plugin updates to I prefer to find a solution that will not be lost.

    Other than this issue I love the plugin.

  8. FARAZFRANK
    Member
    Posted 1 year ago #

    Hi MasterK,

    Soon we will add an option to display customizable text above the calendar, I added that option in my to-do list. Many user required this option.

    But at now you can follow these instruction to achieve this.

    Thanks & Have Fun
    Frank

  9. comm3dieu
    Member
    Posted 1 year ago #

    Greetings.

    I utilized the amendments to the .php file for this plugin and it seems to have shut down my entire site with an error sign. I was wondering how I can restore it? I literally cannot access the backend to my site at all.

  10. Michael Aronoff
    Member
    Posted 1 year ago #

    Remove the plugin folder via ftp. That will get your site back.

    Then when doing PHP edit's I suggest you use a PHP editor or a program like Dreamweaver that checks your code for problems as you work. That way if you miss a comma, semi-colon or anything that would break your code it sill show you that before you upload.

  11. comm3dieu
    Member
    Posted 1 year ago #

    Thank you so very much.

    I greatly appreciate you.

  12. a.ankit
    Member
    Plugin Author

    Posted 1 year ago #

    @comm3dieu

    It is a good practice to deactivate the plugin before editing its code.

    In case there is some syntax error in the code, wordpress will not activate the plugin.

    -Ankit

  13. comm3dieu
    Member
    Posted 1 year ago #

    I used the ob_start coding from bailey88. It was the only coding that worked to truly embed the calendar in the body of my site. But now something is happening where not only is the calendar not embedded in my site but I am now seeing two calendars. I didn't even change the code and this is the result after not having dealt with the calendar for a couple of days. Was there an update or something that would result in that problem? And how can I ensure that the calendar is permanently embedded in the body of my site so that I don't have to worry about the ugly look of the calendar being stretched out over the entire top of the site?

  14. ctg77
    Member
    Posted 11 months ago #

    Hi i want to put the appointment calender on the sidebar how do i do that?

  15. ctg77
    Member
    Posted 11 months ago #

    Hi i want to put the appointment calender on the sidebar how do i do that?

  16. FARAZFRANK
    Member
    Posted 11 months ago #

    Hi Ctg,

    Best way to add a link-button in text-widget and redirect through on booking page. Many of Appointment Calendar users using this technique.

    Here button code:

    <a href="# your booking page url here #" class="mybutton">BOOK ONLINE</a>
    <style>
    	a.mybutton {
    		background-color:#0044CC;
    		font-size:14px;
    		color:#FFF;
    		text-decoration:none;
    		display:block;
    		width:100px;
    		padding:10px;
    		font-weight:bolder;
    		text-align:center;
    		font-family:"Times New Roman", Times, serif;
    		border-radius:5px;
    	}
    	a.mybutton:hover {
    		color:#1982D1;
    		border-color:#3278BE;
    		text-decoration:none;
    		font-weight:bolder;
    	}
    </style>

    Greetings
    ~Frank

  17. paulinelephew
    Member
    Posted 4 months ago #

    Hi FARAZFRANK,

    Impossible to find the comment in the file around line 647, any suggestion please?

  18. FARAZFRANK
    Member
    Posted 4 months ago #

    Hi Paulinelephew,

    Sorry we made some changes in Ver-2.7.1.

    Please open below link in new tab:

    http://plugins.svn.wordpress.org/appointment-calendar/tags/2.7.1/appointment-calendar-shortcode.php

    Now find the below comment line:

    <!---Schedule New New Appointment Button--->

    Do same with file appointment-calendar-shortcode.php available in Appointment Calendar directory.

    Thanks
    Frank

  19. RKS213
    Member
    Posted 4 months ago #

    This all doesn't seem to be an appropriate solution to the issue at all. I don't mean to be rude but editing a plugin's php file to edit your page's content is never the right answer. This is a wonderful plugin so far, but it you should really consider encapsulating your plugin so it is self-contained and doesn't effect other elements on the page. This will allow the users to use their visual/text editor feature of WordPress when using your plugin.

  20. RKS213
    Member
    Posted 4 months ago #

    I found a very good example why this is not ideal. I was wondering why my use of your Booking Instructions setting wasn't working correctly and it turns out you don't even allow divs. I know you print the available elements one can use, but a div is such a basic building block of the web I didn't even consider looking.

    You also don't allow spans. So even using a band aid to fix the lack of divs wouldn't even work.

    It doesn't accept classes and escapes them when you try to use it.

    As you can see, the reasons to stop using your proposed solution are mounting. This really needs to be upgraded form "not appropriate" as I mentioned above to "needs immediate attention."

    Perhaps if we investigated the why you need to make your calendar render outside of the normal page flow we can all help resolve this issue together. It really is a good plugin but this single reason makes it intrusive and borderline unusable for the serious developer.

  21. FARAZFRANK
    Member
    Posted 4 months ago #

    Hi RKS213,

    I know this is not a proper solution.

    That's is why we have added "Booking Instruction" Settings in version 2.7 & 2.7.1.

    It enable admin to add instructions which appear on the top of Booking Button.

    This thread is about the older versions of Appointment Calendar.

    May this helps you. We appreciate your suggestion, we will keep in mind & try to code using modular programing, classes, oops.

    Kind Regards
    Frank

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic