MondoKode-Zoomer
MondoKode-Zoomer provides an overlay window for kode formatted with the wp_syntax plugin.
Plugin info
Maintenance & Compatibility
Maintenance score
Possibly abandoned • Last updated 6069 days ago
Is MondoKode-Zoomer abandoned?
Possibly abandoned (last update 6069 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
MondoKode-Zoomer was created for blogs that have a narrow reading column but will
be embedding code using the wp_syntax plugin. A narrow column is a pleasure to read
and there is a reason for this.
“That’s why newspapers have narrow columns: It makes them faster to read.”
- Amar Sagoo Tofu web page
However, it is a nuissance to have a narrow width constraint when presenting kode. I’ve caught myself
reformatting kode on numerous occasions in hope of eliminating the horizontal scrollbar.
With this plugin you can spend more time sharing kode and less time formatting it for a skinny column.
Basic Usage
Add a zoom attribute to a pre block that wp_syntax formats. Valid values for the
attribute are “yes” and “no”.
The attribute is not required. When it is not present zoom is not enabled.
Wp-syntax Changes
To allow wp_syntax and MondoKode-zoomer to play nicely you need to use the version of wp-syntax.php
provided with this plugin. The changes to the file are listed here, do a diff comparison with the
original to see the changes in detail.
- zoom is added as a supported attribute in $allowedposttags and $allowedtags.
- The regular expression in the wp_syntax_before_filter function has been modified to allow the zoom attributed.
- In the wp_syntax_highlight function some logic was added to add the wp_syntax_zoom css class to
a div block if zoom was enabled.
Usage
Use regular wp-syntax formatting commands but add the zoom attribute if you want the kode to zoom.
It’s that simple.
Example 1: Enabling zoom
Example 2: Explicitly disabling zoom
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Example 3: Zoom is implicity disabled because the attribute does not exist
class Example
def example(arg1)
return "Hello: " + arg1.to_s
end
end
Installation
- Upload MondoKode-zoomer to your WordPress plugins directory, usually
wp-content/plugins/and unzip the file. It will create awp-content/plugins/MondoKode-zoomer/directory. - Copy
wp_syntax_Override/wp-syntax.phptowp-content/plugins/wp-syntax. The reasons for doing this are explained
in the wp-syntax changes section below. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Create a post/page that contains a code snippet following the proper usage syntax
and add the zoom attribute if you want to make it zoomable.
Frequently Asked Questions
Empty.
Review feed
Screenshots
Changelog
0.1 : First release;