external-script

Joomla 2.5 Get User Data from External Script

只谈情不闲聊 提交于 2019-12-30 14:55:28
问题 I need to get the information of the user that's currently logged in to Joomla from a program outside of Joomla itself. I upgraded from 1.5 to 2.5, and what I had before doesn't work anymore. <?php define( '_VALID_MOS', 1 ); include_once( 'globals.php' ); require_once( 'configuration.php' ); require_once( 'includes/joomla.php' ); $option="test"; $mainframe = new mosMainFrame( $database, $option, '.' ); $mainframe->initSession(); $my = $mainframe->getUser(); $joomla_name = $my->name; $joomla

Chrome extension: load and execute external script

我的未来我决定 提交于 2019-12-18 13:21:37
问题 I have trouble loading and executing external js-script into my chrome extension. Looks the same as this question, but I still cant't figure out why it doesn't work in my case. The idea is that I want to have in my content script some default function which should parse a web-page content. And for some specific web-pages I want to load and use specific parsers, so I try to load proper js-script for a wep-page, and this script shoud extend functionality of default parser. By now I try only

Can browser handle a disposable JS file?

五迷三道 提交于 2019-12-13 23:28:58
问题 I want to hide the source of JS from direct access. So I thought to produce a disposable JS file. I use a temporary session cookie. The cookie is set before including JS file and expires then. rather than the idea itself, my exact question is that how a browser manipulate the JS file? Does it cache a copy of JS file as soon as we write <script> tag or the script tag is just a reference and the browser should have access to JS file all times? sample asp source: <html> <body> <% response

Javascript not executing when placed in external script file

天大地大妈咪最大 提交于 2019-12-11 22:09:31
问题 I'm building an ASP.NET MVC site where I need a tag editor, similar to the one used on Stack Overflow. I've already looked up how to accomplish the necessary autocompletion with jQuery UI, but I've run into a problem: when I place the script in an external .js file, it doesn't execute . Here is my test.html : <html> <head> <meta charset="utf-8"> <title>Test</title> <script src="http://jqueryui.com/jquery-1.4.2.js"></script> <script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>

How to execute a function from a Python script (with parameters) in PHP? [closed]

☆樱花仙子☆ 提交于 2019-12-11 16:46:30
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I've recently been working on a web crawler with PHP and as a newish PHP coder, I'm not the most advanced. I also know a decent bit of Python and there are a few things I am able to do in Python yet not in PHP. Is there any way for me to run a Python function with parameters

jQuery only allow one version

时光总嘲笑我的痴心妄想 提交于 2019-12-10 21:44:01
问题 I have a third party script that is including jquery (which causes things to break). I am using 1.6 version and the external script is using an older version. How can I force that only one version of jquery is loaded and it is the version I have on the page not the one loaded externally? 回答1: This is actually pretty easy to do, using jquery.noConfict(); <script src='jquery-1.6.js'></script> <script> var jq16 = jQuery.noConflict(); </script> <script src='jquery-1.4.2.js'></script> <script> var

How to do input task in maven antrun plugin

旧街凉风 提交于 2019-12-10 09:46:22
问题 I created a maven project and i'm trying to run an external script. In this external script, i use read command to ask a question and get an answer. It works if i do a sudo mvn package with exec-maven-plugin But, but, but : If i do a sudo mvn package , my script doesn't stop at read command. If i do a sudo mvn release:prepare with exec-maven-plugin, my script doesn't stop at read command. If i do a sudo mvn release:prepare with maven-antrun-plugin, my script doesn't stop at read command. And

Continue execution after calling php passthru() function

╄→гoц情女王★ 提交于 2019-12-08 06:42:52
问题 When using php passthru() function, default is to stay until the external script execution ends. PHP manual says ::::: "If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends." - http://php.net/manual/en/function.passthru.php I want to collect external script data for specific time e.g. for

How to do input task in maven antrun plugin

a 夏天 提交于 2019-12-05 21:50:14
I created a maven project and i'm trying to run an external script. In this external script, i use read command to ask a question and get an answer. It works if i do a sudo mvn package with exec-maven-plugin But, but, but : If i do a sudo mvn package , my script doesn't stop at read command. If i do a sudo mvn release:prepare with exec-maven-plugin, my script doesn't stop at read command. If i do a sudo mvn release:prepare with maven-antrun-plugin, my script doesn't stop at read command. And obviously, i need to do a release :) I tried to to change the first line of my script (#/usr/bin/bash,

How to load third-party javascript tag asynchronously which has document.write

荒凉一梦 提交于 2019-12-03 20:43:03
问题 We give out a piece of javascript tags such as <script src="http://ours.com/some.js"></script> which site owners put on their site like http://example.com and in this javascript tag we want to dynamically include a third-party js such as which can have document.write in it, but of course if we try to include it by conventional method, var script_tag = document.createElement('script'); script_tag.type = 'text/javascript'; script_tag.src="http://third-party.com/some.js"; document.getElementById