فهرست منبع

Bumped version to 0.0.71

Jannick Knudsen 3 سال پیش
والد
کامیت
a6a09bc384
6فایلهای تغییر یافته به همراه97 افزوده شده و 39 حذف شده
  1. 1 1
      VERSION
  2. 1 0
      VERSIONLOG
  3. 1 1
      package.json
  4. 24 35
      plug_footer.php
  5. 68 0
      plug_tracker.php
  6. 2 2
      plugin.php

+ 1 - 1
VERSION

@@ -1 +1 @@
-v0.0.70
+v0.0.71

+ 1 - 0
VERSIONLOG

@@ -69,3 +69,4 @@ v0.0.67
 v0.0.68
 v0.0.69
 v0.0.70
+v0.0.71

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "dagsplug",
-  "version": "0.0.70",
+  "version": "0.0.71",
   "description": "",
   "main": "script_backend.js",
   "scripts": {

+ 24 - 35
plug_footer.php

@@ -1,56 +1,45 @@
 <?php
 
 if (!class_exists("plug_footer")) {
-	class plug_footer {	
+	class plug_footer {
 		function __construct($ns) {
-			$this->title = __("Footer","dagsopt");
+			$this->title = __("Footer", "dagsopt");
 			$this->pluginname = $ns->pluginname;
 			$this->file = $ns->file;
 			$this->ns = $ns;
-			}
+		}
 		function start() {
 
-			add_action('wp_footer',array(&$this,'footer'),100);
-			
-
+			add_action('wp_footer', array(&$this, 'footer'), 100);
 
 		}
 
 		function footer() {
-			echo '<div id="dags-footer" class="container"><div class="row"><div class="pull-right">'.stripcslashes(get_option($this->pluginname."_footer_footer_html")).'</div></div></div>';
+			echo '<div id="dags-footer" class="container"><div class="row"><div class="pull-right">' . stripcslashes(get_option($this->pluginname . "_footer_footer_html")) . '</div></div></div>';
 		}
- 
-
-
-			function help(){
-				?>
-				<?php echo(__("Adds html snippet in footer","dagsopt")) ?>
-				
-				
-			<?php		
-			}
-	 
-	 	function Option($pre){
-			update_option ( $pre.'_footer_html', $_POST [ $pre.'_footer_html' ] );
- 		}
- 
-	 	function admin_line($pre){
-		  ?>
-		  <?php echo(__("Footer html:","dagsopt")) ?><br><textarea style="width: 100%; height: 150px;" name="<?php echo( $pre.'_footer_html' ); ?>"><?php echo(stripcslashes(get_option($pre."_footer_html"))); ?></textarea>
-		  <?php  
-		}	
-		
-	 	 
-	}
 
-	global $plug_footer;
-	$plug_footer = new plug_footer($this);		
-			$this->dagsopt['plug_footer'] = $plug_footer;
-			
-}
+		function help() {
+			?>
+				<?php echo (__("Adds html snippet in footer", "dagsopt")) ?>
+
 
+			<?php
+}
 
+		function Option($pre) {
+			update_option($pre . '_footer_html', $_POST[$pre . '_footer_html']);
+		}
 
+		function admin_line($pre) {
+			?>
+		  <?php echo (__("Footer html:", "dagsopt")) ?><br><textarea style="width: 100%; height: 150px;" name="<?php echo ($pre . '_footer_html'); ?>"><?php echo (stripcslashes(get_option($pre . "_footer_html"))); ?></textarea>
+		  <?php
+}
 
+	}
 
+	global $plug_footer;
+	$plug_footer = new plug_footer($this);
+	$this->dagsopt['plug_footer'] = $plug_footer;
 
+}

+ 68 - 0
plug_tracker.php

@@ -0,0 +1,68 @@
+<?php
+
+if (!class_exists("plug_tracker")) {
+	class plug_tracker {
+		function __construct($ns) {
+			$this->title = __("Tracker", "dagsopt");
+			$this->pluginname = $ns->pluginname;
+			$this->file = $ns->file;
+			$this->ns = $ns;
+		}
+		function start() {
+
+			add_action('wp_footer', array(&$this, 'footer'), 100);
+
+			add_action('admin_footer_text', array(&$this, 'footer'));
+
+		}
+
+		function footer() {
+			$g = get_option($this->pluginname . "_tracker_url_base");
+			if (empty($g)) {
+				$g = "https://";
+
+				$DD = explode(".", $_SERVER['HTTP_HOST']);
+				$MM = "";
+				if (count($DD) > 2) {
+					$MM = "wp-" . array_shift($DD);
+					$DOA = implode(".", $DD);
+				} else {
+					$DOA = $_SERVER['HTTP_HOST'];
+				}
+				$g = "https://" . $MM . "." . $DOA . "/tool.js";
+			}
+
+			if (isset($_SERVER['REDIRECT_URL'])) {
+				$g .= '?p=' . $_SERVER['REDIRECT_URL'];
+			} else {
+				$g .= '?p=' . $_SERVER['REQUEST_URI'];
+			}
+
+			echo ('<script type="application/javascript" defer src="' . $g . '"></script>');
+		}
+
+		function help() {
+			?>
+				<?php echo (__("Adds js tracks front and back", "dagsopt")) ?>
+
+
+			<?php
+}
+
+		function Option($pre) {
+			update_option($pre . '_tracker_url_base', $_POST[$pre . '_tracker_url_base']);
+		}
+
+		function admin_line($pre) {
+			?>
+		  <?php echo (__("Tracker url base:", "dagsopt")) ?><br><textarea style="width: 100%; height: 150px;" name="<?php echo ($pre . '_tracker_url_base'); ?>"><?php echo (stripcslashes(get_option($pre . "_tracker_url_base"))); ?></textarea>
+		  <?php
+}
+
+	}
+
+	global $plug_tracker;
+	$plug_tracker = new plug_tracker($this);
+	$this->dagsopt['plug_tracker'] = $plug_tracker;
+
+}

+ 2 - 2
plugin.php

@@ -4,7 +4,7 @@ Plugin Name: dagsopt
 Plugin URI: https://git.tum.dk/tum.dk/dagsplug/
 Description: Tools
 Author: iskedk
-Version: 0.0.70
+Version: 0.0.71
 Date: 2021-01-14
 Author URI: https://iske.dk/
 Text Domain: dagsopt
@@ -17,7 +17,7 @@ function wppluginspage() {
 $wp_dagsopt = new dagsopt();
 
 class dagsopt {
-	var $version = "0.0.70";
+	var $version = "0.0.71";
 	var $publish_date = "2021-01-14";
 	var $pluginname;
 	var $plugintitle;