Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • andydog Friend
    #178568

    Hi
    I have an old 1.5 template site (Kulanite) that I’ve moved to new webspace.
    I’m getting the following deprecated message when inspecting the element (an image that isn’t showing up):

    Function eregi(‘) is deprecated in <b>/home/content/c/a/t/cath2621/html/templates/ja_kulanite/ja_templatetools_1.5.php</b> on line <b>250</b>

    I’ve done a web search and found that ‘eregi’ should be replaced with ‘preg_match’ but I get a further message if I do that.

    This is the line in my ja_templatetools_1.5.php file:

    if (eregi(“gif”, $file) || eregi(“jpg”, $file) || eregi(“png”, $file))

    Thanks
    Andy

    Saguaros Moderator
    #459137

    Hi Andy,

    You could replace that line:
    [PHP]if (eregi(“gif”, $file) || eregi(“jpg”, $file) || eregi(“png”, $file))[/PHP]
    with this one:
    [PHP]if (preg_match(“/(gif|jpg|png)/i”, $file) )[/PHP]

    andydog Friend
    #459159

    Perfect, thanks Saguaros

    andydog Friend
    #459160

    Klauzser, yes – for any new Joomla installations, I’ll use 2.5.
    The template I used was an old one and only compatible with 1.5

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  andydog 12 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum