Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
.Net VCL for Delphi 1.0.0.0
ASP. NET C# PDF Software 4.5
LinqConnect Professional 4.8
CAD VCL: 2D/3D CAD in Delphi/C++Builder 14
wolfSSL 3.15.7
CAD DLL 14
AnyStock Stock and Financial JS Charts 8.4.2
ODBC Driver for SQLite 2.4
dotConnect for SugarCRM 1.7
dbForge SQL Complete 5.9
dbForge Studio for MySQL 8.0
.Net Runtime Library for Delphi 6.0.4.0
Scimbo 1.64
AnyMap JS Maps 8.4.2
GetOrgChart 2.5.3
Top Code
RED SNAKE GAME 1.1
PDF Focus .Net 4.0.1
Ticket Booking System 1.0
Network-Integrated Multimedia Middleware 2.2.0
Simple Webinterface Shopsystem for Shopping Carts 0.4
College Management System Script 1.0.4
Zip Zag 1.4
VisualEffectMotion Script 1.1
.NET Interop for Visual FoxPro Applications
Vapor compression cycle component models 1.0
Helpdeskphp - PHP Help Desk Software 1.0
Simple Skin segmentation 1.0
Visual FoxPro Functions/Class Libary 100
Dream Inspector 4.01
Help Desk Reloaded Free MySql PHP help desk software II.80
Top Rated
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
PHP Digital Download Script 1.0.4
Previous/Next API 6.x-1.x-dev
File ID: 101667






Previous/Next API 6.x-1.x-dev
Download Previous/Next API 6.x-1.x-devhttp://drupal.org/Report Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 4
Submit Rating:
Previous/Next API 6.x-1.x-dev Description
Description: This module allows you to know the previous or next nodes for any given node. This is very useful for providing navigational links to the user without the expensive queries required to dynamically deduce such information on the fly.

The use case is two fold:
Usability/Navigation

For example, on a site with a gallery of images, you want to show a next/previous link with a thumbnail under each image. Your site's visitor click on the link to show new content or browse it.
Scalability

Although the previous and next nodes can be deduced with some SQL work, the queries to do so are very heavy on the database, and can bring a site to its knees. This module solves this problem by storing the previous/next node in a table so lookups are fast. Once the module is installed, it will build this index backwards via cron until all nodes have been indexed. See the "More Info" section below for a detailed post on the positive scalability impacts of implementing this module.
Configuration

The module can be restricted to certain content types to be included in the previous/next indexing. For example, you want the site's visitors to browse through video and image nodes only, but not blogs and regular pages.

The number of nodes to index is defined in the settings too. The default is 200, but you may want to lower that for a site on shared hosts. Once the indexing is complete for all the site's nodes, cron will do do anything. You can always reindex the site using the "Re-Index" button on the settings page.
API

The module provides only one API call. If you do not call that function, this module will do nothing.

<?php
$n_nid = prev_next_nid($nid, $op);
?>

Examples for using it are:

<!--QuoteBegin--><!--QuoteEBegin--><?php
// Get the previous node id
$prev_nid = prev_next_nid($nid, 'prev');

// Get the previous node id
$next_nid = prev_next_nid($nid, 'next');
?><!--spoiler_text_end--><!--/dp_spoiler-->
Example

To implement the functionality for this module, please see the example in the README.txt file provided with this module.
Future development

At present, the module does not provide for indexing content by criteria other than the node type.

Other use cases may call for additional criteria, for example, a term id, so content is browsed by taxonomy terms. This will require database schema changes and reindexing of the site again.

If you have a patch to do this, please submit an issue for it.
More info

For more info on the performance impact of this module on large sites, please read Previous/Next API: a high performance API module for previous/next node.
Sponsors

Development sponsored by: WebMediaBrands for Ads of the World
Author

Khalid Baheyeldin of 2bits.com.

The author can also be contacted for paid customizations of this module as well as Drupal consulting, installation, development, and customizations.

License: Freeware

Related: Module, Nodes, Content, previous, Site, previousnext, prev nidnid, Indexing, Performance, Image, Database, Index, criteria, customizations, Settings, Queries, Browse

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 4



More Similar Code

This module allows you to know the previous or next nodes for any given node. This is very useful for providing navigational links to the user without the expensive queries required to dynamically deduce such information on the fly.

The use case is two fold:
Usability/Navigation

For example, on a site with a gallery of images, you want to show a next/previous link with a thumbnail under each image. Your site's...



Custom Pagers allows administrators to define context-sensitive previous/next pagers for any node type. The list of nodes to be cycled through is generated by a user-selectable view, and each pager can be displayed above or below the node body or...



PHP 5 is required since version 1.2.

When displaying a single post, you might want to show links to the previous and next posts in the same category.

That's fine; WordPress let's you do this with previous_post_link() and...



Active Pager is a database tool which is used to add a paging tool to a data grid component. It offers useful navigation tool which helps the users to navigate between different pages using previous, next, drop down selector, first and last page,...



This is an ASP.NET tutorial through which you can learn how to build a generic pager control with first, previous, next and last paging buttons. In this article the author clearly explains the features of generic pager control. You can see the...



Slideshow style image gallery that features webbased uploading, password protected admin editing/deleting, previous/next buttons, quickjump links, automatic time delay slide show, folder-style tabs for unlimited image categories, current category...



This script is used for PHP Nuke. It shows you the comments of the past number of posts submitted by your site visitors through phpBB Forum in a PHP nuke block. Previous, next and up keys are given to select and view the comments. It also allows...



Multilingual guestbook that features seven layouts, auto-generation of previous/next pages, numeric site-rating, image inclusion, email notification, IP blocking, adjustable time difference, bad words filter, duplicate entry blocking, and a...



Fading XML Image Scroller Gallery & Menu & Banner Rotator & Slideshow with scrollbar component, autoPlay, previous, next buttons and scrollable text description box ( SPECIAL intro price ).

Key Features:

* Easy to...



Fading XML Image Scroller Gallery & Menu & Banner Rotator & Slideshow with scrollbar component, autoPlay, previous, next buttons and scrollable text description box ( Flash CS3 / CS4 and above / AS3 version ).

Key...

User Review for Previous/Next API
- required fields
     

Please enter text on the image