wuchuanbin / php-calendar

Automatically exported from code.google.com/p/php-calendar
0 stars 0 forks source link

Embed doesn't work #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run embed script

What is the expected output? What do you see instead?
when you follow the updated instructions for embedding php calendar it throws 
this error message "Warning: Missing argument 1 for get_header_tags(), called 
in /path/to/calendar/includes/calendar.php on line 685 and defined in 
/path/to/calendar/includes/calendar.php on line 654" and it doesn't load any of 
the stylesheets or javascript.  If I manually load stylesheets it generates 
this error "Catchable fatal error: Object of class __PHP_Incomplete_Class could 
not be converted to string in /path/to/calendar/includes/html.php on line 122" 
when adding or deleting an event (it does add or delete, just doesn't say that)

What version of the product are you using? On what operating system?
2.0 rc2

Original issue reported on code.google.com by Joedel...@gmail.com on 22 Jan 2013 at 4:10

GoogleCodeExporter commented 8 years ago
The way you are supposed to embed the header is through <?php header('static'); 
?>

In other words, the embed example code is 

<?php include 'path/to/php-calendar/includes/embed_setup.php'; ?>
<html>
  <head>
    <title>Example Embedded Page</title>
    <?php embed_header("static"); ?>
  </head>
  <body>
    <h1>Example Page Header</h1>
    <?php include 'path/to/php-calendar/includes/embed.php'; ?>
  </body>
</html>

EXCHANGE embed_header("static"); FOR header('static'); and the errors will be 
gone. 

The calendar won't be styled b/c the intention of the embed is to style the 
calendar according to your theme. 

Original comment by ad...@iberoamericamedia.com on 7 Feb 2013 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by sproctor@gmail.com on 2 Oct 2014 at 6:20