This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP DATABASE IF EXISTS twitter_test; | |
CREATE DATABASE twitter_test; | |
USE twitter_test; | |
DROP TABLE IF EXISTS follwers; | |
CREATE TABLE followers ( | |
id varchar(16), | |
screen_name VARCHAR(32), | |
name VARCHAR(32), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT f.id, f.screen_name, l.location | |
FROM followers AS f | |
LEFT OUTER JOIN location AS l | |
ON l.id = f.id | |
LIMIT 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This will pull out our results inserted on Task 1 and display them in a table. | |
*/ | |
public function pull_twitter_users() | |
{ | |
try { | |
$sql = "SELECT f.id, f.screen_name, l.location | |
FROM followers AS f | |
LEFT OUTER JOIN location AS l | |
ON l.id = f.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Task 2 - fetch some db results via ajax call and display in a table. | |
*/ | |
var admixt_task2 = { | |
url: '/followers', | |
fetch: function(){ | |
var self = this; | |
$.get(this.url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
$module = "YOUR_MODULE"; | |
$viewdefs[$module]['base']['view']['subpanel-list'] = array( | |
'template' => 'recordlist', | |
'favorite' => true, | |
'rowactions' => array( | |
'actions' => array( | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This will make a field readonly. Create this file here: | |
/custom/Extension/modules/MODULE/Ext/Dependencies/ | |
and then Quick Repair/Rebuild */ | |
$dependencies['MODULE']['FIELD_NAME_readonly'] = array( | |
'hooks' => array('edit'), | |
'trigger' => 'true', | |
'triggerFields' => array('FIELD_NAME'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This will turn off duplicate checking for the module. | |
Put the file in this directory: | |
custom/Extension/modules/MODULE/Ext/Vardefs/ | |
and Quick Repair/Rebuild */ | |
$dictionary['MODULE']['duplicate_check']['FilterDuplicateCheck']['filter_template'] = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// place this file in custom/Extension/modules/Contacts/Ext/Language | |
$mod_strings['LNK_NEW_LAYOUT_LINK'] = 'New Layout Link'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('modules/Emails/Email.php'); | |
require_once('include/SugarPHPMailer.php'); | |
$emailObj = new Email(); | |
$mail = new SugarPHPMailer(); | |
// Create an id for the email | |
$emailObj->id = create_guid(); | |
$emailObj->new_with_id = true; |
OlderNewer