Wordpress: how to write a reply to comment using jQuery

Friday October 3, 2008

Recently Cristiano Fino issued a profit Plugin for Wordpress can add two links to every comment by a post (perhaps you have installed a similar, given that the directory Wordpress.org I have a couple astray, but as an Italian software would be the event to honor the excellent work done by Cristiano). These Link (reply & shares), meet and / or quote the author of a commentary by running the boring operation to insert the character at (@) to indicate to whom it is addressed. In this tutorial I will explain - in the medium-expert users - how to add these two features "on hand", without any all'istallazione Plugin. Also exploit the capabilities of jQuery to the party in Javascript. The technique is exhibiting the same I used to introduce this feature in this blog.

Note: The use of a plug is the best solution for those who often tend to change their Wordpress template or at least, has in anticipation of doing so. This tutorial will only show how to perform targeted in the code Wordpress and is dedicated to the most curious.

Changing the file comments.php

The first change to make is to enter the link "reply" and "units" within each comment. To do this, edit the file comments.php located in the folder of our theme. This file contains all the instructions that allow you to view the comments at the end of a post. The section that interests us (which may vary slightly from issue to issue) is the loop creation of the various comments, recognizable by:

Continue to read ... "

Related Post

Insert Flash movies with SWFObejct in Wordpress 2.0

Thursday, May 1, 2008

After running in several patches and tests to find the best way to put content assets - such as Flash - in Blog, I think that they have finally solved once and for all the problem. I had already discussed the issue of SWFObject Library 2.0, useful in achieving sites with content-type Adobe Flash. Fortunately Unijimpe had a Plugin for Wordpress able to exploit the potential of SWFObject and simplify the inclusion in the Post. To use it, in fact, simply activate the plugin and enter inside the post:

CODE:
  1. /wp-content/uploads/ 2006 / 05 / 7762 . swf , 231 , 132 [ /SWF ] [SWF] / wp-content/uploads / 2006 / 05 / 7762. Swf, 231, 132 [/ SWF]

You can also use the Plugin to insert Flash content even within the same blog, such as Sidebar:

PHP:
  1. <div id= "sidebar">
  2. "boton.swf" , "100" , "22" ) ; ?> <? php wp_swfobject_echo ( "boton.swf", "100", "22");?>
  3. </ div>

Related Post

Flash CS3: communicating with a Web Server

Friday December 14, 2007

ActionScript 3.0 introduces a number of formidable means of communication, some totally new, others revised and improved from the previous version of ActionScript. We begin to see changes as a way to interact with a Web Server in the case of a simple communication between Flash and a page with PHP XML response. First of all, the object XML no longer exists! In ActionScript 3.0 have been introduced new classes, some of which are dedicated to the "backwards".

Note: XML classroom (along with related classes) ActionScript 2.0 XmlDocument was renamed and moved to the package flash.xml. It is included in ActionScript 3.0 to ensure compatibility with older versions.

In ActionScript 2.0 communicating with a Web Server was often resolved using the coupled objects LoadVars and XML, using the method sendAndLoad() LoadVars (See: Flash: LoadVars and XML to send data POST). Now things are changing, but only just get used to new names and objects. As outlined in the manual, in fact:

Continue reading ... "

Related Post

RESTTest: useful extension for FireFox

Friday, November 2nd, 2007

RESTTest Here's an interesting extension for Firefox (today issued the patch 2.0.0.9) written by Kris Zyp. RESTTest can run and send the check to receive a URL using the REST protocol, choosing between the canons methods GET or POST (possibly customized) .
RESTTest can be used to verify the operation of XMLHttpRequest and then to test applications that use Ajax. We can then simulate easily and quickly XHR requests and replies.
This extension is designed specifically to work with a REST resources and supports all HTTP methods.
In the field POST / PUT you can enter all the parameters that we intend to send to our test page, in the standard syntax:

variabile1 = value1 & variabile2 = value2 &[...] variable value n = n

This extension is useful in testing RSS Feed for a site or when any paramteri any RPC service.

Related Post

Flash: LoadVars and XML to send data POST

Friday July 20, 2007

Here's a great way to send data POST to a Web Server. We'll use two objects: an object LoadVars to send and receive XML to object (in case we expect a return formatted in XML). Use the subject LoadVars Flash is useful both for the creation of runtime properties that will be seen as POST variables for the opportunity to specify the shipping method: POST or GET.

First of all we create the object LoadVars that will be used to send:

Actionscript:
  1. = new LoadVars ( ) ; var s_lv: LoadVars = new LoadVars ();

To this we can add variables in POST so very simple:

Actionscript:
  1. ; s_lv. title = "Hello";
  2. ; s_lv. subtitle = "Hello World";

We prepare the item you receive a reply from the Web Server (in stdout) - if you can do so by a PHP echo:

Actionscript:
  1. = new XML ( ) ; var r_xml: XML = new XML ();
  2. ; r_xml. ignoreWhite = true;

At this point there is that sending:

Actionscript:
  1. "http://miodominio.com/miapagina.php" , r_xml, "POST" ) ; s_lv. sendAndLoad ( "http://miodominio.com/miapagina.php" r_xml, "POST");

The method sendAndLoad () of LoadVars is very ultile because it allows you to specify the object of return (in this case our object r_xml XML) and the method of shipment (in our case POST).
Finally just put on hold:

Actionscript:
  1. ( success: Boolean ) { r_xml. onLoad = function (success: Boolean) (
  2. success ) { if (success) (
  3. / / Processing result
  4. )
  5. );

Related Post