We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Crazy time output issue

Development and Programming

Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

I’m still not entirely getting why it’s flaking out like it is- though I have an inkling. What if you do the conditional a la:

{if event_start_time != 0}
       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

Robin, I get the same result.

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

Just wanted to bump this and see if anyone has any new ideas.

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

Robin,

Further testing finds that it’s when the following code gets called, the issue shows up.

if ($EXT->active_hook('weblog_entries_tagdata') === TRUE)
{
    $tag_content = $EXT->call_extension('weblog_entries_tagdata', $tag_content, $occurrence, $this);
    if ($EXT->end_script === TRUE) return $tag_content;
}

If I remove it from my plugin then the issue goes away however special fields such as FieldFrame ones that modify their output using the weblog_entries_tagdata hook are no long processed by it, and only raw data is output (whatever is in the DB).

Is there an alternative way to do this? Is there something specific in the weblog_entries_tagdata call that processes times? I have a function to replace standard weblog entry tags, which works fine (see below). If there’s a better way to do this I’d love to know. Any help would be appreciated. Thanks!

// replace any existing custom field tags
if( array_key_exists($var_key, $occurrence) ) {
            
    // make sure the content is formatted per field settings
    if( array_key_exists($var_key . "_ft", $occurrence) ) {
        if ( ! class_exists('Typography'))
        {
            require PATH_CORE.'core.typography'.EXT;
        }
                    
        $TYPE = new Typography;
        $format = array('text_format' => $occurrence[$var_key . "_ft"]);
        $content = $TYPE->parse_type($occurrence[$var_key], $format);
    } else {
        $content = $occurrence[$var_key];
    }
        $tag_content = $TMPL->swap_var_single($var_key, $content, $tag_content);
    }
}
       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.