migration from cmsms, custom php script bugs

  • Unknown's avatar

    Hi,
    i’m taking a website which was run by someone else on CMSMadesimple to WordPress. One piece of custom PHP script doesn’t function like it should. The guy who wrote it used this Smarty template engine, which isn’t supported for WordPress i believe. It is for wordpressMU though I can’t seem to make that one work for now.
    It’s a script that takes the title links of the news module posts in CMSMS and does some further processing on it.
    I want to rewrite it so it takes the title links of the posts in WordPress.
    How should i go about doing a thing like this? Should I be using The Loop in any way.

    De php gives the following error:

    Warning: Invalid argument supplied for foreach() in … on line 17

    Line 17 is:

    // laad de links van de news feeds
    $urllinks = array();
    foreach($params[‘items’] as $item) {
    $url = $item->link;
    $title = strtolower($item->title);
    // strip trailing “/somenumber” part
    $url = ereg_replace(“(/news/[0-9]*)/(.*)”,”\1/”, $url);
    $urllinks[$title] = trim($url);
    }

    this $urllinks should make an array but I think that array is empty cause it cannot find that $urllinks.

    I hope someone can help me a bit in figuring this out whilst I’m doing some php tutorials :)

    Thanks!
    Struba

  • Unknown's avatar

    Hi, Struba. Looks like Greek to most of us. :) You’re at the wrong wordpress. We are hosted by wordpress.com and have no access to .php files. The folks at wordpress.org are the ones who can help you, so just click on over to:

    http://wordpress.org/support

  • The topic ‘migration from cmsms, custom php script bugs’ is closed to new replies.