aboutsummaryrefslogtreecommitdiff
path: root/user/plugins/random-bg
diff options
context:
space:
mode:
Diffstat (limited to 'user/plugins/random-bg')
-rw-r--r--user/plugins/random-bg/README.md6
-rw-r--r--user/plugins/random-bg/img/backup/bg_ants.pngbin0 -> 43030 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_boobs.pngbin0 -> 21614 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_circles.pngbin0 -> 21786 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_cross.pngbin0 -> 4314 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_diag.pngbin0 -> 10744 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_fuzzy.pngbin0 -> 39777 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_fuzzy_bits.pngbin0 -> 20277 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_life.pngbin0 -> 19239 bytes
-rw-r--r--user/plugins/random-bg/img/backup/bg_yourls.pngbin0 -> 13616 bytes
-rw-r--r--user/plugins/random-bg/img/bg_ants.gifbin0 -> 1710628 bytes
-rw-r--r--user/plugins/random-bg/img/bg_boots.gifbin0 -> 2700793 bytes
-rw-r--r--user/plugins/random-bg/img/bg_circles.gifbin0 -> 3072449 bytes
-rw-r--r--user/plugins/random-bg/img/bg_cross.gifbin0 -> 2086536 bytes
-rw-r--r--user/plugins/random-bg/img/bg_diag.gifbin0 -> 3080357 bytes
-rw-r--r--user/plugins/random-bg/img/bg_fuzzy.gifbin0 -> 1914147 bytes
-rw-r--r--user/plugins/random-bg/img/bg_fuzzy_bits.gifbin0 -> 3557693 bytes
-rw-r--r--user/plugins/random-bg/img/bg_life.gifbin0 -> 368093 bytes
-rw-r--r--user/plugins/random-bg/img/bg_yourls.gifbin0 -> 1084124 bytes
-rw-r--r--user/plugins/random-bg/plugin.php27
20 files changed, 33 insertions, 0 deletions
diff --git a/user/plugins/random-bg/README.md b/user/plugins/random-bg/README.md
new file mode 100644
index 0000000..f3867fa
--- /dev/null
+++ b/user/plugins/random-bg/README.md
@@ -0,0 +1,6 @@
+Random Background
+=================
+This is a sample plugin, for illustration purpose.
+Don't modify this plugin. Instead, copy its folder
+and modify your own copy. This way, your code won't
+be overwritten when you upgrade YOURLS. \ No newline at end of file
diff --git a/user/plugins/random-bg/img/backup/bg_ants.png b/user/plugins/random-bg/img/backup/bg_ants.png
new file mode 100644
index 0000000..1b736b0
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_ants.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_boobs.png b/user/plugins/random-bg/img/backup/bg_boobs.png
new file mode 100644
index 0000000..09d2dd4
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_boobs.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_circles.png b/user/plugins/random-bg/img/backup/bg_circles.png
new file mode 100644
index 0000000..27c2884
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_circles.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_cross.png b/user/plugins/random-bg/img/backup/bg_cross.png
new file mode 100644
index 0000000..3129cdd
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_cross.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_diag.png b/user/plugins/random-bg/img/backup/bg_diag.png
new file mode 100644
index 0000000..f3c5fb7
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_diag.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_fuzzy.png b/user/plugins/random-bg/img/backup/bg_fuzzy.png
new file mode 100644
index 0000000..6850ca4
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_fuzzy.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_fuzzy_bits.png b/user/plugins/random-bg/img/backup/bg_fuzzy_bits.png
new file mode 100644
index 0000000..91ff805
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_fuzzy_bits.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_life.png b/user/plugins/random-bg/img/backup/bg_life.png
new file mode 100644
index 0000000..7d3e54f
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_life.png
Binary files differ
diff --git a/user/plugins/random-bg/img/backup/bg_yourls.png b/user/plugins/random-bg/img/backup/bg_yourls.png
new file mode 100644
index 0000000..d96cde8
--- /dev/null
+++ b/user/plugins/random-bg/img/backup/bg_yourls.png
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_ants.gif b/user/plugins/random-bg/img/bg_ants.gif
new file mode 100644
index 0000000..70b64c2
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_ants.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_boots.gif b/user/plugins/random-bg/img/bg_boots.gif
new file mode 100644
index 0000000..2241ebc
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_boots.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_circles.gif b/user/plugins/random-bg/img/bg_circles.gif
new file mode 100644
index 0000000..ff57a16
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_circles.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_cross.gif b/user/plugins/random-bg/img/bg_cross.gif
new file mode 100644
index 0000000..8cf785a
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_cross.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_diag.gif b/user/plugins/random-bg/img/bg_diag.gif
new file mode 100644
index 0000000..6996606
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_diag.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_fuzzy.gif b/user/plugins/random-bg/img/bg_fuzzy.gif
new file mode 100644
index 0000000..a7709b2
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_fuzzy.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_fuzzy_bits.gif b/user/plugins/random-bg/img/bg_fuzzy_bits.gif
new file mode 100644
index 0000000..e663faf
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_fuzzy_bits.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_life.gif b/user/plugins/random-bg/img/bg_life.gif
new file mode 100644
index 0000000..e32d025
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_life.gif
Binary files differ
diff --git a/user/plugins/random-bg/img/bg_yourls.gif b/user/plugins/random-bg/img/bg_yourls.gif
new file mode 100644
index 0000000..107ecf4
--- /dev/null
+++ b/user/plugins/random-bg/img/bg_yourls.gif
Binary files differ
diff --git a/user/plugins/random-bg/plugin.php b/user/plugins/random-bg/plugin.php
new file mode 100644
index 0000000..c249637
--- /dev/null
+++ b/user/plugins/random-bg/plugin.php
@@ -0,0 +1,27 @@
+<?php
+/*
+Plugin Name: Random Backgrounds
+Plugin URI: http://yourls.org/
+Description: Pretty random background patterns
+Version: 1.0
+Author: Ozh
+Author URI: http://ozh.org/
+*/
+
+// No direct call
+if( !defined( 'YOURLS_ABSPATH' ) ) die();
+
+// Add the inline style
+yourls_add_action( 'html_head', 'ozh_yourls_randombg' );
+function ozh_yourls_randombg() {
+ $bg = glob( __DIR__.'/img/*gif' );
+ $url = yourls_plugin_url( __DIR__ );
+ $rnd = yourls_plugin_url( $bg[ mt_rand( 0, count( $bg ) - 1 ) ] );
+ echo <<<CSS
+<style type="text/css">
+ body {background:#e3f3ff url($rnd); background-size: cover;}
+ </style>
+
+CSS;
+}
+