Inline AJAX More
Inline Ajax More is a plugin that displays content that is hidden by WP’s <!– more –> Tag on the same page using AJAX (instead of linking to another page).
This is the new home of the plugin, because my friend’s server where the old site was hosted went down. I still have a back’uped version of it (courtesy of archive.org).
* Easy installation – no fiddling with templates, tags or source code.
* Automatically transforms every “Continue reading …” link
* Loads content in background – not everything is loaded at page load and then hidden.
* Has options panel to set FX, duration busy XHTML, an texts for (more & less) links
* Correctly escapes non-standard HTML characters, eg. german Umlaute
* Download newest Version (v1.1 – 31.03.2010) – iam-1.1.zip.
* Extract and upload to you wp-content/plugins directory on your webserver (it should be in a folder called ‘inline-ajax-more’ in your plugins dir).
* Go to admin->Plugins.
* Find ‘Inline Ajax More’ and click on activate.
* Go to ‘Plugins->Inline Ajax More options’ and set desired options.
since positive relying on browscap’s returns would result in disabling IAM just for the mere reason that browscap is not installed on your server which is not what we want.
* Appearing FX, default: Appear
Sets the site-wide effect for blending in of content.
* Dis-Appearing FX, default: Fade
Sets the corresponding vanishing effect.
* Duration for FX in seconds, default: 6
Sets the duration for both effects in seconds, 3-10 works best.
* Busy Pic, default: <p align=”center”><img src=”<path to working.gif>” alt=”loading” /></p>
Sets XHTML that is displayed while loading.
* JS-disabled detection, default: disabled
Disables the JS-detection that works with the <noscript> tag. This is sometimes neccessary, because of the way the link is added to the document in the <script> section, when the XHTML needs to contain quotes.
Set to ‘disable’ if your XHTML needs to contain quotes.
* “Read More” link text, default: Continue reading %s… »
Sets the text, that is displayed as the read more link in your posts. %s will be replaced by the title of the current post. This can be overriden by the translator by translating ‘Read more’ .
* “Read Less” link text, default: « Read less of %s …
Sets the text, that is displayed as the read less link in your expanded post. %s will be replaced by the title of the current post. This can be overriden by the translator by translating ‘Read less’
* Use browscap.ini file for user brower’s JS-capa detection, default: disabled
This will check first if the browscap directive is set in your php.ini, for that it needs access to php.ini first, and then checks if the linked browscap.ini exists.
Lastly, it will call get_browser() and only enable the option if it returns something meaningful, meaning that browscap is installed and running, regardless of its success of opening php.ini.
* FX look very much alike
* Screws up non-standard international HTML characters. I suspect I have to set the text-encoding somehow. (fixed 2.4.06 – v0.9)
* v0.1 (27.3.2006):
-basic stuff running
* v0.5 (28.3.2006): (download – 155 downloads)
-added options for duration and pic
-changed wording of link to wordpress style
-RegEx now correctly matches only “Continue reading…” link
* v0.6 (30.3.2006, 0815h GMT: (download – 148 downloads)
-fixed multiple clicking bug (Thomas Lee Elifritz), which was stupid JS error
-> now correctly re-displays content without reloading it from the server (should actually have worked before?)
* v0.7 (30.3.2006, 2300h GMT): (download – 201 downloads)
-fixed incompatibility with Inline-ajax-comments plug, functions had same names (*doh*)
-added hack to put a <!–more2–> on pages where <!–more–> tags get stripped out, and the content is shown instead (for the example)
* v0.8 (2.4.2006, 1910h GMT): (download – 207 downloads)
-fixed non-HTML characters malformed bug (thx Sebastian)
* v0.9 (19.4.2006, 1735h GMT): (download – 520 downloads)
-changed onMouseUp to onmouseup (validates better)
-added ‘read less’ link at top
-added some comments to added HTML
-removed \n in <a> tag, so that it doesn’t get screwed up by WP’s format plug
-i18n’ed ‘read less’
-<!– more2 –> now displays correct title when used on a page
* v0.9.4 (21.7.2006, 2020h GMT): (download – 534 downloads)
-replaced scriptaculous 1.6 by 1.6.1
-added support for TER (experimental)
* v0.9.8 (14.10.2006, 0900h GMT): (download – 74 downloads)
-replaced script.aculo.us 1.6.1 by 1.6.4
-added admin options for
1) text of read more link – replaces %s with title
2) text of read less link – replaces %s with title
3) XHTML for pic instead of just pic URL
-added checking for JS capa of browser… but can only tell if JS is supported not if its actually enabled
-added some try..catch to JS
-should let browser handle-link click if something went wrong in loading-code
-and gives user the option of going to perma-page if something went wrong while displaying later
-if something goes wrong while hiding, a message appears
* v0.9.9 (17.10.2006, 0600h GMT): (download – 390 downloads)
-finalized document.write() JS surrounding of whole link – enables us to have a <noscript> section – that is displayed if JS is completely disabled
-had to add IAM_disable_JS option to disable the whole JS surrounding, because it does not allow quotes in the Busy-XHTML, because of the way
the document.write works in this case – so if it contains quotes (single|double), this option needs to be checked
-had to do this by a select rather than a checkbox since IAM_update seems to get called regardless of actually updating
-removed superfluous <img src=…> code in admin in description of Less and More link text
-added temporarily disabling of error reporting for get_browser, so that PHP does not complain if ‘brows_cap’ directive is not set in php.ini
* v1.0 (16.07.2007, 0333h GMT): (download – 17 downloads)
-updated scriptaculous to 1.7.1_beta3 (from 25.5.2007) w/ NEW prototype 126.96.36.199 (from 19.6.2007)
-L183 added /…(class=”more-link”)?/ to REGEX search string, WP2.2 seems to incorp. TER already?
-reversed logic of browscap checking, coz it used to fail when the browscap.ini wasnt installed
-now it only disables JS when it is really sure, i.e. when get_browser succeeds and says the browsesr doesnt speak JS
-had to change <!– more2 –> to <!– 2more2 –> coz WP2.2 now matches /<!–more(.*?)?–>/ as more tags
-added Shake, Pulsate and Highlight to the appearing FX, though they are not appearing anything, they are more to “highlight” whats already there
-now only loads the effects and not all of 100kb scriptaculous by using “?load=effects” in “<script src=…” statement
* v1.0r01 (17.07.2007, 0058h GMT): (download – 215 downloads)
-added function check_browscap() that tries to open and parse php.ini to find browscap directive and checks existence of browscap.ini
-calls get_browser in the end and checks for meaningful return, if so it will enable a selection to enable the browscap check
-is called in admin-options panel and gives feedback on findings
-browscap is then only used if enabled in admin-panel
-still uses only negative feedback, to not use JS only when browscap works and says that browser doesnt support
-added option IAM_browscap that can only be set to true, when check_browscap returns true
-if check_browscap returns false it will disable the selection and set IAM_browscap to false
18.07.2007, 1415h GMT:
-added version checker in admin panel
* v1.1 (31.03.2010, 1035h GMT-8):
-changed scriptaculous/prototype version to newest (1.6.1)
-two small changes to make it work with newest WP version 2.9.2
-moved HP and version check over to my new blog at derdocsblog.wordpress.com, resp. the file area at web.mac.com
-if version string is not online, now defaults to ???
* A Version of ‘inline ajax comments’ that automatically adds the link, without source-code editing, and uses script.aculo.us, too.
FX other than Appear and Fade don’t seem to be too amenable to large content, do not worry if you do not see any change in the Effect.
I hacked the plugin so that it recognizes and correctly translates <!–2more2–> tags as well, and also so that this content is stripped from normal content.