/** * This function is called every time the page footer is being rendered */ function google_analytics_footer() { if (osc_google_analytics_id() != '') { $id = osc_google_analytics_id(); require osc_plugins_path() . 'google_analytics/footer.php'; } }
<?php $dao_preference = new Preference(); $webid = Params::getParam('webid'); $option = Params::getParam('option'); if ($webid == '') { $webid = osc_google_analytics_id() != '' ? osc_google_analytics_id() : ''; } if ($option == 'stepone') { $dao_preference->update(array("s_value" => $webid), array("s_section" => "plugin-google_analytics", "s_name" => "google_analytics_id")); echo '<div style="text-align:center; font-size:22px; background-color:#00bb00;"><p>' . __('Congratulations. The plugin is now configured', 'google_analytics') . '.</p></div>'; } ?> <form action="<?php osc_admin_base_url(true); ?> " method="get"> <input type="hidden" name="page" value="plugins" /> <input type="hidden" name="action" value="renderplugin" /> <input type="hidden" name="file" value="google_analytics/admin.php" /> <input type="hidden" name="option" value="stepone" /> <div> <?php _e('Please enter your Google Analytics', 'google_analytics'); ?> <label for="id" style="font-weight: bold;"><?php _e('Web property ID', 'google_analytics'); ?> </label>: <input type="text" name="webid" id="webid" value="<?php
<?php $dao_preference = new Preference(); $webid = Params::getParam('webid'); $option = Params::getParam('option'); if ($option == 'stepone') { $dao_preference->update(array("s_value" => $webid), array("s_section" => "plugin-google_analytics", "s_name" => "google_analytics_id")); echo '<div style="text-align:center; font-size:22px; background-color:#00bb00;"><p>' . __('Congratulations. The plugin is now configured', 'google_analytics') . '.</p></div>'; } else { $webid = osc_google_analytics_id(); } ?> <form action="<?php osc_admin_base_url(true); ?> " method="get"> <input type="hidden" name="page" value="plugins" /> <input type="hidden" name="action" value="renderplugin" /> <input type="hidden" name="file" value="google_analytics/admin.php" /> <input type="hidden" name="option" value="stepone" /> <div> <?php _e('Please enter your Google Analytics', 'google_analytics'); ?> <label for="webid" style="font-weight: bold;"><?php _e('Web property ID', 'google_analytics'); ?> </label>: <input type="text" name="webid" id="webid" value="<?php echo $webid;
<h2 class="render-title"><?php _e('Google Analytics', 'google_analytics'); ?> </h2> <form action="<?php echo osc_admin_render_plugin_url('google_analytics/admin.php'); ?> " method="post"> <input type="hidden" name="option" value="stepone" /> <fieldset> <div class="form-horizontal"> <div class="form-row"> <div class="form-label"><?php _e('Tracking ID', 'google_analytics'); ?> </div> <div class="form-controls"><input type="text" class="xlarge" name="webid" value="<?php echo osc_esc_html(osc_google_analytics_id()); ?> "></div> </div> <div class="form-actions"> <input type="submit" value="Save changes" class="btn btn-submit"> </div> </div> </fieldset> </form>