This file contains hidden or 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 | |
// Backwards-compatibility with pre-2.6 Localize class | |
$format_date_fn = (version_compare(APP_VER, '2.6', '>=')) ? 'format_date' : 'decode_date'; | |
echo $this->EE->localize->{$format_date_fn}('%Y-%m-%d', $this->EE->localize->now); | |
// 2013-04-18 |
This file contains hidden or 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 | |
/* | |
devot:ee developer sales widget for Panic's StatusBoard iPad app | |
http://panic.com/statusboard | |
Author: Derek Hogue (http://amphibian.info) | |
Usage: Fill-in your devot:ee API credentials, then upload to your server. | |
You can use this script to feed either the Graph widget or Table widget. |
This file contains hidden or 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
// ~ Line 120 | |
if ($deleted == TRUE) | |
{ | |
$this->EE->extensions->call('delete_entries_loop', $entry_id, $channel_id); | |
$return = ($this->EE->TMPL->fetch_param('message_success') ? $this->EE->TMPL->fetch_param('message_success') : $this->message_success); | |
} | |
else | |
{ | |
$return = $this->message_failure; | |
} |
This file contains hidden or 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
$url = 'http://us1.api.mailchimp.com/1.3/?method=listSubscribe&apikey=YOUR_API_KEY&id=YOUR_LIST_ID&email_address=EMAIL&output=php'; | |
// cURL request with $url |
This file contains hidden or 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('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
Distinct Dropdown fieldtype | |
- Requires the P&T fieldpack to be installed | |
- Won't work inside a Matrix row | |
- Won't work in SafeCracker, as we can't access the current entry_id | |
(at least I don't think?) | |
- Idea could be ported to multiselect, checkbox group, and radio fields | |
*/ |
This file contains hidden or 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 | |
// Note that this has only been tested with the 2.1.5 beta | |
// Editing starts at line 3926 and goes until line 3963 of /system/expressionengine/controllers/cp/admin_content.php | |
// Start here: | |
// build list of formatting options | |
// (Add whatever additional formatting plugins you like here) |
This file contains hidden or 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
In shows-list.php find this ... | |
<?php if($gpo['display_country'] == 1) : ?> | |
<td class="gigpress-country"><?php echo $showdata['country']; ?></td> | |
<?php endif; ?> | |
And add this right after: | |
<td class="gigpress-ticket-col"> | |
<?php echo $showdata['ticket_link']; ?> |
This file contains hidden or 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
$('#comments a').each(function(){ var str = $(this).text().split(' '); if(str[0].length > 30){ $(this).html($(this).text().substr(0,30) + '[…]'); } }); |
This file contains hidden or 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 | |
// Change your upload directory ID here. | |
$upload_dir_id = 2; | |
$this->EE =& get_instance(); | |
$this->EE->load->library('filemanager'); | |
$files = $this->EE->filemanager->fetch_files($upload_dir_id); | |
foreach($files->files[$upload_dir_id] as $data) | |
{ | |
$dir = array('server_path' => $data['relative_path']); |
This file contains hidden or 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
\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))) |
NewerOlder