Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author WillBontrager

    (@willbontrager)

    Azurite, I have no idea whether or not it works with Multisite. Don’t know what a Multisite is, actually, unless you mean a WordPress installation that runs more than one site.

    Give it a try, please. Then let us know your findings with a response on this thread.

    Will

    Thread Starter Azurite

    (@azurite)

    Hi,
    Yes, I mean a WordPress installation that runs on more than one site. Or, a WordPress Network, if that’s the more “official” term (I see them both used in the Codex).

    From what I can tell, it SEEMS to be working, in the sense that it’s replacing my <?php and ?> code properly, but I’m still working on some errors to see what’s going on–if it’s my PHP or something else.

    Plugin Author WillBontrager

    (@willbontrager)

    Azurite, don’t use <?php and <? for the Insert PHP code. Instead, put it between [insert_php] and [/insert_php] tags.

    Try this on a test post to see if it’s working:

    [insert_php]
    echo 'Server date and time is: ';
    echo date('l, F j, Y \a\t G:i:s');
    [/insert_php]

    See http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin.php and http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php for information about how to use Insert PHP.

    Will

    Thread Starter Azurite

    (@azurite)

    Oh, I know. I’ve been using the shortcode. I’m trying your “test” method first, to see if the issue I am having is with the PHP I’m trying to insert by putting it into an independent test.php file, and I’m trying to debug that.

    Right now it’s saying

    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/username/public_html/wp-content/themes/twentythirteen/test.php on line 4

    and I’m trying to figure out what’s wrong with that (since there doesn’t appear to be any whitespace)….

    Plugin Author WillBontrager

    (@willbontrager)

    Cool. You’re getting there.

    This shouldn’t be a PHP support area. The error message your getting could from any of a number of things. Check for a missing semi-colon, perhaps on the previous line.

    Will

    Thread Starter Azurite

    (@azurite)

    Okay, I’m pretty sure it works on multisite, because the errors I am seeing match up with the sort in the instructions for common troubleshooting, about a line being “eval’d” on a certain line. I’ll troubleshoot the PHP part elsewhere…but is there anything useful to know about how the plugin can include files from elsewhere?

    Plugin Author WillBontrager

    (@willbontrager)

    Normal PHP require()/include()/…_once()/readfile()/get_file_contents() should work.

    [insert_php]
    include( $_SERVER['DOCUMENT_ROOT'] . '/filename.php' );
    [/insert_php]

    Will

    Plugin Author WillBontrager

    (@willbontrager)

    Gratuitous post in order to mark thread resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Does it work with Multisite’ is closed to new replies.