Search Results

Search found 21 results on 1 pages for 'dkinzer'.

Page 1/1 | 1 

  • How does this JavaScript/JQuery Syntax: (function( window, undefined ) { })(window) work?

    - by DKinzer
    Have you ever taken a look under the hood at the JQuery 1.4 source code and noticed how it's encapsulated in the following way: (function( window, undefined ) { //All the JQuery code here ... })(window); I've read an article on JavaScript Namespacing and another one called "An Important Pair of Parans," so I know some about what's going on here. But I've never seen this particular syntax before. What is that undefined doing there? And why does window need to be passed and then appear at the end again?

    Read the article

  • Is it possible to have anonymous purchases with ubercart without the creation of a new user account?

    - by DKinzer
    I would like to be able to have anonymous users purchase a product but not have a new account created when they purchase it. Unfortunately the creation of a new user seems to be very tightly integrated into ubercart's ordering system. And, because the order module is part of the ubercart core, it's behavior cannot be overridden easily. One possibility for overriding is the creation of a new user account by supplying ubercart with an bogus anonymous account: hook into hook_form_alter at $form_id == 'uc_cart_checkout_review_form' because this is where ubercart first associates the $order to an uid. Add our submit function to the queue: //Find out if the user is anonymous: global $user; if ($user->uid == 0 ) { //Load a previously created anonymous user account $anonymous_user = mymodule_get_anonymous_user(); //create the order and assign our anonymous_user_id to it $order = uc_order_load($_SESSION['cart_order']); $order->uid = $anonymous_user->uid; uc_order_save($order); //Assign the global user our anonymous user uid $user->uid = $anonymous_user->uid; } But what I really need is to be able to have an anonymous purchase without being forced to create a new account, this solution does not work for me. Apart from which, using this technique will automatically login the anonymous_user into our bogus_anonymous_user account. Which is definitely something I don't want. Is there a better non-duct-tape way around the creation of a new user account for anonymous purchases in ubercart?. AND FYI - at this point I'm kind of stuck with ubercart so I cannot use something else. Thanks! D

    Read the article

  • How do I dynamically change ubercart's default messages from my module

    - by DKinzer
    There are some products for which I would like to have a special checkout complete message that would differ from the default. I know that I could probably do this by changing the default redirect page to something else. [And I'm not sure if that would introduce another problem] However, I would like to know if there is a standard/better way of approaching this problem. Thanks!, D

    Read the article

  • Is the javaScript not part of the DOM?

    - by DKinzer
    Why is it that scripts can still function even after the code used to create them is removed from the DOM? I ran into a situation where I wanted to prevent a broken script from running (@see my post). In my attempt to come up with a solution I wrote an extension with the following line (just to see what would happen). //doc is passed here because this script is running as a firefox extension outside //of the document context. $('script', doc).remove(); I assumed that this would remove all the scripts from the DOM, which it did, and that therefore no scripts would run on the page, which is not the case. I would love to know more about what's behind this behavior.

    Read the article

  • Is there a JQuery DOM manipulator/CSS selector equivalent class in PHP?

    - by DKinzer
    I know that I can use DOMDocument and DOMXPath to manipulate XML files. But, I really love JQuery, and it would be great if there was something more like JQuery in the PHP world that I could use for sever side DOM manipulation. NOTE: I'm only interested here in how JQuery Selects and Manipulates the DOM, not all the other parts of JQuerry (I guess you can say just the Pop and the Sizzle parts).

    Read the article

  • Is there a way to disable all other Java Scripts other than my own with Grease Monkey

    - by DKinzer
    I need help getting a Grease Monkey with JQuery Script to run on a broken site. I'm trying to get the following GM script to run, but the page I want it to work on has a JS error and my JS does not get executed. // ==UserScript== // @name BILL INFO PAGE ALTER // @namespace http://jenkinslaw.org // @description Alter the web page in order to pretty print // @include http://www.legis.state.pa.us/cfdocs/billinfo/bill_history.cfm?* // @require http://code.jquery.com/jquery-1.4.2.min.js // ==/UserScript== */ (function() { //Make a copy of the bill table var bill_table = $('.main_table').clone(); //empty the whole lot $(body).empty(); //append the bill back to the dom. $(body).append(bill_table); }()); Thanks! D

    Read the article

  • Is there a JQuery equivalent class/library in PHP?

    - by DKinzer
    Soon I'll be working on a batch script where I will need to make some changes to some HTML files. I know that I can use DOMDocument and DOMXPath to manipulate these files. But, I really love JQuery. It would be great if there was something a lot more like JQuery in the PHP world. Does anybody know if something like that exists? Thanks! D

    Read the article

  • Can Drupal terms in different Taxonomies be synonymous?

    - by DKinzer
    Let's say Taxonomy_A is associated to Node_Type_A Taxonomy_B is associated to Node_Type_B. AND Both Taxonomy_A and Taxonomy_B have a term called 'yellow'. Is it possible to make terms 'yellow' synonymous, so that if I'm looking at a list of 'yellow' stuff, I'm seeing content of both types (Node_Type_A, and Node_Type_B)?

    Read the article

  • Does anyone have experience simultaneously running a Drupal and Wordpress site and redirecting some

    - by DKinzer
    This is a really weird question and I apologize: I've been asked if it's possible not to import our blog from Wordpress to Drupal but just keep it in Wordpress as an archive and re-direct our users say from hostname/blog/... to hostname/wordpress/... when a URL matches the Wordpress URL pattern. I've never heard of anyone trying this and I'm wondering about pitfalls and whether or not it's even possible. Thanks! D

    Read the article

  • Can Drupal Taxonomy module be used to categorize court records and briefs?

    - by DKinzer
    I'm currently working on project that involves moving a database of documents for court records and briefs over to a Drupal environment. One of the problems that we are faced with is how to index these documents. In our court district, records and briefs all have a docket number which is assigned to a case. The interesting thing is that when multiple cases merge the docket numbers associated to the case become synonymous: Case 1, documents have Doceket No. A Case 2, documents have Docket No. B If case Cases 1 and Case 2 merge, then Docket No. A = Docket No. B My first inclination is to create Docket Vocabulary and have the terms of this Taxonomy be the docket numbers. I am hoping to take advantage of the fact that terms can be synonymous. I understand that there are several functions in the Taxonomy module that I may be able to take advantage, of including: taxonomy_get_synonyms taxonomy_get_related But I'm having problems convincing my collegues that this is the way to go, and frankly I'm not certain it's the right solution either. If anyone has had a similar issue and can offer some guidance as to how to move forward, I would greatly appreciate it. Thanks! D I've asked a related question (which I would also need to answer in order to move forward with this solution): http://stackoverflow.com/questions/2656247/can-drupal-terms-in-different-taxonomies-be-synonymous

    Read the article

  • How do I add a custom mod_rewrite rule to a Drupal site on module install?

    - by DKinzer
    I have a Drupal-6 module that needs the following mod-rewrite rule added to the .htaccess file of the site's root directory in order to work. RewriteRule ^blog/([0-9]{4}/[0-9]{2}/[0-9]{2}/.*)$ wordpress/$1 How can I add this line pro-grammatically when the module is first installed? Can I use custom_url_rewrite_inbound(&$result, $path, $path_language) to do this? If so, could you please show me an example? Thanks, D

    Read the article

  • What is the difference between an object's scope and it's context in javascript?

    - by DKinzer
    In the vernacular, scope and context have a lot in common. Which is why I get confused when I read references to both, such as in the quote below from an article on closures: Scope refers to where variables and functions are accessible, and in what context it is being executed. (@robertnyman) As far as I can tell, context is just a reference to an object. Can someone please explain what exactly is context, as used, for instance, in the jQuery syntax, $(selector, context). And is an object's scope the same at it's context?

    Read the article

  • How does this JavaScript/JQuery Syntax work: (function( window, undefined ) { })(window)?

    - by DKinzer
    Have you ever taken a look under the hood at the JQuery 1.4 source code and noticed how it's encapsulated in the following way: (function( window, undefined ) { //All the JQuery code here ... })(window); I've read an article on JavaScript Namespacing and another one called "An Important Pair of Parens," so I know some about what's going on here. But I've never seen this particular syntax before. What is that undefined doing there? And why does window need to be passed and then appear at the end again?

    Read the article

1