How to Retrieve the ID of the Current Category in Clip-Bucket v2
Last Updated on Tuesday, 16 April 2013 09:08 Written by Richi González Wednesday, 17 April 2013 12:00
Hello,
As I’ve been asked two times already how to get the ID of the current category being browsed in Clip-Bucket v2, I decided to write an article for it so everyone can learn how do it by themselves. Knowing how to do this, you can display specific advertisement for each category, for example.
Learn MoreHow to Get the Value of an Element’s Attribute with jQuery using attr()
Last Updated on Wednesday, 13 February 2013 08:35 Written by Richi González Wednesday, 13 February 2013 12:00
Hello,
Lately that I’ve been working a lot with jQuery, I have noticed how easy and small functions get endless possibilities for improving code. In this article, you will learn how to get the value of any attribute of an element with jQuery using attr()
We will imagine we have the following HTML code:
Learn MoreHow to Get a String’s Length with Javascript
Last Updated on Friday, 8 February 2013 04:29 Written by Richi González Sunday, 10 February 2013 12:00
Hello,
Learn how to get a string’s length with a very simple Javascript property: length. This is really useful when you want to do, for example, field validations with JS; you evaluate the length and then do something.
Learn MoreHow to Retrieve Users’ IP Address with PHP
Last Updated on Monday, 24 December 2012 10:24 Written by Richi González Sunday, 23 December 2012 12:00
Hello,
In a website I was making, I had a rating system in which votes were by unique IP address. It was very easy to retrieve it, yet there are people that may not know so I share it with all of you.
Learn MoreHow to Loop Through an Array in Clip-Bucket with {section}{/section}
Last Updated on Wednesday, 19 September 2012 07:18 Written by Richi González Thursday, 27 September 2012 12:00
Hello,
When you dynamically need to output records from a database inside your Clip-Bucket, by this moment, you may have noticed that Clip-Bucket is powered by Smarty template engine, therefore, you cannot use a while() loop, for example, like you would normally do in native PHP. In this article we will review the use of {section}{/section} to loop through a MySQL records array.
Difficulty level: Medium (if you know how to use loops in PHP, you’ll find it easier)
1. Create the query to retrieve records from your database (in this example I’ll use queries for MySQL, but you can use any database)
Learn More
Recent Comments