functions

problem med variable_get i tpl

Jag har skapat ett eget tema och har använt mig av funktionen variable_get() i exv. page-front.tpl.php. Funktionen hämtar text som jag vill ha presenterat på
förstasidan.
Det har fungerat ett tag, men nu har ett skumt fel uppstått, funktionen fungerar inte i mitt tema längre, dock fungerar funktionen om jag testar i Garland.
Den fungerar även på modulnivå, så anropet är rätt och den hittar värdena. Vidare har jag testat med variabeln "site_name", för att säkerställa värdena i db.
I page-front.tpl.php anropas funktionen, men den levererar bara default-värdet.

1 comment · Read more
dvessel's picture

custom callback.

I was thinking about a custom callback function to do 3 things:

<

ol>

  • Speed up execution time. Remove any intermediate functions that aren't needed. Go directly to the renderer from the callback. (I know you've been thinking about this one merlin. I'd like to see your solutions to this.)
  • 2 comments · Read more
    meba's picture

    using ereg* functions

    I just noticed 35 occurences of ereg* functions in Drupal code (most of them in modules, 4.6.6).
    This short story is just a memo to advise all developers NOT to use ereg* functions and use preg_match instead, which is significantly faster. I would also like to do same stats in Drupal 4.7 and collect some volunteers to provide patches replacing ereg with preg_match.

    bash-3.00$ grep -Ri "ereg" * | wc -l
    35
    bash-3.00$

    Any volunteers?

    1 comment
    Syndicate content