WordPress.org

Ready to get started?Download WordPress

Forums

WP.osC plugin not working with 2.9.1 (1 post)

  1. tdiaz
    Member
    Posted 4 years ago #

    The plugin appears to work, when the [shortcodes] are encountered they are simply replaced with '1' instead of any real output.

    It's a shame that the author of this plugin appears to have simply folded up shop and bailed rather suddenly. It's larger part, WP.osC is an absolutely great contribution to osCommerce in general. The WordPress theme structure is so much nicer than the crazy crap that osC uses.

    It does not appear to work with 2.9.x, and I've really not found any real evidence of it working at all aside from the demo site.

    Looking at the docs for 'the_content', I can't find much in the way of parameters for it, to it, etc. either.

    I'm suspecting that it's not even working with mySQL properly perhaps. The plugin works on the sidebar/widget though. Just not the posts/page [shortcodes].

    I also can't find any solid reference to '$the_content', just 'the_content', is there an issue with using the function name as a variable name?

    function wposc_check($the_content) {
    ////[wposc:new][wposc:best][wposc:rand]
    
    	if (strpos($the_content, "[wposc:new]")!==FALSE){
    		preg_match_all('/\[wposc:new\]/', $the_content, $matches, PREG_SET_ORDER);
    		foreach($matches as $match) {
    			$the_content = preg_replace("/\[wpos1c:new\]/", wposc_tag('new'),$the_content,1);
    		}
    	}
    	if (strpos($the_content, "[wposc:rand]")!==FALSE){
    		preg_match_all('/\[wposc:rand\]/', $the_content, $matches, PREG_SET_ORDER);
    		foreach($matches as $match) {
    			$the_content = preg_replace("/\[wposc:rand\]/", wposc_tag('rand'),$the_content,1);
    		}
    	}
    	if (strpos($the_content, "[wposc:best]")!==FALSE){
    		preg_match_all('/\[wposc:best\]/', $the_content, $matches, PREG_SET_ORDER);
    		foreach($matches as $match) {
    			$the_content = preg_replace("/\[wposc:best\]/", wposc_tag('best'),$the_content,1);
    		}
    	}
        return $the_content;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.