PHP

Ajax Easy Module commit 7/4/2016

Right so had an idea for a new Drupal ajax module, to help front-enders hook in to drupal and return ... well what ever they want via ajax.

Meant to be used by people who know what they are doing ...
check out the nice looking code https://www.drupal.org/commitlog/commit/85685/bfa378bb8f5983697229736d6312440ded1b1417

sandbox project link https://www.drupal.org/sandbox/taggartj/2701559

Wordpress Backend Ajax example for custom meta field

Some times you need to make it easier for your clients to use their sites !  and having an  ajax based selector  for  featured images / or second featured images  …  I made this because when  I imported the clients data (700+) posts  I got the  image path data in a csv file … so there needed to be a way to set featured images  quickly  & a set a second  standout image.  And there was now way of knowing what image to use as the featured image.  So yes I set some by default but this is the way they wanted it.

Curl & Jason in PHP

a basic curl app, using jason data this is just a note to self :) but shows how to post jason data via curl , then read the data sent and save to database , backbone is better but who cares this way works too...

Drupal 7 Ajax Custom Module Example

This is an example  module that  shows some ideas of what you can do  drupal  ajax in a custom module  I will make a custom auto suggest box with the form api , and has ajax call back with the menu call back , stick that in a custom block, then do some jquery stuff to make it all work.

PRE COMMENT :
I Know I  am breaking some best practices  - but that  fine this is just an example ...
if you understand what I am doing below then you are smart enough to  understand what to do next.

Ajax Simple Auto Suggest - Jquery

So you want to make an auto suggest  and you don’t want to use a jquery plug in that is fine
here is an example of how to do it  with Jquery .load() !

You need 2 files for testing :

1) index.html , or index.php – front end
2) return.php  - returned results

3) Loader Gif ()

Code for  your front end file:

Drupal & infusionsoft php example

Working with drupal and infusionsoft ,  so your client has infusionsoft and want to interact with your drupal site .
so you installed the infusionsoft module and need to do custom things that "cant" be done with rules or (d6 conditional actions)  Like checking if user has a tag or if exists in infusionsoft or what ?! 
so then you go looking for examples of php & infusionsoft and find a lot of crap !  So lets have a look at this,

First create a custom module:
example mymodule.info