Pages addon

Event needed for Page addon
Done

 

 <http://forumhulp.com/> fhcom
Webhosting, Custom MODs, Technisch beheer, MOD installaties, Webdesign  en website ontwikkeling

 

Van: Matt Friedman [mailto:notifications@github.com] 
Verzonden: donderdag 16 oktober 2014 9:42
Aan: phpbb-extensions/pages
CC: Forumhulp.com
Onderwerp: Re: [pages] Pages addon (#37)

 

In entity/page.php:

> @@ -496,6 +496,18 @@ public function get_content_for_display($censor_text = true)
>              if ($this->content_html_enabled())
>              {
>                      $content = htmlspecialchars_decode($content, ENT_COMPAT);
> +
> +                    /**
> +                    * Event to modify html pages
> +                    *
> +                    * @event pages.content.display
> +                    * @var  content        content of page
> +                    * @var  route       route from page
> +                    * @since 3.1.0-RC5
> +                    */
> +                    $route = $this->get_route();
> +                    $vars = array('content', 'route');
> +                    extract($phpbb_dispatcher->trigger_event('core.pages.content.display', compact($vars)));

Move this event down, just before return $content so it will be useful to other extensions that may want to access the content when non-html encoded. You can set a local variable $content_html_enabled = $this->content_html_enabled() so you can pass content_html_enabled to the new event too, for use in your add-on.

You should also then pass $uid, $bitfield, $options, $censor_text to the event so they can be available too.

—
Reply to this email directly or view it on GitHub <https://github.com/phpbb-extensions/pages/pull/37/files#r18941529> .Afbeelding verwijderd door afzender.