{"id":3523,"date":"2008-08-12T01:01:40","date_gmt":"2008-08-12T01:01:40","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-syntax-rettke\/"},"modified":"2008-08-12T03:04:43","modified_gmt":"2008-08-12T03:04:43","slug":"wp-syntax-rettke","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wp-syntax-rettke\/","author":855339,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2","stable_tag":"1.2","tested":"2.6.0","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"wp-syntax-rettke","header_author":"Grant Rettke","header_description":"","assets_banners_color":"","last_updated":"2008-08-12 03:04:43","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/ryan.mcgeary.org\/wp-syntax\/","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/wp-syntax-rettke\/","header_author_uri":"http:\/\/www.wisdomandwonder.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1200,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566820","resolution":"2","location":"plugin","width":518,"height":243},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1566820","resolution":"3","location":"plugin","width":512,"height":183},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566820","resolution":"1","location":"plugin","width":659,"height":278}},"screenshots":{"1":"Scheme, an alternate syntax for let.","2":"Scheme, a non-hygienic, anaphoric macro.","3":"Scheme, an Ruby-like loop syntax."}},"plugin_section":[],"plugin_tags":[1214,1975,3986,2207,4609],"plugin_category":[46],"plugin_contributors":[129504],"plugin_business_model":[],"class_list":["post-3523","plugin","type-plugin","status-closed","hentry","plugin_tags-code","plugin_tags-formatting","plugin_tags-highlight","plugin_tags-syntax","plugin_tags-syntax-highlighting","plugin_category-editor-and-writing","plugin_contributors-grettke","plugin_committers-grettke"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-syntax-rettke.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-syntax-rettke\/trunk\/screenshot-1.png?rev=1566820","caption":"Scheme, an alternate syntax for let."},{"src":"https:\/\/ps.w.org\/wp-syntax-rettke\/trunk\/screenshot-2.png?rev=1566820","caption":"Scheme, a non-hygienic, anaphoric macro."},{"src":"https:\/\/ps.w.org\/wp-syntax-rettke\/trunk\/screenshot-3.png?rev=1566820","caption":"Scheme, an Ruby-like loop syntax."}],"raw_content":"<!--section=description-->\n<p>Out of the box, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-syntax\/\">WP-Syntax<\/a> \ncolors code using the default <a href=\"http:\/\/qbnz.com\/highlighter\/\">GeSHi<\/a> colors. \nPer the authors advice in the 'Advanced Customization' section of\n<a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-syntax\/other_notes\/\">Other Notes<\/a>,\nyou can configure GeSHi yourself by handling the <code>wp_syntax_init_geshi<\/code>\nhook and configuring it programmatically.<\/p>\n\n<p>Since I wanted to do just that, I decided to publish a generic plugin \nfor folks who wanted to configure GeSHi following this approach.<\/p>\n\n<h3>Release Notes<\/h3>\n\n<p><strong>1.2<\/strong> : Set keyword expansion in the plugin file. Uses Wp-Syntax 0.9, which depends on GeSHi 1.0.7.22.<\/p>\n\n<p><strong>1.1<\/strong> : Fixed grammatical errors in the readme.txt. Uses Wp-Syntax 0.9, which depends on GeSHi 1.0.7.22.<\/p>\n\n<p><strong>1.0<\/strong> : First public release. Uses Wp-Syntax 0.9, which depends on GeSHi 1.0.7.22.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload wp-syntax-rettke.zip to your Wordpress plugins directory, \nusually <code>\/wp-content\/plugins\/<\/code> and unzip the file. It will create a <code>\/wp-content\/plugins\/wp-syntax-rettke\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Create a post\/page that contains a code snippet following the proper usage syntax.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Why is your theme so sparse?<\/dt>\n<dd><p>I don't like distractions.<\/p>\n\n<p>My blog has a black and white theme, so I don't want any colors in the syntax\nhighlighting. The formatting that I care about the most is for Lisp.<\/p>\n\n<p>When reading Lisp (as opposed to writing it), I find that bold brackets and\nitalic comments make it very easy to follow the structure and flow.<\/p>\n\n<p>Taking the theme a little further, I also configured the <code>wp-syntax.css<\/code> to\nuse <code>SmokeWhite<\/code> colored borders, and tweaked the GeSHi <code>scheme.php<\/code> \nconfiguration to better reflect how you really code in Scheme (both are included\nas examples).<\/p><\/dd>\n<dt>How should I change the settings of the API calls?<\/dt>\n<dd><p>You may customize the GeSHi settings manually in <code>wp-syntax-rettke.php<\/code> \nusing whatever method you prefer. One option for doing so is using the built \nin 'Plugin Editor'. If you want to use the 'Plugin Editor', you should set \npermissions on <code>wp-syntax-rettke.php<\/code> to '666'. I keep the file under version\ncontrol, so I make my changes locally and ftp them to the server.<\/p><\/dd>\n<dt>Where do I start?<\/dt>\n<dd><p>Go the GeSHi <a href=\"http:\/\/qbnz.com\/highlighter\/demo.php\">demo page<\/a> and play\naround with the settings to get a idea of what you can change.<\/p><\/dd>\n<dt>How do I know what GeSHi API calls to make?<\/dt>\n<dd><p>Read the GeSHi <a href=\"http:\/\/qbnz.com\/highlighter\/geshi-doc.html\">API Documentation<\/a>\nand look for the call in there. Once you find it, double check that the call\nhasn't changed or been deprecated by going right to the source: download\nthe version of GeSHi listed in the release notes for this plugin. Then have a \nlook at <code>geshi.php<\/code>.<\/p><\/dd>\n<dt>How do I make my changes take effect?<\/dt>\n<dd><ol>\n<li>Deactivate this plugin.<\/li>\n<li>Apply your change (see How should I change the setting of API calls?).<\/li>\n<li>Activate this plugin.<\/li>\n<li>Your change should apply immediately upon reloading the test page of your choosing.<\/li>\n<\/ol><\/dd>\n<dt>The API calls are not changing the highlighting in the manner that I expect it to be changed. What should I do?<\/dt>\n<dd><p>Some of the API calls <em>appear<\/em> to be too general, or vague. Take, for example,\n    set&#095;keyword&#095;group&#095;style.<\/p>\n\n<p>You can specify the number for any group, and while the groups are discussed in\nthe documentation (see Setting Keyword Styles), \neven there it is not very clear what tokens show up in \nwhat group. <em>This<\/em>, is <em>by design<\/em>.<\/p>\n\n<p>The language formatting configuration file\nauthors are free to put whatever tokens into whatever groups they wish. So,\nif you are not getting the results you desire for a particular languge, then\nyou need to go right to the language file itself \n(located in <code>\/wp-content\/plugins\/wp-syntax\/geshi\/geshi\/&lt;your-lang&gt;.php<\/code>) \nto figure out which group you should be setting, but are not setting, \nand make the change.<\/p><\/dd>\n<dt>What if I don't like how Wp-Syntax works?<\/dt>\n<dd><p>Then you need to go the the \n<a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-syntax\/\">WP-Syntax Website<\/a>.\nThey've got great forums and documentation there.<\/p><\/dd>\n<dt>What if I don't like how wp-syntax-rettke works?<\/dt>\n<dd><p>The best thing for you to do is to use my theme as a template, follow my\nnotes, and create a theme of your own!<\/p><\/dd>\n<dt>What if I don't like how GeSHi parses my code?<\/dt>\n<dd><p>You've got the option to tweak the language files yourself. They are located\nin <code>\/wp-content\/plugins\/wp-syntax\/geshi\/geshi\/&lt;your-lang&gt;.php<\/code>. The process is quite simple, you will get\ngreat results in no time.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"wp-syntax-rettke serves as an example for the programmatic \n&quot;Advanced Configuration&quot; of GeSHi in Ryan McGeary&#039;s excellent WP-Syntax plu &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=3523"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/grettke"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3523"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3523"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3523"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3523"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3523"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}