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
{exp:proform:form form_name="{segment_2}" variable_prefix="pf_" error_delimiters="|"} | |
{pf_formpref:html_prefix} | |
{if pf_no_results} | |
{if pf_pref:invalid_form_message} | |
{pf_pref:invalid_form_message} | |
{if:else} | |
Invalid form name specified! | |
{/if} | |
{/if} |
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
<script type="text/javascript" > | |
// So the JS knows where our files are | |
var site_url = "{site_url}"; | |
</script> | |
{!-- The AJAX code should work with the default HTML generated by the simple form tag: --} | |
{exp:proform:simple form_name="contact_us"} | |
<script type="text/javascript" src="http://localhost/index.php//assets/js/contact_us.js"></script> |
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
{exp:proform:form form_name="{segment_2}" variable_prefix="pf_"} | |
{if pf_no_results} | |
{if pf_pref:invalid_form_message} | |
{pf_pref:invalid_form_message} | |
{if:else} | |
Invalid form name specified! | |
{/if} | |
{/if} | |
{if pf_complete} | |
{if pf_pref:thank_you_message} |
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 | |
// database table to be exported | |
$db_table = 'XXXXXXXXX'; | |
// optional where query | |
$where = 'WHERE 1 ORDER BY 1'; | |
// filename for export | |
$csv_filename = 'db_export_'.$db_table.'_'.date('Y-m-d').'.csv'; | |
// database variables | |
$hostname = "localhost"; |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| FUEL NAVIGATION: An array of navigation items for the left menu in the admin | |
|-------------------------------------------------------------------------- | |
*/ | |
$config['nav']['site'] = array( | |
'site/articles' => lang('module_site_articles'), |
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
// Field: Returning an array or object as a variable, for instance in a fieldtype | |
ee()->load->library('handle_manager'); | |
$results = ee()->db->get('table_mapping')->results(); | |
$table_pattern = array( | |
"table_data" => ee()->handle_manager->register($results) // Returns a handle, e.x.: {&100} | |
); | |
ee()->TMPL->parse_variables($tagdata, array($table_pattern)); | |
{!-- Take the array of data in the table_data variable and pass it as a parameter to the plugin --} | |
{meta_table} |
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
<div class="section sticky_nav"> | |
<div class="filter_nav"> | |
<ul> | |
{!-- category 2 -- a post type --} | |
{!-- build url so far --} | |
{exp:stash:set name="filter_base1"}{site_url}{segment_1}{if router_blog_name != ""}/{router_blog_name}{/if}/{if router_cat1 != ""}{router_cat1}{if:else}all{/if}{/exp:stash:set} | |
<li class="{if router_cat2_category_url_title == ''}active{/if}"><a href="{exp:stash:filter_base1 random}/all/">All Results</a></li> | |
{exp:channel:categories category_group="3" style="linear"} |
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 | |
class PF_View extends View { | |
public function __construct(View $view) | |
{ | |
if(!isset($this->EE)) $this->EE = &get_instance(); // <-- Add this line | |
$this->set_cp_theme($view->_theme); | |
} | |
public function head_title($title) |
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
{ce:core:recurse in=tree children_field="__children"} | |
{loop_items} | |
<li> | |
<span><a href="{cp_url}publish/edit/{__type}/{__id}">{title}</a></span> | |
{if __children} | |
<ul> | |
{__children} | |
</ul> | |
{/if} | |
</li> |
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
{ce:core:foreach in=beans} | |
<tr> | |
{ce:core:foreach in=loop_value} | |
{if loop_key == table_id} | |
<td>[{table_id}] {loop_key} = <a href="{cp_url}publish/edit/{type}/{loop_value}">{loop_value}</a></td> | |
{if:else} | |
{if loop_key == 'title'} | |
<td>title {loop_key} = <a href="{cp_url}publish/edit/{type}/{bean_id}">{loop_value}</a></td> | |
{if:else} | |
{if loop_key != 'loop_key' & loop_key != 'parent_id' & loop_key != 'bean_id'} |