ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

php function in embedded templates

September 20, 2007 5:08am

Subscribe [0]
  • #1 / Sep 20, 2007 5:08am

    I use a php-function, called conversie_string, to do some string-manipulation.

    This function is defined in one template, but is also used in templates which are embedded into this template. Normally, this works fine, but sometimes visitors of our website get this error:

    Fatal error: Call to undefined function conversie_string() in
    /var/www/html/mfsys/core/core.functions.php(631) : eval()‘d code on line 20

    All the templates are cached, but they have a different refresh-interval.

    How can I solve this problem?

  • #2 / Sep 20, 2007 10:50am

    Robin Sowell

    13255 posts

    The best way?  Make it a plugin- or possibly an extension- but in truth, it sounds like a natural for a plugin.  Take a look at something simple like Find and Replace for some tips- and then the developer docs have an example plugin tutorial- it sounds like you could just tweak that tutorial to end up with what you want.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases