Jump to content
Sign in to follow this  
makeylon

1.3 Boxes not showing php code

Recommended Posts

makeylon

I have php code in boxes to display posts on the front page. Upgraded to 1.3, and now the boxes are empty and no longer displaying the posts. Did changes include somehow preventing php code from being used in boxes? Project M Stock Trading

Share this post


Link to post
Share on other sites
Andrew

I'm guessing you are using Shortcodes; yes we'll fix this... there needs to be a 'do_shortcode' function re-added.. Will put out 1.3.0.2 for you in the morning. Ap

Share this post


Link to post
Share on other sites
makeylon

Actually, no, not using shortcodes. I put the php code directly into the box html code area. (yes, I am using exec-php).

Share this post


Link to post
Share on other sites
Andrew

Hmm.. well I'll add the do_shortcode stuff.. we'll see what happens. I'll need to see what exec php is adding their processing to, to understand what's going on.

Share this post


Link to post
Share on other sites
makeylon

Okay, thank you. I'm assuming a shortcode would basically do the same thing, as all it is really is like an include in the code. But yes, I have php code directly in the Box.

Share this post


Link to post
Share on other sites
Andrew

Hey Mark, Solved your nav problem and patched, The PHP problem is different, and it requires us do some things that aren't ideal. e.g. use `the_content()` function used for posts and apply it to the boxes. Anyway, I'll look at it, but no promises.

Share this post


Link to post
Share on other sites
makeylon

Thanks Andrew, I appreciate it. As for the boxes, um... i'm using the_excerpt() ... (would you like me to post the code I'm using?) Thing is, it was working beautifully in 1.2.3. I'm not sure I understand why it wouldn't work now. Let me know what you come up with, or if there is a different solution to what I"m trying to accomplish, or I might have to go back to 1.2.3.

Share this post


Link to post
Share on other sites
Andrew

Mark, WordPress 3.1 moved to a new way of handling queries. Because of this, we changed from using `the_excerpt` and `the_content` because it was creating issues. Also, those functions add a lot of processing that we didn't think was good for Boxes. Exec PHP hooks onto those functions, but I know there are some PHP plugins that use shortcodes instead. For example, `[php my php goes here]` that would be a much better way of getting this done.

Share this post


Link to post
Share on other sites
makeylon

Using a shortcode that still requires you to include the php code sure seems like its a little redundant. Adding a plugin to use a shortcode that includes the php in the shortcode? I generally hate using plugins, if I can easily avoid it, because you never know if the plugins will continue to be developed, debugged, and it makes the site more bulky and sometimes has issues with maxing out memory, etc. However... Any suggestions on which plugin to use so I can add titles and excerpts to the boxes? Including the ability to have just a specific category, and/or select just a single random post from a specific category or the latest post from one or more categories? (Sounds like a great feature to add to a future version of PlatformPro...lol).

Share this post


Link to post
Share on other sites
makeylon

Bryan, I wound up using a plugin called Shortcode Exec PHP and it seems to be working perfectly. I still think its redundant to have to use a plugin to turn my php code into shortcode just to use the shortcode in the box when I used to be able to put the php code directly into the box in HTML mode (using php-exec). In addition, the php code was where I would expect to find it. Now I'll have to go into the box to find the shortcode, then find the shortcode in the plugin settings in order to change them. The two benefits to using this plugin this way, however, is that first, if I ever use the same code in more than one place, I can just use the shortcode. And two, at least it works, even if its a round about way, since just putting the php code in the box no longer works. Thanks for the suggestion. I'd still like to be able to just put the php code directly where I want it, but this solution works. Thanks you.

Share this post


Link to post
Share on other sites
slowcolor

I just upgraded and my Exec PHP broke as well in Box. While it shows the result correctly in the box. When the box is called in a page it does not display the content at all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×