| View previous topic :: View next topic |
| Author |
Message |
Tedmiller
Joined: 14 Apr 2006 Posts: 98
|
Posted: Tue Apr 25, 2006 1:19 pm Post subject: Demo Info box |
|
|
Following the Modules documentation, I tried creating an info box like the one in your Demo. When I couldn't get it to appear in the calendar's Nav Bar, I resorted to copying your Demo Info -- but it still won't appear (I did enable it). Can you please look at my code and tell me what I did wrong? Or is there a setting in the CSS file that needs to be changed to allow it to appear?
INFO_TEXT.PHP CODE (this should look awfully familiar):
'>
'>
"> |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Tue Apr 25, 2006 1:38 pm Post subject: |
|
|
| I can't see the code, but did you enable it in Admin -> Default Options or in your options? |
|
| Back to top |
|
 |
Tedmiller
Joined: 14 Apr 2006 Posts: 98
|
Posted: Tue Apr 25, 2006 1:45 pm Post subject: Info Box code |
|
|
Yes I did. Sorry, let me try this again and disable the HTML code in the post this time. As you'll see (hopefully), all I did was change the text in the center of the Demo Info box and change references to "demo_info" in the register_module code.
info_box code:
'>
'>
"> |
|
| Back to top |
|
 |
Tedmiller
Joined: 14 Apr 2006 Posts: 98
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Tue Apr 25, 2006 2:10 pm Post subject: |
|
|
| If you are using the default example, in register_module.php, change the 'include' part to 'navbar'. If that does not work, please paste the contents of your resgister_module.php without the <?php parts please. |
|
| Back to top |
|
 |
Tedmiller
Joined: 14 Apr 2006 Posts: 98
|
Posted: Tue Apr 25, 2006 2:17 pm Post subject: Trying again |
|
|
Phew... I did have it set for navbar. Let's try this again without php... and to be doubly sure, I replaced the HTML karats with (( and ))
register_module:
global $_cal_modules;
# register our module name
###########################
$_cal_modules['info_box']['display_name'] = 'Info Box';
$_cal_modules['info_box']['parents'] = array('navbar');
$_cal_modules['info_box']['include'] = 'info_box/info_box.php';
$_cal_modules['info_box']['priority'] = 100;
info_box:
/* vim: set expandtab tabstop=4 shiftwidth=4: */
//
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2005 eXtrovert Software |
// +----------------------------------------------------------------------+
// | This source file is subject to the license you agreed to when this |
// | software package was installed. A copy of the license has also been |
// | distributed with this software. See LICENSE.txt under the base |
// | install directory. If you do not have a copy of this license file, |
// | or obtained this software through a 3rd party without agreeing to |
// | the license, please cease using this software and send an e-mail to |
// | license@extrosoft.com. |
// +----------------------------------------------------------------------+
//
// $Id: calendar_links.php,v 1.3 2005/08/26 01:44:46 ian Exp $
//
((table width='100%' style='border-collapse: collapse' class=' echo(_CAL_CSS_BOUNDING_TABLE_) '))
((tr class=' echo(_CAL_CSS_BOUNDING_TABLE_) '))
((td class=' echo(_CAL_CSS_BOUNDING_TABLE_) '))
((table border=0 style='border-collapse: collapse' width='100%'))
((tr)) ((th class=' echo(_CAL_CSS_HEADING_) ')) echo("Demo Info") ((/th)) ((/tr))
((tr class=" echo(_CAL_CSS_SPACER_TINY_) "))((td class=" echo(_CAL_CSS_SPACER_TINY_) ")) ((/td))((/tr))
((tr class=" echo(_CAL_CSS_CAL_CONTENT_) " valign="middle"))
((td align="left" style='padding: 2px;'))
((b))·((/b))Enter dates in MM/DD/YYYY format (e.g., 7/12/2007).
((br /))((b))·((/b))You can also use plain English (e.g., August, Jan, Dec 1981, next June)
((br /))((b))·((/b))or math from the current date (e.g., +176 days, -3 weeks, 12/12/1979 -52 years)
((br /))
((/td))
((/tr))
((/table))
((/td))
((/tr))
((/table)) |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Tue Apr 25, 2006 2:33 pm Post subject: |
|
|
Set this line:
$_cal_modules['info_box']['include'] = 'info_box/info_box.php';
to
$_cal_modules['info_box']['navbar'] = 'info_box/info_box.php'; |
|
| Back to top |
|
 |
Tedmiller
Joined: 14 Apr 2006 Posts: 98
|
Posted: Tue Apr 25, 2006 2:37 pm Post subject: AAAAAARRRRRGGGGHHHH! |
|
|
| Yeah, that worked. |
|
| Back to top |
|
 |
|