Example #1
0
echo dais_customfield('textarea', 'Content Wrapper End', '_ListViewTemplateContentWrapperEnd', '_ListViewTemplateContentWrapperEnd', 'list_row2', '', '');
echo dais_customfield('textarea', 'Pre Footer', '_ListViewTemplatePreFooter', '_ListViewTemplatePreFooter', 'list_row2', '', '');
echo dais_customfield('textarea', 'Footer', '_ListViewTemplateFooter', '_ListViewTemplateFooter', 'list_row2', '', '');
InfoBox('Footer Codes');
?>
<pre>
{{_footer_prev}}        : Previous Page/Entries
{{_footer_next}}        : Next Page/Entries
{{_footer_page_jump}}   : Page Index Input Box (page __ of 20)
{{_footer_item_count}}  : Number of items found and displayed (1 - 10 of 200 items)
{{_footer_no_entries}}  : No results

</pre>
<?php 
EndInfoBox();
echo dais_customfield('textarea', 'Post Footer', '_ListViewTemplatePostFooter', '_ListViewTemplatePostFooter', 'list_row2', '', '');
?>
  </div>
</div>
<?php 
echo dais_standardElementConfig(false, false);
echo dais_standardinsertbuttons($Plugin);
ob_start();
?>

jQuery(document).ready(function($) {
		jQuery("#tabs").tabs();
		jQuery('select').live('change', function(){
			if(this.value == 'index_hide' || this.value == 'noindex_hide'){
				jQuery(this).parent().parent().fadeTo(500, 0.6);
			}
Example #2
0
        }
        ?>
            <div id="<?php 
        echo $whereID;
        ?>
">Requirement: <select name="Data[Content][_customWHERE][<?php 
        echo $whereID;
        ?>
][_Req]" ><option value="AND" <?php 
        echo $selA;
        ?>
>AND</option><option value="OR" <?php 
        echo $selO;
        ?>
>OR</option></select> WHERE (<input type="text" name="Data[Content][_customWHERE][<?php 
        echo $whereID;
        ?>
][_Where]" value="<?php 
        echo $whereSet['_Where'];
        ?>
" style="width:550px;" />)</div>
            <?php 
    }
}
$Sel = '';
if (!empty($Element['Content']['_useCustomWhere'])) {
    $Sel = 'checked="checked"';
}
echo '<p>' . dais_customfield('checkbox', 'Enable', '_useCustomWhere', '_useCustomWhere', 'list_row1', 1, $Sel, 'Enable custom WHERE.') . '</p>';
?>
</div>
Example #3
0
function dt_saveFilterLock($Interface, $Settings = false)
{
    if (!empty($Settings)) {
        $Title = $Settings[0]['value'];
        $Count = 'no';
        if (!empty($Settings[1]['value'])) {
            $Count = 'yes';
        }
        $Newset = get_option('filter_Lock_' . $Interface);
        $fset = get_option('dt_set_' . $Interface);
        if (!empty($Title)) {
            $set['Title'] = $Title;
            $set['code'] = uniqid();
            $set['ShowCount'] = $Count;
            $set['Filters'] = $Newset;
            $fset[] = $set;
            update_option('dt_set_' . $Interface, $fset);
            return true;
        }
        ob_start();
        ?>
            <div style="padding: 0pt 0.7em;" class="ui-state-error ui-corner-all">
                <p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
                <strong>Alert:</strong> You need to provide a <strong>Set Name</strong>.</p>
            </div>
        <?php 
        $error = ob_get_clean();
    }
    ob_start();
    if (!empty($error)) {
        echo $error;
    }
    echo dais_customfield('text', 'Set Title', '_SetTitle', '_SetTitle', 'list_row1', '', false);
    echo dais_customfield('checkbox', 'Show Count', '_ShowCount', '_ShowCount', 'list_row2', '1', false);
    $Out = ob_get_clean();
    return $Out;
}
Example #4
0
{{_PageName}}		: Page Name
{{_EID}}		: Element ID
{{_<i>Fieldname</i>_name}}	: Field Title
{{<i>Fieldname</i>}}		: Field Data
{{_return_<i><b>Fieldname</b></i>}}	: Return Field
            </pre>
            Field Keys:
            <?php 
if (!empty($Element['Content']['_FieldTitle'])) {
    foreach ($Element['Content']['_FieldTitle'] as $FieldKey => $Val) {
        echo $Val . ' = {{' . $FieldKey . '}}<br />';
    }
}
echo '<br /><br />';
echo dais_customfield('textarea', 'PostContent', '_ViewTemplatePostContent', '_ViewTemplatePostContent', 'list_row2', $Element['Content']['_ViewTemplatePostContent'], '');
echo dais_customfield('textarea', 'Content Wrapper End', '_ViewTemplateContentWrapperEnd', '_ViewTemplateContentWrapperEnd', 'list_row2', $Element['Content']['_ViewTemplateContentWrapperEnd'], '');
?>



        </div>
    </div>
        
        


<script>
	jQuery(function() {
                jQuery("#viewtabs").tabs();
		jQuery('#disableLayoutEngineview').bind('change', function(ui, e){
Example #5
0
<h2>Import/Export</h2>
        
        <span class="description">This is a text version of the interface setup. you can copy and paste this into another interface to copy its configuration.</span><br /><br />
        <div class="controls">
        <textarea style="width: 100%;" rows="10"><?php 
if (!empty($Element['ID'])) {
    echo base64_encode(serialize($Element));
}
?>
</textarea>
        <strong>Paste Import Here For Processing</strong>
        <textarea style="width: 100%;" rows="10" name="Data[_SerializedImport]"></textarea>        
        </div>
        <?php 
echo dais_customfield('checkbox', 'Process Import', '_ProcessImport', '_ProcessImport', 'list_row1', 1, '', 'Run the above code as an import. Be carefull as this can damage an interface.');
?>
        
Example #6
0
InfoBox('Applications');
$Sel = '';
if (empty($Element['Content']['_ItemViewInterface'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('radio', 'No Redirect', '_ItemViewInterface', '_ItemViewInterface', 'list_row1', 0, $Sel);
$Sel = '';
if (!empty($Element['Content']['_targetInterface'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Passback Targeting', '_targetInterface', '_targetInterface', 'list_row1', 1, $Sel, 'Push passback fields to target Interface');
$Sel = '';
if (!empty($Element['Content']['_targetInterfaceFilter'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Filter Targeting', '_targetInterfaceFilter', '_targetInterfaceFilter', 'list_row1', 1, $Sel, 'Push filters to target Interface');
global $wpdb;
$Interfaces = $wpdb->get_results("SELECT option_name FROM {$wpdb->options} WHERE `option_name` LIKE 'dt_intfc%' ", ARRAY_A);
$Clusters = $wpdb->get_results("SELECT option_name FROM {$wpdb->options} WHERE `option_name` LIKE 'dt_clstr%' ", ARRAY_A);
$Interfaces = array_merge($Interfaces, $Clusters);
if (!empty($Interfaces) || !empty($Clusters)) {
    // group by App
    $Apps = array();
    foreach ($Interfaces as $Interface) {
        $option = get_option($Interface['option_name']);
        //if(empty($option['_ItemGroup'])){
        //    $option['_ItemGroup'] = '__Ungrouped';
        //}
        $Apps[$option['_Application']][$option['Type']][] = $option;
    }
    ksort($Apps);
Example #7
0
                </div>
                <span class="description">All buttons have a float:right style associated unless using a custom stylesheet in your theme. in which case you control it.</span>
                <span class="description">This was bad on my side, but will correct it soon. So be sure to clear:left within your styling, for now.</span>
                <br /><br />
                <span class="description">If a button is disabled in general settings, it wont be rendered.</span>
                <br /><br />
                <img align="absmiddle" style="float: right; padding: 5px; cursor: pointer;" onclick="jQuery('.row_helpPanel').toggle();" src="<?php 
echo WP_PLUGIN_URL;
?>
/db-toolkit/images/help.png">
                <?php 
$Sel = '';
if (!empty($Element['Content']['_useToolbarTemplate'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Enable', '_useToolbarTemplate', '_useToolbarTemplate', 'list_row1', 1, $Sel, 'Set this interface to use the custom toolbar templates.');
$ToolbarTemplate = '';
if (!empty($Element['Content']['_layoutTemplate']['_Toolbar'])) {
    $ToolbarTemplate = $Element['Content']['_layoutTemplate']['_Toolbar'];
}
?>
                <textarea class="headerFooterTemplate" name="Data[Content][_layoutTemplate][_Toolbar]"><?php 
echo $ToolbarTemplate;
?>
</textarea>

            </div>
        </div>


    </div>
Example #8
0
}
//echo dais_customfield('text', 'Interface Category', '_InterfaceCategory', '_InterfaceCategory', 'list_row2', $Element['_InterfaceCategory'], '', 'Categorizes this interface.');
if (empty($Element['_ItemGroup'])) {
    $Element['_ItemGroup'] = '';
}
echo dais_customfield('text', 'Menu Group', '_ItemGroup', '_ItemGroup', 'list_row2', $Element['_ItemGroup'], '', 'Sets the menu group on the left navigation bar within Wordpress admin.');
if (empty($Element['_interfaceName'])) {
    $Element['_interfaceName'] = '';
}
echo dais_customfield('text', 'Menu Label', '_ReportTitle', '_ReportTitle', 'list_row1', $Element['_interfaceName'], '', 'Sets the title of the menu link.');
$Sel = '';
if (!empty($Element['Content']['_SetDashboard'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'On Dashboard', '_SetDashboard', '_SetDashboard', 'list_row1', 1, $Sel, 'Place the interface as a Dashboard widget.');
$Sel = '';
if (!empty($Element['Content']['_SetAdminMenu'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Admin Menu', '_SetAdminMenu', '_SetAdminMenu', 'list_row1', 1, $Sel, 'Sets the interface to the admin bar. (Requires a menu group)');
if (empty($Element['Content']['_menuAccess'])) {
    $Element['Content']['_menuAccess'] = 'read';
}
?>
<h2>Shortcode</h2>
<?php 
if (empty($Element['_shortCode'])) {
    $Element['_shortCode'] = '';
}
echo dais_customfield('text', 'Shortcode', '_shortCode', '_shortCode', 'list_row1', $Element['_shortCode'], '', 'give this interface its own shortcode. Be careful not to overwrite existing shortcodes, so make it unique.');
Example #9
0
        <span class="description">Customize the generated query to get the most of your results.</span>
        <div class="warning">WARNING: improper setting of the query can and will result in malfunction.<br/>
        To Reset: Clear the custom query and save.</div>
        
        <div class="controls">
        <textarea style="width: 100%;" rows="20" name="Data[Content][_QueryOveride]"><?php 
if (!empty($Element['ID'])) {
    if (!empty($Element['Content']['_QueryOveride'])) {
        $query = $Element['Content']['_QueryOveride'];
    } else {
        $query = dr_BuildReportGrid($Element['ID'], false, false, false, 'sql');
    }
    preg_match('/(LIMIT [ 0-9]+,[ 0-9]+)/', $query, $Limits);
    if (!empty($Limits[0])) {
        $query = str_replace($Limits[0], '', $query);
    } else {
        $query .= $queryLimit;
    }
    echo str_replace(';', '', $query);
}
?>
</textarea>
        </div>
        <?php 
$Sel = '';
if (!empty($Element['Content']['_UserQueryOveride'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Use Overide', '_UserQueryOveride', '_UserQueryOveride', 'list_row1', 1, $Sel, 'Use the "Tuned" Query.');
?>
        
Example #10
0
}
echo dais_customfield('checkbox', 'List', '_APIMethodList', '_APIMethodList', 'list_row2', 1, $Sel, 'List Method fetches all items.');
$Sel = '';
if (!empty($Element['Content']['_APIMethodFetch'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Fetch', '_APIMethodFetch', '_APIMethodFetch', 'list_row2', 1, $Sel, 'Fetch Method to fetch a single item by passing the primary Passback Value as _ItemID variable.');
$Sel = '';
if (!empty($Element['Content']['_APIMethodInsert'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Insert', '_APIMethodInsert', '_APIMethodInsert', 'list_row2', 1, $Sel, 'Insert Method inserts a new entry.');
$Sel = '';
if (!empty($Element['Content']['_APIMethodUpdate'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Update', '_APIMethodUpdate', '_APIMethodUpdate', 'list_row1', 1, $Sel, 'Update Method to update a single item by POST edited data and passing the primary Passback Value as _ItemID variable.');
$Sel = '';
if (!empty($Element['Content']['_APIMethodDelete'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Delete', '_APIMethodDelete', '_APIMethodDelete', 'list_row2', 1, $Sel, 'Delete Method to delete a single item by passing the primary Passback Value as _ItemID variable.');
//get_use
/*
$key = API_getCurrentUsersKey();
echo $key.'<br />';

$key = API_decodeUsersAPIKey($key);

echo vardump($key);
*/
Example #11
0
<h2>Page Bindings</h2>
<div class="description" id="redirectHelp">
    <p>By binding an interface to a page, you allow WordPress to load the interface rather than the page content.</p>
    <p>This makes it easy to create a distributed application that has front end pages that requires certain pages.</p>
    <p>If you wish to have more than one interface on a page, you'll need to use the shortcode on the page.</p>
</div>
<div id="redirectTabs" class="dbtools_tabs">
    <div class="setupTab" id="publicRedirect">
        <?php 
InfoBox('Page');
$Sel = '';
if (empty($Element['Content']['_ItemBoundPage'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('radio', 'Not Bound', '_ItemBoundPage', '_ItemBoundPage', 'list_row1', 0, $Sel);
if (empty($Element['Content']['_ItemBoundPage'])) {
    $Element['Content']['_ItemBoundPage'] = '';
}
$PageList = array();
$PageList[] = $Element['Content']['_ItemBoundPage'];
echo dais_page_selector('s', $PageList, false, '_ItemBoundPage');
EndInfoBox();
?>
    </div>
    
</div>
Example #12
0
<h2>Custom Scripts</h2>
        <?php 
if (empty($Element['Content']['_customFooterJavaScript'])) {
    $Element['Content']['_customFooterJavaScript'] = '';
}
echo dais_customfield('textarea', 'Footer Scripts', '_customFooterJavaScript', '_customFooterJavaScript', 'list_row1', $Element['Content']['_customFooterJavaScript'], 'style="height:300px;"', 'Javascript code to be run when page is ready.');
?>
<h2>Custom Libraries</h2>
        <a href="#" onclick="dt_addLibrary(); return false;">Add Custom JS Library</a> | <a href="#" onclick="dt_addCSSLibrary(); return false;">Add Custom Style Sheet</a>
        
        <div id="addonLibrary">
            <?php 
if (empty($Element['Content']['_customJSLibrary'])) {
    echo dais_addJSLibrary();
} else {
    foreach ($Element['Content']['_customJSLibrary'] as $jsScript) {
        if (!empty($jsScript['source'])) {
            echo dais_addJSLibrary($jsScript['source'], $jsScript['location']);
        }
    }
}
?>
        </div>
        
        <div id="addonCSSLibrary">
            <?php 
if (empty($Element['Content']['_customCSSSource'])) {
    echo dais_addCSSLibrary();
} else {
    foreach ($Element['Content']['_customCSSSource'] as $cssScript) {
        if (!empty($cssScript['source'])) {
Example #13
0
echo '<div id="dbt-option-1" class="group" style="display: block;">';
echo '<h2>Configure Cluster</h2>';
echo dais_customfield('text', 'Menu Group', '_MenuGroup', '_MenuGroup', 'list_row2', $Element['_MenuGroup'], '');
$Sel = '';
if (!empty($Element['Content']['_SetAdminMenu'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Admin Menu Item<div><span class="description">Requires a menu group</span></div>', '_SetAdminMenu', '_SetAdminMenu', 'list_row1', 1, $Sel);
echo dais_customfield('text', 'Menu Label', '_MenuLable', '_MenuLable', 'list_row1', $Element['_MenuLable'], '');
echo dais_customfield('text', 'Cluster Title', '_ClusterTitle', '_ClusterTitle', 'list_row2', $Element['_ClusterTitle'], '');
echo dais_customfield('text', 'Cluster Description', '_ClusterDescription', '_ClusterDescription', 'list_row1', $Element['_ClusterDescription'], '');
$Sel = '';
if (!empty($Element['Content']['_DashboardItem'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Set as Dashboard Item', '_DashboardItem', '_DashboardItem', 'list_row1', 1, $Sel);
if (empty($Element['Content']['_menuAccess'])) {
    $Element['Content']['_menuAccess'] = 'read';
}
echo '</div>';
echo '<div id="dbt-option-2" class="group" style="display: none;">';
echo '<h2>Build Cluster Layout</h2>';
include WP_PLUGIN_DIR . '/db-toolkit/data_report/clusterlayout.php';
echo '</div>';
?>


            </div>
            <div class="clear"></div>

        </div>
Example #14
0
echo dais_customfield('text', 'No results text', '_NoResultsText', '_NoResultsText', 'list_row1', $Element['Content']['_NoResultsText'], '', 'Set the "no items found" message.');
$Sel = '';
if (!empty($Element['Content']['_NotificationsOff'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Disable Notifications', '_NotificationsOff', '_NotificationsOff', 'list_row2', 1, $Sel, 'Disables dialog notifications.');
$Sel = '';
if (!empty($Element['Content']['_inlineNotifications'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Inline Notifications', '_inlineNotifications', '_inlineNotifications', 'list_row2', 1, $Sel, 'Uses inline Notifications over dialogs.');
$Sel = '';
if (!empty($Element['Content']['_ShowReset'])) {
    $Sel = 'checked="checked"';
}
echo dais_customfield('checkbox', 'Show Reset Button', '_ShowReset', '_ShowReset', 'list_row1', 1, $Sel, 'Render the reset form button.');
$Sel = '';
if (!empty($Element['Content']['_SubmitAlignment'])) {
    switch ($Element['Content']['_SubmitAlignment']) {
        case 'left':
            $Sel = 'left';
            break;
        case 'center':
            $Sel = 'center';
            break;
        case 'right':
            $Sel = 'right';
            break;
    }
}
echo '<div style="padding:5px 0;" class="list_row1">Button Alignment&nbsp;&nbsp;';
Example #15
0
<h2>Data Source (Experimental)</h2>
<div class="description">Supplying a data source allows for auto populating of data from an XML source. (JSON Coming Soon)</div><br />

    <?php 
if (empty($Element['Content']['_DataSourceURL'])) {
    $Element['Content']['_DataSourceURL'] = '';
}
echo dais_customfield('text', 'Source URL', '_DataSourceURL', '_DataSourceURL', 'list_row1', $Element['Content']['_DataSourceURL'], '', '<input type="button" value="Invoke" onclick="dr_loadDataSource(jQuery(\'#_DataSourceURL\').val());" />');
?>
<h2>Field Mapping</h2>
<div id="_dataSourceView"><?php 
if (!empty($Element['Content']['_DataSourceURL'])) {
    echo dr_dataSourceMapping($Element['Content']['_DataSourceURL'], $Element['Content']);
} else {
    ?>
<div class="description">Source needs to be invoked before you can map fields.</div>
<?php 
}
?>
</div>
<h2>Data Source Call</h2>
<input type="text" value="<?php 
echo get_bloginfo('url') . '/' . $Element['ID'] . '/import';
?>
" style="width: 98%;" />
<div class="description">This URL will run the import. Add it to a cron task at a scheduled interval to periodically import new data.</div><br />