WillBontrager
Forum Replies Created
-
Well, that is interesting indeed.
Glad it’s still working for you.
Will
Right, only in posts or pages.
Will
Because Insert PHP evals PHP code within content, it is unsurprising it conflicts with others that utilize PHP code in similar manner. I would say just don’t use Insert PHP in such cases.
Will
Insert PHP uses the eval() function to run the PHP code between [insert_php] tags.
When eval() runs, the code is subject to the environment it is running in, the rest of the WP code used to process the page. Which may be why the $_GET[‘id’] was misbehaving earlier. Don’t know without seeing the code you were using. I think id is used to determine which post to publish.
I don’t know why $i is misbehaving. $ti works fine.
[insert_php] $ti=0; $ti++; echo $ti; [/insert_php]
Suggest trying a different variable name when the current one behaves different than expected.
Will
JDDunn9, post the code you are testing with. I’ll try to duplicate the issue.
Will
Forum: Plugins
In reply to: [Woody code snippets - Insert Header Footer Code, AdSense Ads] If statementThe PHP code works with the plugin only when it isn’t broken up. In other words, it needs to be all one block of PHP code, complete in itself.
The reason is because the code between the [insert_php] and [/insert_php] markers are processed separately, unlike a regular PHP page where the entire page is scanned and processed.
This works:
[insert_php] if(true) { echo "other stuff"; } [/insert_php]
But this, because each chunk isn’t complete in itself, will not work within the PHP plugin.
[insert_php] if(true): [/insert_php] other stuff [insert_php] endif;[/insert_php]
And neither will this work.
[insert_php] if(true){ [/insert_php] other stuff [insert_php] } [/insert_php]
Insert PHP will successfully process only PHP code complete within itself between [insert_php] and [/insert_php] markers.
Will
Federico Bustamante, thank you for that.
Will
Forum: Plugins
In reply to: [Woody code snippets - Insert Header Footer Code, AdSense Ads] require issueRovaron, when the error message contains “: eval()’d code on line…”, then the issue is almost certainly with the PHP code being processed instead of with the plugin itself.
Put your code in a stand-alone PHP script. Upload the PHP script to your server and type its URL into your browser. Probably, you’ll get a similar error message minus the “eval()’d code” part.
I don’t know what the rest of your code looks like, so I’m guessing at a solution. My thought is your PHP installation does not allow https://… URLs in the require() statement. See
https://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopenTry this solution:
require( $_SERVER["DOCUMENT_ROOT"] . "/distribuidor-oficial/wp-content/themes/toplife/class.phpmailer.php" );
I hope it works for you.
Will
I have not tested the Lightbox Plus plugin with the Insert PHP plugin, but from what you experience there seems to be some incompatibility between them. Regrettably, I am unprepared to spend the time to study the Lightbox Plus plugin code and test to try to find the reason.
A choice of one or the other needs to be made unless someone finds a viable solution.
Perhaps there are other plugins available that will run PHP code in posts and pages that are compatible with Lightbox Plus. Or, there may be plugins similar to Lightbox Plus that play nice with Insert PHP.
Will
Forum: Hacks
In reply to: How to reverse effect of wpautop() and wptexturize() on multi-line shortcodeYes, get_the_content() was exactly what I was looking for.
Thank you, Spencer Cameron!
Will
Forum: Everything else WordPress
In reply to: Disturbing Subversion TermsThank you, fonglh!
Issue resolved.
Turns out the form is visible only when logged in.
It appears, from looking at the form, that an account at Subversion is unnecessary.
Will