Please do read this documentation, before you encounter any problems!
Important Notice
The current version is merely a draft. Everything might change, and there may be severe bugs and limitations as it is barely tested. It is a so called alpha version. Use with utmost caution!
Requirements
SimplePlugins_XH is a plugin for CMSimple_XH.
Installation
The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details..
- Backup the data on your server.
- Unzip the distribution on your computer.
- Edit & Set Your 'Google AdSense Code' , 'Google Map API Key'
- Google AdSense Code: simpleplugins_xh/simpleplugins_library/g_adsense/index.phpg_adsense/index.php
- Google Map API Key: simpleplugins_xh/simpleplugins_library/simple_google_map/index.phpsimple_google_map/index.php
- Google Map API Key: simpleplugins_xh/simpleplugins_library/simple_google_map2simple_google_map2/index.php
- Upload the whole directory to your server into the CMSimple_XH plugin directory.
-
----> plugins/simpleplugins_xh/*.
- The no_cookies_text function requires the installation of the Privacy_XH plugin.
Included Library
- add_qrcode : Display the QR code - Anzeige des QR-Codes
- admin_only : This is displayed only when admin login.
- bclock : Show Clock | no longer works in the current version
- browser-shots : Automate the process of taking website screenshots. | no longer works in the current version
- g_adsense : Google AdSense
- h_tag : H1,H2,H3 tag
- hellomyplugin: Blind function here only outputs 'Hello My Plugin!' Can be used to realize own functions. Can also be used as a template. Instructions at the end of the file.
- mailaddress_hide : Converts email addresses characters to HTML entities to block spam bots.
Unclear how the protection of the email address should work. - mailaddress_hide_js : Converts email addresses characters to block spam bots By JavaScript.
- mailaddress_hide_js2 : Converts email addresses characters to HTML entities to block spam bots.
Unclear how the protection of the email address should work. - make_ruby : Display the ruby (HTML TAG) code - Anzeige des Ruby-Codes (HTML-TAG)
- no_cookies_text : Displays one or the other text. Depending on the value (true/false) of the privacy_agreed() function of the privacy plugin. The first text is displayed if cookies are not allowed, the second text is displayed if cookies are allowed.
- recently_changed : List of last modified pages.
- responsive_iframe : responsive iframe
- simple_google_map : Display Google MAP (responsive)
- simple_google_map2 : Display Google MAP By Js (responsive)
Settings
- Select "Simpleplugins_xh" from "Plugins".
- "Language" select, set your Translation.
- "Config" select, set your config.
For Developer: You will also make a simple plugin
Let's See simpleplugins_xh/simpleplugins_library/***/index.php . Very simple code!
Most simple plugin is simpleplugins_library/hellomyplugin/index.php
License
- Software License terms
GPLv3.
© 2015 T. Uchiyama
include List - Liste der Dateien
simpleplugins_xh
|- config
|- help
|- languages
|- simpleplugins_library
| |- add_qrcode
| |- admin_only
| |- bclock
| |- browser-shots
| |- g_adsense
| |- h_tag
| |- hellomyplugin
| |- mailaddress_hide_js
| |- mailaddress_hide_js2
| |- mailadoress_hide
| |- make_ruby
| |- no_cookies_text
| |- recently_changed
| |- responsive_iframe
| |- simple_google_map
| +- simple_google_map2
|- admin.php
|- index.php
|- README.txt
+- Simpleplugins_view.php
Library Explanatory Notes - Bibliothek Erklärende Hinweise
add_qrcode
Useage : {{{add_qrcode($string[,$size]);}}}
Example : {{{add_qrcode('http://cmsimple-jp.org',80);}}}
Output of the defined text as QR code in the specified size.
admin_only
Useage : {{{admin_only($string[,$class]);}}}
Example : {{{admin_only('This is Admin Only','xh_warning');}}}
Output of the defined text takes place exclusively in the administrator view. The style of the output corresponds to the specified format class.
bclockMain
Useage : {{{bclockMain()}}}
This Pyton script is to output the time as a representation of a running analog clock with date display. Python must be installed on the server for this. The script may collide with certain templates in editor mode.
browser_shots
Useage : {{{browser_shots($string [,$width, $height]);}}}
Example : {{{browser_shots('http://cmsimple-jp.org',300,225);}}}
The underlying service of this script from Wordpress is no longer available at the address used in the script. Therefore the output does not work.
g_adsense
Useage : {{{g_adsense();}}}
In the absence of a Google Adsense Key, the function could not be tested.
h_tag
Useage : {{{h_tag($string [, $h123 , $class])}}}
Example : {{{h_tag('Title2' , 2 , 'myclass')}}}
This function outputs the string (first parameter) inside
hellomyplugin
Useage : {{{hellomyplugin()}}}
Example : {{{hellomyplugin()}}}
Blind function here only outputs 'Hello My Plugin!' Can be used to realize own functions. Can also be used as a template.
Instructions: Extend Simpleplugins_xh with own functions.
mailaddress_hide_js
Useage : {{{mailaddress_hide_js($string)}}}
Example : {{{mailaddress_hide_js('yyy@xxxx.xxx')}}}
The
function is passed the email address as a string (i.e.
'empfängername@domin-name.tld') and outputs a java script and the text
'Mail' with onclick link to the java script for it. The e-mail address
is stored encrypted in the Java script
(1. CharCode(x-y), 2. y=shift
value).
mailaddress_hide_js2
Useage : {{{mailaddress_hide_js2($string)}}}
Example : {{{mailaddress_hide_js2('yyy@xxxx.xxx')}}}
The function is passed the email address as a string (i.e. 'empfängername@domin-name.tld') and outputs HTML code for it with a CSS class and an email link. However, the resulting source code contains the email address in plain text. It is therefore readable by today's spiders. I can't see how a protection of the email address should be realized here.
mailaddress_hide
Useage : {{{mailaddress_hide($string)}}}
Example : {{{mailaddress_hide('yyy@xxxx.xxx')}}}
The function is passed the email address as a string (i.e. 'empfängername@domin-name.tld') and outputs HTML code for it with a DIV container and an email link. However, the resulting source code contains the email address in plain text. It is therefore readable by today's spiders. I can't see how a protection of the email address should be realized here.
make_ruby
Useage : {{{make_ruby($string , $rp_string);}}}
Example : {{{make_ruby('Guten Tag','guutn taak');}}}
The function is used to output the phonetic transcription over a text. The first parameter is the string ('Guten Tag') which is output as normal continuous text. The second parameter is the string ('guutn taak') which is output as a small phonetic transcription above the first text.
recently_changed
Useage : {{{recently_changed([$count])}}}
Example : {{{recently_changed(5)}}}
The function outputs a link list of the n most recently changed pages. Where n is the parameter passed to the function and specifies the number of pages listed. The default value for n is 5.
no_cookies_text
Usage : {{{no_cookies_text($string_no_cookies , $string_cookies_allowed)}}}
Example : {{{no_cookies_text('Bitte erlauben Sie das Setzen von Cookies','Cookies akzeptiert')}}}
Addition to Privacy_XH plugin
Output text depending on whether cookies are allowed or not in Privacy_XH.
Calling the function in the article text is done like any function call:
{{{no_cookies_text('text if cookies are rejected', 'text if cookie set allowed')}}}
Be careful with single quotes! (') If such are in the text to be output, this will lead to a
serious error, because the PHP code will be destroyed.
If you absolutely need ', then specify with masking: \'
This seems to work in the tests.
Formatting generated by STYLE arguments may contain single quotes!
Avoid at all costs!
If a formatting is necessary, where it is not known if it does NOT contain single quotes,
then absolutely over the entire function call.
So that all information about the formatting is outside of the function call.
I.e. either before the three opening braces {{{ or after the closing braces }}}.
responsive_iframe
Useage : {{{responsive_iframe($url_string [,$background_color,$border_style,$max_width ,$min_width]); }}}
Example : {{{responsive_iframe('/ordner-im-root/zum-script/des/frame.html','#F8F8F8','3px solid #66FF66',640,280)}}}
The original function has been replaced by a general iframe function. The URL to the file to be displayed in the iframe is sufficient as a parameter, all others are optional. The URL can also refer to an address in the own server. Then it should be specified as a complete address from the root of the server. The background color of the iframe (default: #F8F8F8) should be specified as a hex number (whether with or without #). The styling of the border (default: 1px solid #FFF) must be specified completely with unit naming (px or em) and type of color setting (#, rgb, rgba, named color). There is no error catching! Incorrect specifications may cause the template to fail! The max. width (default: 1920px) and min. width (default: 300px) can, but do not have to be specified. The values are to be indicated in px as pure number!
simple_google_map
Useage : {{{simple_google_map($string [,$zoom,$width,$height,$enablescrollwheel,$disablecontrols]);}}}
Example : {{{simple_google_map('Tokyo');}}}
In the absence of a Google API, the function could not be tested.
simple_google_map2
Useage : {{{simple_google_map2($address [,$zoom ,$description ,$width,$height ,$map_type_control]);}}}
Example : {{{simple_google_map2('Tokyo');}}}
In the absence of a Google API, the function could not be tested.