Skip to content

Instantly share code, notes, and snippets.

View davidcroda's full-sized avatar

David Roda davidcroda

  • ZaiNar
  • Philadelphia, PA
View GitHub Profile
<iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($listing_url); ?>&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;font=arial&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
$results = $arosAcos->find('all',array(
'fields' => array('Acos.foreign_key'),
'conditions' => array(
'Aros.alias' => "clients/{$user['client_id']}/{$user['id']}",
'Acos.alias LIKE' => "campaigns/%"
),
'joins' => array(
array(
'type' => 'left',
'table' => 'acos',
1 DYNO
===================================================
Benchmarking express-test.respage.com (be patient).....done
Server Software: Apache/2.2.25
Server Hostname: express-test.respage.com
Server Port: 80
Document Path: /users/login
diff --git a/app/controllers/assignments_controller.php b/app/controllers/assignments_controller.php
index 26326ef..9b0f42c 100755
--- a/app/controllers/assignments_controller.php
+++ b/app/controllers/assignments_controller.php
@@ -850,7 +850,7 @@ class AssignmentsController extends AppController {
$filter['Campaign.archived'] = 0;
$filter['Assignment.hidden'] = 0;
- if(isset($filter['Article.market_id'])) {
+ if(isset($filter['Article.market_id']) || isset($filter['OR']['Article.title LIKE'])) {
$parsed = parse_url($url);
if(isset($parsed['scheme'])) {
$scheme = $parsed['scheme'];
} else {
$scheme = "http";
}
$path = substr($parsed['path'],1);
$parts = explode("/",$path);
foreach($parts as $k=>$part) {
$parts[$k] = urlencode(urldecode($part));
<?php
$parsed = parse_url($url);
if(isset($parsed['scheme'])) {
$scheme = $parsed['scheme'];
} else {
$scheme = "http";
}
$path = substr($parsed['path'],1);
$parts = explode("/",$path);
<?php
/**
* GooglesController
*
* @author David Roda
* @package services
*/
/**
* Unused class to control Google Plus API
* @package services
function test($id) {
$this->autoRender = false;
App::import('Lib','WordpressFacade');
$wordpressFacade = new WordpressFacade();
$account = $this->WordpressConnection->read(null, $id);
$account = $account['WordpressConnection'];
$wordpressFacade->setCredentials($account['url'],$account['wp_username'],$account['password']);
<?php
function test($id) {
$this->autoRender = false;
App::import('Lib','WordpressFacade');
$wordpressFacade = new WordpressFacade();
$account = $this->WordpressConnection->read(null, $id);
$account = $account['WordpressConnection'];
SELECT `Post`.`id`, `Post`.`service_id`, `Post`.`campaign_id`, `Post`.`from_name`, `Post`.`from_id`, `Post`.`from_img`, `Post`.`message`, `Post`.`picture`, `Post`.`link`, `Post`.`name`, `Post`.`name_href`, `Post`.`name_caption`, `Post`.`description`, `Post`.`comment_count`, `Post`.`updated_timestamp`, `Post`.`service`, `Post`.`in_reply_to_status_id`, `Post`.`created_time`, `Post`.`user_actions`, `Post`.`is_read`, `Post`.`is_read_user`, `Post`.`from_cms`, `Post`.`from_user`, `Post`.`categories`, `Post`.`tags`, `Post`.`type`, `Post`.`post_type_id`, `Post`.`competitor`, `Post`.`attribution_text`, `Post`.`attribution_url`, `Post`.`attribution_logo`, `Post`.`data`, `Post`.`assignment_id`, `Post`.`connection_id`, `Post`.`status`, `Post`.`is_flagged`, `Post`.`user_id`, `User`.`display_name`, `Campaign`.`id`, `Campaign`.`title`, `Campaign`.`www`, `Campaign`.`archived`, `Campaign`.`autopost`, `Campaign`.`autopost_error`, `Campaign`.`monitor`, `Campaign`.`holiday_posts`, `Campaign`.`sweepstake_posts`, `Campaign`.`notes