[dev] How to include "html code" for an app right?
Michael Rubinsky
mrubinsk at horde.org
Mon Jan 5 16:50:08 UTC 2009
Andre,
It seems that you still need to do a bit of research. It doesn't
appear that you understand the structure of a Horde app. Try reading
some of the presentations at http://horde.org/papers - in particular
there is a good one by Jan http://www.horde.org/papers/fosdem2005/ It
might be a bit outdated, but it will probably give you a better
understanding of the structure of the app, what code goes where etc....
Quoting Andre Pawlowski <sqall at h4des.org>:
>
>
> Michael Rubinsky wrote:
>>
>> Quoting Andre Pawlowski <sqall at h4des.org>:
>>
>>>
>>> Well, my code for the output is always after the <html> tag. I
>>> don't know how I can change this. I've looked at other Horde
>>> applications and they have their html source in the <body> tag
>>> section. I have no clue how I can do this. Can you tell me how to
>>> include my source code to have it in the <body> tag section?
>>
>> This is impossible to answer without knowing the structure of your
>> application's views or templates....you just need to make sure that
>> your outputting your HTML at the appropriate spot. Look at any
>> other horde application to see how they include various templates
>> in relation to the html content the application generates.
>>
>>
>> Thanks, mike
>>
> You are right. It's impossible to answer this question. I've took a
> look at Turba and still don't understand how to include my html code
> right. Well, Turba includes /lib/base.php and then some other *.inc
> and the footer.inc.
>
> My application uses the skeleton base.php and I include the
> /lib/base.php as well. But when I include my base.php of the skeleton
> (its not changed) then I've got a header and a footer and the rest of
> my html code falls behind the footer. I take a look at the base.php
> and this only uses some php skripts of Horde which Turba uses as well.
>
> Well, perhaps you can help me when I show you the source of the
> base.php which includes header and footer.
>
> <?php
> // Check for a prior definition of HORDE_BASE (perhaps by an
> auto_prepend_file
> // definition for site customization).
> if (!defined('HORDE_BASE')) {
> @define('HORDE_BASE', dirname(__FILE__) . '/../..');
> }
>
> // Load the Horde Framework core, and set up inclusion paths.
> require_once HORDE_BASE . '/lib/core.php';
>
> // Registry.
> $registry = &Registry::singleton();
> if (is_a(($pushed = $registry->pushApp('kastalia',
> !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
> if ($pushed->getCode() == 'permission_denied') {
> Horde::authenticationFailureRedirect();
> }
> Horde::fatal($pushed, __FILE__, __LINE__, false);
> }
> $conf = &$GLOBALS['conf'];
> @define('KASTALIA_TEMPLATES', $registry->get('templates'));
>
> // Notification system.
> $notification = &Notification::singleton();
> $notification->attach('status');
>
> // Define the base file path of Kastalia.
> @define('KASTALIA_BASE', dirname(__FILE__) . '/..');
>
> // Kastalia base library
> require_once KASTALIA_BASE . '/lib/Kastalia.php';
>
> // Start output compression.
> Horde::compressOutput();
>
> I hope know it's possible to help me. Thanks.
>
> --
>
> Andre Pawlowski
>
> -------------------------------------------------------------------
>
> Genius is one percent inspiration and 99 percent transpiration.
> -Thomas Alva Edison
>
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
More information about the dev
mailing list