Likes This!

This add-on is deprecated.

Happily, community member Enlil updated this add-on to work with recent versions of concrete5!

Check it out!

 

This simple block sits on a page and let's a logged-in user say that they like a page. The block keeps track of who likes the page, displays the listing, and operates fully in AJAX (although will degrade gracefully if a browser does not have JavaScript enabled.) The block also populates a page attribute that will let the page search keep track of how many people have liked a page.

This block is used as an example in the how-to "JavaScript, jQuery and concrete5," found here:

http://andrewembler.com/concrete5/javascript-jquery-and-concrete5/

and here:

https://www.concrete5.org/documentation/how-tos/developers/javascript-jquery-and-concrete5/

It should be a useful example of the following:

 

1. jQuery UI and concrete5's dialog functionality are included intelligently on page load

2. The block view template intelligently references tools and controller actions.

3. The block automatically includes JavaScript by including view.js in its directory. This JavaScript is used by the block view template.

4. The dialog class is used to pull data in from a tools script, through AJAX.

5. The response from the block's controller action is loaded into the page seamlessly.

6. jQuery UI effects are used.

7. Everything will degrade gracefully even when JavaScript is disabled.

 

Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On concrete5.org