WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: JavaScript Logic] Just doesn’t work

[Resolved] [Plugin: JavaScript Logic] Just doesn’t work

Viewing 7 replies - 1 through 7 (of 7 total)
  • Justin Tadlock

    @greenshady

    WordPress God

    Seems to be working fine to me. Maybe you should post some examples and links to specific problems.

    WordPress 2.7
    I have a plugin wp-spam free that loads /wp-content/plugins/wp-spamfree/js/wpsf-js.php so Logically I only need that on my contact page. Of course it loads globally.

    Javascript logic is installed and nothing configured in the settings page.

    1- In a wp-page I call the spam free plugin <!–spamfree-contact–>
    2- In the meta box javascript logic section, I enter under JavaScript URL: http://mysite.com/wp-content/plugins/wp-spamfree/js/wpsf-js.php which is the plugin script loading file.
    3- This should create a conditional only for that contact page as I understand it.
    Page is saved and viewed.
    4- contact form loads correctly and the script is seen in the source
    5- However, http://mysite.com/wp-content/plugins/wp-spamfree/js/wpsf-js.php loads on every other page in the site also and is seen in the source as an active address. as follows

    <!-- Protected by WP-SpamFree v1.9.6.8 :: JS BEGIN -->
    <script type="text/javascript" src="http://mysite.com/wp-content/plugins/wp-spamfree/js/wpsf-js.php"></script>
    <!-- Protected by WP-SpamFree v1.9.6.8 :: JS END -->

    I expected this script to be hidden in other pages, is that correct?

    I tried using the javascript logic setting page to load this script only on the contact page by using

    set one:
    custom file url: http://mysite.com/wp-content/plugins/wp-spamfree/js/wpsf-js.php

    and Script Logic: is_page(‘contact’)

    which is the page name and slug. Still the script loads in every site page and post.

    Just to be sure, I created another page with the contact form code in it with a different name and slug. This time excluding the conditional instruction in the meta box. I assume it should fail to load the form. In fact it did load the form correctly, proving the conditional call had somehow failed to exclude other pages/posts.

    No cache is running, using arthemia theme, php 5.2.5

    So, I can’t make it work… which may be my fault in the way I have used it. Other wise please advise.

    Many thanks for your help, I’m sure it’s something simple.

    Justin Tadlock

    @greenshady

    WordPress God

    You should ask the wp-spam free author how to get his or her script to only load on the contact page. JavaScript Logic does nothing with other plugins’ scripts.

    So, you saying that javascript logic can’t be used to control other plugin javascripts? If so, I completely missunderstood your plugin. I thought is could control the dreadful dead weight of javascripts that spawn through plugins. My appoligies, Greenshady.

    If your plugin worked as I hoped, what a joy that would be!

    [deleted double post]

    Justin Tadlock

    @greenshady

    WordPress God

    So, you saying that javascript logic can’t be used to control other plugin javascripts?

    Yes, that’s what I’m saying.

    I’ll add a note in the FAQ in the next update to make this clear.

    Thanks for clarifying that. Topic resolved

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: JavaScript Logic] Just doesn’t work’ is closed to new replies.
Skip to toolbar