Skip to content

Instantly share code, notes, and snippets.

@agustinhaller
agustinhaller / Twitter.methods.php
Created October 29, 2012 12:38
twitter methods (sortwit)
<?php
//session_start();
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
require_once("includes/all.inc.php");
require_once("includes/Twitter.class.php");
@agustinhaller
agustinhaller / Twitter.class.php
Created October 29, 2012 12:38
twitter class
tweetExists
@agustinhaller
agustinhaller / Twitter.class.php
Created October 24, 2012 17:57
twitter class
<?php
/****** STYLE GUIDES *****/
/* About parameters: */
/*
To make it flexible, all parameters have to be optional (that's why it receives an array) but there are some that are hard to remember and could
be the default for certain scenarios. So if the parameter needed is in the array $parameter use it, if not use
the default fallback.
*/
<?php
/*ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
*/
require_once("includes/all.inc.php");
require_once("includes/header.inc.php");
require_once("includes/footer.inc.php");
@agustinhaller
agustinhaller / cron update fix
Created October 1, 2012 19:16
cron update fix
// This function will get only the latest 5000 followers of certain user and update them in the db
// First we ask Twitter for fresh followers
$fresh_followers = array();
$tmhOAuth = initTmhOAuth($organizer_username);
$tmhOAuth->request('GET', $tmhOAuth->url('1/followers/ids'), array(
'stringify_ids' => true,
'screen_name' => $organizer_username
));
<?php
$config = array();
$config["site_url"] = "JuegoKickButtowski.com.ar";
$config["site_name"] = "JuegoKickButtowski.com.ar";
$config["full_domain"] = "http://juegokickbuttowski.com.ar";
$config["domain_extension"] = "com";
$config["domain_country"] = "ar";
$config["primary_keyword"] = "Juegos de KICK BUTTOWSKI";
$config["secondary_keyword"] = "KICK BUTTOWSKI";
@agustinhaller
agustinhaller / follow
Created September 28, 2012 16:43
follow
function followUser($user_id, $tw_username_to_follow)
{
$response_array = array();
$tmhOAuth = new tmhOAuth(array(
'consumer_key' => TWITTER_CONSUMER_KEY,
'consumer_secret' => TWITTER_CONSUMER_SECRET,
));
$response_array = array(
@agustinhaller
agustinhaller / fancybox
Created September 28, 2012 15:06
fancybox
// Open all mighty fancybox
$.fancybox(
'<div id="create-rule-wrapper">'+
'<div class="top-message blue">'+
'<h4 class="title"><?php echo translate("DEFAULT_HINT_TITLE", null, null, false); ?></h4>'+
'<div class="description">'+
'<p>'+
'<?php echo translate("DEFAULT_HINT_DESCRIPTION", null, null, false); ?>'+
'</p>'+
'</div>'+
@agustinhaller
agustinhaller / max_is stuff
Created September 24, 2012 15:03
max_id stuff
function getOrganizerTweets($search_query, $draw_start_date, $draw_end_date, $organizer_username)
{
$search_results_aux = array();
$tmhOAuth = initTmhOAuth($organizer_username);
// print_str($tmhOAuth, $organizer_username." CREDENTIALS");
// Now perform the search
$last_page = 1;
<div id="wrapper">
<?php
require_once("./templates/top-bar.php");
?>
<div class="wrap information" id="top-message" >
<h4><?php echo translate("COMPLETE_DATA_TO_CREATE_DRAW"); ?></h4>
<p>
<?php echo translate("CREATE_DRAW_HELP_1"); ?>