WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Read More Right Here

Automatically transform your 'more' links into "view right here" links that immediately display the rest of your entry.

2.0.0

Both client-side and server-side code underwent a major refactor.

The following persistent options were added using the WordPress Settings API

  • Loader Image: Images found in the "loader" directory can be selected as the displayed "ajax spinner" image. You can also choose to display nothing.
  • Link Text On Expanded Content: The 'more link' text displayed when new content is displayed (e.g. 'read less').
  • New Content Expand Speed: The animation speed at which the new content expands.
  • Duplicate More Link: If selected, a duplicate 'more link' is appended to the bottom of new content when it is displayed.
  • Use with WordPress Pages: If selected, the plugin will work on single pages containing a 'more link'. See here for more information.
  • Use UTF-8 Decode: If selected, the 'more' content retrived will be passed through PHP's utf8_decode function. It might help for situations such as this
  • Use Debug Script: If selected, the uncompressed javascript used by the plugin will be loaded to help with debugging any issues.

Also added are client-side "events" using jQuery's trigger method. Other scripts loaded to the page can hook into these events to offer additional functionality.

  • 'RMRHContentExpanded' is triggered when the new content is displayed
  • 'RMRHContentCollapsed' is triggered when the new content is hidden

Sample code for handling these events can be found in the FAQ section.

1.1.4

The follow two issues were addressed with this update.

how do you modify the font characteristics in “read-more-right-here/read-more-right-here.php” file for the “read less” text?

The 'rmrh-show-more' class is now added to the 'read more' anchor element. When click, and new post content is pulled, that class is replaced by 'rmrh-show-less'. So with each click, the 'rmrh-show-more' and 'rmrh-show-less' classes toggle. This means that a CSS selector like 'a.rmrh-show-more' and 'a.rmrh-show-less' can be used to style the links.

What is the call function?

The issue above relates to a situation in which new posts are added dyanmically to the page, and therefore the RMRM plugin is not executed against that new content. In this specific case, the user has the Infinite Scroll plugin activated. This plugin allows you to specify a callback function to execute after new posts have been added to the page.

RMRH was updated to expose the function '$.fn.ReadMoreRightHere'. If called directly, RMRH will execute against the entire document (ignoring any 'read more' links it's already seen). If any argument is passed, it will be treated as the context in which RMRH will execute. For the Infinite Scroll example, this will work:

    $.fn.ReadMoreRightHere();

So too will this:

    $.fn.ReadMoreRightHere(arguments[0]);

The second version will restrict the RMRH plugin to searching for 'more links' to only the new posts added by Infinite Scroll.

1.1.3

Certain code paths called an as-of-yet undefined function. Function now defined earlier. Thanks to Boutros for reporting the issue and helping to debug.

1.1.2

Previous version using jQuery function not yet available with latest WordPress release.

1.1.1

Previous version inadvertently left non-default values.

1.1.0

This update is to address the following two issues:

RMRH will not work if the 'more' link has been modified

Previously, RMRH was determining the 'more' links based on WordPress's default class for those links. The post ID was determined using the anchor's named element (e.g. #more-388 where 388 is the post ID). That information is now obtained using a custom class inserted into the link with the WP 'the_content_more_link' filter. This means that other plugins, which modify the final 'more' link format, will not interfere with this plugin.

However, a few of the plugins I found that allow you to modify the 'more' links output do not use the WP 'the_content_more_link' filter. They instead modify the entire contents of the post. The 'the_content_more_link' filter runs while WP is formatting the content, and then that content is passed through all registerd filters. The 'more link' modifying plugins I have looked overwrite entire sections of the link (as opposed to inserting new text when appropriate). So it is almost certainly likely that if you are using one of the 'more link' modifying plugins, it will not be compatible with this one.

'console' is undefined error

I inadvertently left debug output in the javascript with my previous version. SORRY.

New Features:

The current version of this plugin remains free from leaving any remains of itself behind if uninstalled. However it is likely that future version will being to include a proper options page in the admin section of WordPress. This release is a step in that direction in that new features are available, but only by modifying variable values directly in the plugin. Please Note: Any changes you make to the plugin directly will be overwritten by an update to that plugin.

Each of these options are available within the wt_rmrh_oninit function of the read-more-right-here.php file.

  • Change 'more link' text when content displayed: You can enter new text that will be displayed as the 'more link' after the user. The original text will be returned when the user clicks the link again (collapsing the content)

  • Duplicate the 'more link' to the end of the post when the post is expanded. If the duplicate link is clicked, the browser will first scroll to the position of the original link, and then collapse the content.

  • Change the content expand/collapse animation speed

1.0.5

Internet Explorer 7 and up will not display the 'object' element (e.g. embedded flash content) when its dynamically inserted. If that is the browser in use, and if an 'object' element is found in the new content, the page will immediately redirect to the single post display (instead of expanding to show the new content).

The expand/collapse animation with 'object' elements looked pretty bad. Now, they are not shown until AFTER text has expanded. When collapsing, they are hidden BEFORE the text begins to move.

Using the proper 'is_admin' WP function to keep plugin out of the admin area. This was previously done with a PHP 5 only string comparison function against the URL. If the server was still using PHP 4, this function would break things.

1.0.4

Method used to obtain plugin's root directory no longer worked with 2.8.1 update. It has been changed to use the new:

    plugin_dir_url(__FILE__)

This change means that the minimum version of WP now required is 2.8.

1.0.3

WordPress 2.8 updated its included version of jQuery to 1.3.2. This required a very minor change to the plugin javascript code. The new jQuery version provides a much smoother animation of the content into and out of view.

For those interested (and because I have no idea why this broke), the change in code was essentially creating the new content with this:

    $j("<p>").html(newContent);

instead of this:

    $j("<p> + newContent + </p>");

1.0.2

Almost immediately after releasing 1.0.1, I became aware of the 'wp_localize_script' function (see Best practice for adding JavaScript code to WordPress plugins). It negates many of the javascript changes implemented in the previous release and offers a much better solution.

1.0.1

Plugin would not function correctly with installations in which WP is used as the root of the domain but the actual WP installed files are within a subdirectory of the root (see codex Giving WordPress Its Own Directory). This has been fixed (thanks to Thijs for the heads-up and solution).

Part of the fix means that the full plugin path used to get the animated "loading" image is retrieved as an AJAX call. If the user clicks a "read more" link before that call has completed, there will be no GIF associated with that link (but the content will still be pulled and expanded for the user).

1.0.0

Initial Release

Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2012-1-13
Downloads: 46,749

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
60,5,3 100,1,1 100,1,1
100,2,2
80,10,8
0,1,0
100,1,1
33,3,1
100,1,1
100,1,1
50,2,1
0,3,0
60,5,3
100,1,1
33,3,1
50,2,1
100,1,1
0,2,0