Skip to content

Instantly share code, notes, and snippets.

View EveraldoReis's full-sized avatar

Everaldo Reis EveraldoReis

View GitHub Profile
@EveraldoReis
EveraldoReis / gist:3e48b8c107c3a7ddcab2
Created February 26, 2015 23:36
modulo html owl carousel
<h1 class="ambiente">Nossos Ambientes</h1>
<div id="owl-example" class="owl-carousel">
<div>
<a href="#">
<img width="100%" src="images/layout/categorias/banheiros.png" alt="" />
</a>
</div>
<div>
<a href="#">
<img width="100%" src="images/layout/categorias/closets.png" alt="" />
@EveraldoReis
EveraldoReis / gist:4cd8bceae2b9c46ed2d8
Created February 14, 2015 00:24
replace text in k2 items
UPDATE `rb2_k2_items` SET introtext = REPLACE(introtext, 'required_value', 'replacement') WHERE `catid` IN (id,id,id)
<block type="cms/block" name="block_name">
<action method="setBlockId"><id>block_code</id></action>
</block>
{{block type="cms/block" block_id="block_code"}}
{{block type="catalog/product_list" category_id="79" template="catalog/product/list_random.phtml"}}
@EveraldoReis
EveraldoReis / gist:f7a26dab064054a505ca
Last active August 29, 2015 14:12
Dinamic Grid v1.3
<!DOCTYPE html>
<html>
<head>
<title>GRID</title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<style>
body{
padding: 0;
margin: 20px;
text-align:center;
@EveraldoReis
EveraldoReis / AbstractClass.php
Created November 25, 2014 08:23
PHP - OO - Multiplos construtores
<?php
class AbstractClass
{
function __construct()
{
$a = func_get_args();
$i = func_num_args();
if (method_exists($this,$f='__construct'.$i)) {
call_user_func_array(array($this,$f),$a);
}
@EveraldoReis
EveraldoReis / gist:69799d18adab08819b3c
Last active August 29, 2015 14:10
com_contact - gmap
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function init_map() {
geocoder = new google.maps.Geocoder();
geocoder.geocode({'address': '<?php echo $this->contact->address; ?>'}, function (results, status) {
var myOptions = {
zoom: 14,
center: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
@EveraldoReis
EveraldoReis / sql-copy-k2-items.sql
Created November 13, 2014 14:29
Copiar items entre tabelas K2 (Joomla!)
INSERT INTO <database>.<table_prefix>_k2_items(`title`,
`alias`,
`catid`,
`published`,
`introtext`,
`fulltext`,
`video`,
`gallery`,
`extra_fields`,
`extra_fields_search`,
@EveraldoReis
EveraldoReis / mailchamp_curl.php
Last active August 29, 2015 14:08
MailChamp - Add to list
<?php
// Inicia a sessão
session_start();
// Proteção Cross-Site Request Forgery
if(!isset($_POST['csrf']) || $_SESSION['csrf'] != $_POST['csrf'])
exit('Sessão não é válida!');
// mudar us9 de acordo com seu server mailchamp
<?php
/**
* @version 2.6.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>