Ajax Nodeloader module allow you easy:

  • Load and display Drupal nodes via AJAX technology
  • Use custom css selectors for display your content (body, title, etc)
  • Support loading any of node fields (D7)
  • Track your AJAXified links with Google Analytics (option)
  • Use advanced navigation based on HTML5 history API or hashtags (back/forward button, share your links) (option)
  • Dynamically change browser title with your node title (option)

Examples:

1. To load node via AJAX you should add class "nodeloader" to link for node you want to load , i.e.:

<a href="/hode/1" class="nodeloader">Test link</a> for load /node/1.

Alias path also supported:

<a href="/contacts.html" class="nodeloader">Test link</a>

2. Module have patrial support for hashtag navigation, for example link to page
http://yoursite.org/#/contacts.html

will load /contacts.html page instead of main page of "yoursite.org"

3. To make your menus load nodes via AJAX you can use module
http://drupal.org/project/menu_attributes

4. Added support for custom display-to targets selectors via rel attribute and JSON. Example:

<a link="/node/2" class="nodeloader" rel={'title':'#selector1','body':'#selector2'}>This link shows your node #2 title in id="selector1" element, and your node #2 body in id="selector2" element</a>

You can point title or node separately from each other, so

<a link="/node/2" class="nodeloader" rel={'title':'#selector1'}>Only title custom target</a>

or

<a link="/node/2" class="nodeloader" rel={'body':'#selector2'}>Only body custom target</a>

also allowed. Custom target string must be single quoted for correct work.

5. Enable or disable Google Analytics tracking with Ajax Nodeloader in your admin panel.

6. Drupal 7 version now can load and display all node fields instead only body field by default.

You can load field to custom selector use the same syntax. For example, if you have custom fields "field_text" and "field_price" you can load them by this way:

<a href="/node/2" class="nodeloader" rel="{'title':'#some-id-selector1','body':'.someclass span','field_text':'#some-id-selector2','field_price':'#selector3'}">Load title, body and custom fields link</a>

Module will support fields labels soon.

2. Project page: http://drupal.org/sandbox/nick-denry/1447152 and GIT URL: git clone http://git.drupal.org/sandbox/nick-denry/1447152.git ajax_nodeloader

Comments

Nick Denry’s picture

Title: Ajax Nodeloader » Ajax Nodeloader (D7)
rudiedirkx’s picture

Project page URL? Very useful!

The GIT URL is wrong. Only you can log in like nick-denry@... Good URL: git clone http://git.drupal.org/sandbox/nick-denry/1447152.git ajax_nodeloader

Nick Denry’s picture

>>Project page URL? Very useful!

Sorry, first time on drupal.org, do u mean web-page for this project?

>> The GIT URL is wrong. Only you can log in like nick-denry@...

Fixed, I guess. Sorry one more time.

rudiedirkx’s picture

Yeah, the project's page: http://drupal.org/sandbox/nick-denry/1447152

Also, explain what it does better. I shouldn't have to download it to know that. Load what? Load how? And do what with it?

Put all this in the original issue, not a comment.

rudiedirkx’s picture

Issue summary: View changes

Fix git url for non-mantainer

rudiedirkx’s picture

Issue summary: View changes

Good URLs

rudiedirkx’s picture

Oeh I like this one...

A few functional things though:

1. HTML 5 introduces the History API. (Is that what it's called?) history.pushState() and the popstate event in particular. Use that. Nobody likes #.

2. The node view isn't complete. Reproduction is simple: add and display a few fields. Load them via nodeloader. Only the body will show. What if I don't have a body, but I do have a lot of fields?

3. If I link to /, I get a 404 back. The frontpage isn't ajax_nodeloadable?

And a few technical things:

1. Don't define functions like load_node if your module is called ajax_nodeloader. Prefix everything with your module's name. I.e. ajax_nodeloader_load_node.

2. Don't do this:

    $language = 'und';

What's und? Use LANGUAGE_NONE, if you really must. But don't. Use field_view_field to load a node's field values. Explore the Field API. It's awesome. Drupal contains (almost) everything you need. Things like this aren't necessary:

		$system_path = drupal_lookup_path('source',$nid);
		$path = split('/',$system_path);
		if ($path[0] == 'node')

3. Automated code review issues here. You can use this tool yourself.

Nick Denry’s picture

Status: Needs review » Needs work

>>Oeh I like this one...

Sorry, is it was sarcasm?

Nick Denry’s picture

Issue summary: View changes

Link

rudiedirkx’s picture

Nope. Not sarcasm. I like it. (That's why there's "though" in first issues title.) Are you worried?

PS. There's a Quote button in your editor. Use that instead of >>. For code, use the code or PHP button. Etc.

Nick Denry’s picture

>> Are you worried?

No, I hope not :) Just think is that required conditions to confirm project as useful or not (as I said, I first time there and don't know drupal policy so good).

1. Also I knew about History API, but my own purpose first of all was support of old browsers, which unfortunally don't support History API. But History API can be additional functionality in next versions of this module. (BTW as you can see it have version 0.01 beta).

2. What fields do you mean for example?

3. Yes, frontpage itself now not ajax_nodeloadable, if it hasn't associated node, like /node/1, which link for logo for example can be overrided in custom theme. But I guess this not make it more useless for some kind of sites. I'm trying to keep this module simple first of all, before it became fat and unuseful, so I want implement new functionality step-by-step.

-----
Working on your technical comments...

Nick Denry’s picture

Btw module was created for commercial site, you can see it in action here , (I'll remove link to this test domain after your answer), I've seen some implementation of ajax node loads, but all of them was non-full cookbooks, and I guess module like this can save time for few people, I hope for it :)

Nick Denry’s picture

Title: Ajax Nodeloader » Ajax Nodeloader (D7)
Status: Needs review » Needs work

PS. There's a Quote button in your editor.

Thanks

Nick Denry’s picture

Issue summary: View changes

fix typerrors

Nick Denry’s picture

Issue summary: View changes

Correct module description to actual state

rudiedirkx’s picture

A module's usefulness is a condition. There are way too many useless, bad, broken and identical modules around. It also means a module maker has to think about their module (and its usefulness) and that's good.

I can't find a module that does what (I think this module) does/should do, so that's good. Can you?

1. You can use HTML 5 as progressive enhancement. If it's not available, use the #path option. Next version is fine.

2. I mean any and all fields. Try it. Add a few fields to your node type, fill them and load that load via your module. The fields won't show. As bad: remove the body field and you'll get a notice. Not all node types have a body field. You can remove it and some people do that. So instead of showing the node's title & body, show all of it, or whatever the user has set in his node type's "Manage display" tab. Follow and explore the URL I gave you. The Field API is awesome.

3. You could make any page ajax loadable by sending the full URI. Substract Drupal.settings.basePath from the link's href and send that part. Might be "node/1" or "" (empty for frontpage) or "content/some-alias/349". You can use Drupal's router to find the node. Not difficult, but very powerful. (You might have to google some.)

Don't expect responses as quick as this any more =) There are over a hundred modules in line for review, so I should've let you wait a few days. Take a few days to perfect it. Your friends: field_view_field, node_view, menu_get_item etc.

misc’s picture

Welcome with your application!

A short manual review:

Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
License
Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
ajax_nodeloader.info
Please remove $Id$ and package = Other and version (Drupal does not use this kind of versions)
ajax_nodeloader.module
$output = false should be $output = FALSE, if you really need to set a FALSE value here?
Always name your functions with the modul name first, function load_node() should be ajax_nodeloader_load_node or maybe better _ajax_nodeloader_load_node.
ajax_nodeloader.js
It says: Original JavaScript code. Is this by somebody else?
ajax-loader.gif
Have you created this image, or is it taken from somewhere?

Automatic review:
http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git

You have some code formatting to take care about.

Please ask if you have any questions. We are here to help each other.

misc’s picture

Welcome with your application!

A short manual review:

Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
License
Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
ajax_nodeloader.info
Please remove $Id$ and package = Other and version (Drupal does not use this kind of versions)
ajax_nodeloader.module
$output = false should be $output = FALSE, if you really need to set a FALSE value here?
Always name your functions with the modul name first, function load_node() should be ajax_nodeloader_load_node or maybe better _ajax_nodeloader_load_node.
ajax_nodeloader.js
It says: Original JavaScript code. Is this by somebody else?
ajax-loader.gif
Have you created this image, or is it taken from somewhere?

Automatic review:
http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git

You have some code formatting to take care about.

Please ask if you have any questions. We are here to help each other.

Nick Denry’s picture

Thank you for your comments, will try to fix/remove wrong technical things you've point. Hope see you here after few days.

MiSc

Also thanks, questions be here next day(s) I guess, now alot to do and to learn, and it's already night in my timezone.

Thanks all.

Nick Denry’s picture

ajax_nodeloader.js
It says: Original JavaScript code. Is this by somebody else?

It's from from the Drupal 7 upgrade guide:
http://drupal.org/update/modules/6/7#javascript_compatibility

I'm new to Drupal 7 instead of 6, so that was a bit problem for me. Init code

(function ($) {
  // Original JavaScript code.
})(jQuery);

was copied as is from that guide.

ajax-loader.gif
Have you created this image, or is it taken from somewhere?

Image was created via service http://ajaxload.info/
Service habe point that "Generated gifs are totally free for use" at the bottom of the page. Is there MUST be any licence information for it?

Nick Denry’s picture

Status: Needs work » Needs review

Technical and formatting things fixed, need review

Nick Denry’s picture

Issue summary: View changes

Make info more useful

Nick Denry’s picture

Add information about custom-display targets

Nick Denry’s picture

Issue summary: View changes

Add information about custom-display targets

Nick Denry’s picture

Issue summary: View changes

Fix JSON string

rv0’s picture

Had a brief look as I'm looking into doing this properly myself.

It doesn't seem to use a lot of the standard drupal 7 javascript stuff (which is why I checked this module, I'm looking for examples)
Also has some drupal coding standards errors (like the placement of the { bracket on a new line)

I also dont think it will attach js behaviors and css, which seems like a must to me?

Nick Denry’s picture

Thank you for spent your time with review.

1. I knew already about Drupal.attachBehaviors, but could you point me about the same with css?

2.

Also has some drupal coding standards errors (like the placement of the { bracket on a new line)

I need some info about drupal code standarts, because following automatic review tool messages don't point me to a brackets in javascript. Is automatic review tool only for .module files? (btw I've remember, I have some warnings about js from automation tool, but not now).

Also, could someone tell me about how-to make properly CHANGELOG file? How I can point and determine current version of my module?

Also I'm looking some information about structure of branches for 6.x, 7.x Drupal versions and also developer branch.

Thanks in advance.

Nick Denry’s picture

Also please point what do you mean with "standard drupal 7 javascript stuff".
Thank you.

rv0’s picture

google is always a good friend: http://drupal.org/coding-standards

rv0’s picture

Issue summary: View changes

Fix typeerrors

rv0’s picture

Might be interesting to you:
http://www.computerminds.co.uk/comment/2014

Nick Denry’s picture

Title: Ajax Nodeloader » Ajax Nodeloader (D7)
Status: Reviewed & tested by the community » Needs review

Thanks, quite interesting!

It's will need to be maneuver between d6 and d7 versions of this module, but I'll see the way to use that anyway.

First of all I want js part to be unified between module versions in base parts.

Next ver I want implement HTML 5 history (patrial maybe) support and I'll search the way to load page-related blocks.

Can anyone point me to right CHANGLOG making? In correct Drupal way, can't find info unfortunally.

rv0’s picture


(optional) Before committing a major change, add a change log entry to CHANGELOG.txt that summarizes the change. Wrap the text at 80 characters. Some projects are listing all changes in CHANGELOG.txt; you should follow the existing or agreed-on practice.

source: http://drupal.org/node/363367
Just check the changelog of drupal core to see how it goes..
http://api.drupal.org/api/drupal/CHANGELOG.txt/7

On topic though, your JS part may be very minimal, everything you need is in core.
I'm not even sure that you need a JS file at all..

Nick Denry’s picture

Thank you for providing CHANGELOG information.

>> On topic though, your JS part may be very minimal, everything you need is in core.

Think you're wrong depend on fact I want also support Drupal 6 version (so, both Drupal 6/7 same functionality). I'll think about, thanks anyway.

Nick Denry’s picture

Issue summary: View changes

Correct some info

Nick Denry’s picture

Title: Ajax Nodeloader (D7) » Ajax Nodeloader

Added 6.x branch, so module not only Drupal 7 only.

Just add info to issue for future

Branch 6.x is not tested with autotools.

Branch for 6.x is much different from 7.x, consist some improvements of work logic and code,
so please, don't spent your time on 7.x branch review - it will be rewriten soon.

Thanks anyone.

Nick Denry’s picture

Fixed errors with automated review of 6.x.

Need manual review of 6.x branch.

Nick Denry’s picture

Branch 7.x rewrited to the same logic as 6.x. Need reviews.

Thanks in advance.

Nick Denry’s picture

Issue summary: View changes

Add info about Drupal 6 both 7 version support

Nick Denry’s picture

Drupal 7 version can load any node fields to content or custom selectors.

Nick Denry’s picture

Issue summary: View changes

Add info about load fields in Drupal seven

migmedia’s picture

First: The drupalcs -pareview of the 7.0-branch ...


FILE: ...w/sites/all/modules/pareview_temp/test_candidate/ajax_nodeloader.module
--------------------------------------------------------------------------------
FOUND 13 ERROR(S) AND 2 WARNING(S) AFFECTING 9 LINE(S)
--------------------------------------------------------------------------------
  20 | WARNING | Format should be "* Implements hook_foo()." or "Implements
     |         | hook_foo_BAR_ID_bar() for xyz_bar()."
  50 | WARNING | Line exceeds 80 characters; contains 88 characters
  84 | ERROR   | Inline comments must start with a capital letter
  84 | ERROR   | Inline comments must end in full-stops, exclamation marks, or
     |         | question marks
  87 | ERROR   | Inline comments must start with a capital letter
  87 | ERROR   | Inline comments must end in full-stops, exclamation marks, or
     |         | question marks
  91 | ERROR   | Inline comments must end in full-stops, exclamation marks, or
     |         | question marks
  91 | ERROR   | There must be no blank line following an inline comment
  91 | ERROR   | Comments may not appear after statements.
  93 | ERROR   | Expected "foreach (...) {\n"; found "foreach(...) {\n"
  94 | ERROR   | Inline comments must start with a capital letter
  94 | ERROR   | Inline comments must end in full-stops, exclamation marks, or
     |         | question marks
  97 | ERROR   | Inline comments must start with a capital letter
  97 | ERROR   | Inline comments must end in full-stops, exclamation marks, or
     |         | question marks
 100 | ERROR   | Closing brace indented incorrectly; expected 6 spaces, found 7
--------------------------------------------------------------------------------


FILE: .../sites/all/modules/pareview_temp/test_candidate/css/ajax_nodeloader.css
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
 4 | ERROR | Multiple CSS properties should be listed in alphabetical order
 6 | ERROR | Multiple CSS properties should be listed in alphabetical order
 9 | ERROR | Multiple CSS properties should be listed in alphabetical order
--------------------------------------------------------------------------------

Source: http://ventral.org/pareview - PAReview.sh online service Retry: (http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git-...)

There's nothing serious, just comments, whitespace etc. - easy to fix.

Micha

Nick Denry’s picture

Branch 7.x-0.x formatting errors from PAReview fixed, need review

Also, should I fix pareview errors from 6.x-0.x branch if "wrong formatted code" is little bit adapted code from JQuery project (original branches identations etc.)?

http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git-...

Nick Denry’s picture

Title: Ajax Nodeloader (D7) » Ajax Nodeloader
Status: Needs work » Needs review

Added Google Analytics tracking support, both 6.x/7.x branches.

bcooper’s picture

This isn't working for me. With the following code, when I click the link, all fields from the target node load replacing all of my current page including the current page title. It isn't refreshing the page so it is kind of working.

Also, I have a field with multiple images and it is only pulling up one of the images. Take a look and let me know if I am doing something wrong???

<a href="/node/139" class="nodeloader" rel={'title':'#selector1'}>Only title custom target</a>
<br />
<br />
--over--
<div id="selector1"></div>
--under--

Thanks

Nick Denry’s picture

The part of multifield content wasn't tested in all apply cases, so I guess there is can be some errors.

Could you create an issue for module via http://drupal.org/node/add/project-issue/1447152 ? Please add your demo-site (if possible) and I'll try to fix that bug(s) as soon as possible. Thank you.

misc’s picture

Status: Needs review » Reviewed & tested by the community

Manual review:

Branch names
You need to change the branch names, it should be like 7.x-1.x, not 7.x-0.x
Suggestion
Why do you use echo for the result in ajax_nodeloader_load_node? Why not return?

Anyhow, this looks RTBC for me.

Nick Denry’s picture

Title: Ajax Nodeloader (D7) » Ajax Nodeloader
Status: Needs review » Reviewed & tested by the community

Thank you, MiSc.

Branches renamed to 7.x-1.x and 6.x-1.x

Branch names
You need to change the branch names, it should be like 7.x-1.x, not 7.x-0.x

chi’s picture

Status: Reviewed & tested by the community » Needs work

The module has security vulnerabilities. It doesn't check node access rights.
Here is some usefull information about the node access system.
http://api.drupal.org/api/drupal/modules!node!node.module/group/node_access/7

misc’s picture

Issue tags: +PAreview: security

Added security tag.

Nick Denry’s picture

Status: Needs review » Needs work

The module has security vulnerabilities. It doesn't check node access rights.
Here is some usefull information about the node access system.
http://api.drupal.org/api/drupal/modules!node!node.module/group/node_acc...

Sorry, I can't understand isn't access arguments are not enough for menu item wich is provide address for loading node?

I've test loading nodes under anonymous user and disable ability to see published materials on "/admin/people/permissions" admin page, and module just return error 403 for '/node_load/node/%nid'.

See code lines 81-87 (branch 7.x-1.x, as exmaple)

  $items['node_load/node/%ajax_nodeloader_url'] = array(
    'title' => 'load node',
    'page callback' => 'ajax_nodeloader_load_node',
    'page arguments' => array(2),
    'load arguments' => array('%map','%index'),
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

If thats not enough pls tell me. Thank you.

Nick Denry’s picture

Status: Needs work » Needs review

Of course I can use "node_access" function (http://api.drupal.org/api/drupal/modules!node!node.module/function/node_...) to check if user has access rights before display content, but I think this is duplicate checkouts.

Set needs review again.

chi’s picture

With your module anybody who has «access content» permission can view unpublished nodes.

duozersk’s picture

Isn't it a duplicate for http://drupal.org/project/ajaxit project? Looks like ajaxit can make any page to load through AJAX request using jQuery library, not just a node page.

And one more similar project - http://drupal.org/project/ajax_regions

AndyB

Nick Denry’s picture

Status: Needs work » Needs review

Fix security issue with view unpublished nodes from anyone, who has 'access content' permission.
Now user must have "view unpublished (sometype) content" or "view all unpublished content".

Add ability to load nodes for sites without clean URLs.

Nick Denry’s picture

Isn't it a duplicate for

Don't think so, because ajaxit is only for 6.x and with no further development, and ajax_regions is also only for
Drupal 7.x with much harder using via JS programming.

Main purpose of Ajax Nodeloader is provide ability to end-user of loading nodes content for some parts of sites that no need full-reload of page, like some local or not-very-important additional information, wich can be loaded a bit faster than all-page reload.

chi’s picture

Status: Needs review » Needs work

@Nick Denry, you misunderstood me. The issue is not about published and unpublished nodes. It's just a particular case. You should use a node access system provided by Drupal api. There is a lot of content access modules that govern access to nodes but your module allows users to bypass the access control from these modules.

Nick Denry’s picture

@Nick Denry, you misunderstood me.

Thanks. I'm still new to Drupal, I'll try to see into API and fix this issue.

xenyo’s picture

Manual Review;

1. load_node should be ajax_nodeloader_load_node().

2. you should use field_get_items to get field value.
for example : to get body field value
field_get_items('node', $node, 'body', $node->language);

3. If someone enters the path through node_load/node/nid in browser, anonymous users can see the node contents even if unpublished. May have some security issues for some sites.

4. Deprecated function: Function split() is deprecated in load_node() (line 43 of /var/www/html/drupal-7.14/sites/all/modules/ajax_nodeloader/ajax_nodeloader.module).
This function has been DEPRECATED as of PHP 5.3.0.
you should use explode function.

5. drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8'); is this necessary?

Nick Denry’s picture

deleted

misc’s picture

@Nick Denry, please do not review the reviews. We have trouble to getting people to do reviews for me beginning.

And your repo have a lot of branches. @xenyo reviewed the 7.x-0.x branch, which still looks like stated in #47. That branch should be deleted, like 6.x-0.x.

So please clean up your repos, so people more easy could do reviews. Thanks.

Nick Denry’s picture

Posted by MiSc on June 29, 2012 at 3:55pm

@MiSc, thanks for your support. I don't understand, I've deleted both branches (7.x-0.x and 6.x-0.x) via git-gui few days ago from both drupal.org and github.com and can't see them.

Also it can't be checked via pareview (http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git-...), so I don't understand how @xenyo had rewiev it.

Do I miss something with that branches?

Update: There is I also can see only 7.x-1.x and 6.x-1.x
http://drupalcode.org/sandbox/nick-denry/1447152.git

@Nick Denry, please do not review the reviews.

Okay, I wont.

Offtopic: Is there some team reviewing new modules/etc. or just volunteers?

misc’s picture

To delete remote branches you have to do like:
git push origin :6.x-0.x

Offtopic: It is drupal, we are all volunteers.

Nick Denry’s picture

I still cant see 7.x-0.x and 6.x-0.x

http://drupalcode.org/sandbox/nick-denry/1447152.git/shortlog/refs/heads...
http://drupalcode.org/sandbox/nick-denry/1447152.git/shortlog/refs/heads...

And git push drupal.org :6.x-0.x give me an error. How I can be sure that branches are deleted?

misc’s picture

I think you should remove drupal.org from the the push.

Nick Denry’s picture

Status: Needs work » Needs review
  • Use node_access for check bypass node access for current user.
  • Improve hasttag naviigation for obsolete browsers.
  • Added support of HTML5 history API to use browser back and forward buttons.
  • Added ability to dynamically set browser title (option).
  • Advanced navigation also option.

On both 7.x-1.x and 6.x-1.x branches.

Nick Denry’s picture

Status: Needs review » Needs work

Havn't tested with "Automatic review" yet because of http://ventral.org not working at moment.

Nick Denry’s picture

Status: Needs work » Needs review

Tested with "Automatic review".

Nick Denry’s picture

Issue summary: View changes

preview

Nick Denry’s picture

Issue summary: View changes

HTML5 history support and options

andyhawks’s picture

Status: Needs review » Reviewed & tested by the community

I'd like to set this to RTBC, it's been dormant for a few weeks. The remaining ventral issues are minor, http://ventral.org/pareview/httpgitdrupalorgsandboxnick-denry1447152git, just Line exceeds 80 characters; and Expected 1 space before "+";. I can't speak to the JS security, but the issues warranting the security tag in #38 were resolved on June 27 and the rest of the code looks good to me. Nick is definitely responsive in resolving issues that arise and dedicated to this module. I think this module has a lot of real-world use cases; I am actively using this on a site in development and hope it gains some traction before D8.

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

patrickd’s picture

Status: Reviewed & tested by the community » Postponed

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 .
Delete master branch:

git checkout 7.x-1.x
git branch -D master
git push origin :master

Review of 7.x-1.x:

  • In drupal 7 should add css and javascript files that should always be loaded into your .info so they can be aggregated - don't load them everytime in hook_init()!
  • variable_get and _set can work with TRUE and FALSE without problems - always use TRUE/FALSE for boolean values instead of 0/1
  • Only hook functions should be documented with "Implements ..", for example hook_admin() does not exist!
  • hook_init() IS a hook, document it with "Implements hook_load()."
  • * @nid Incorrect doxygen documentation, should be like @param int $encoded_url
  • Use /**/ for block comments in global space, use // within functions
  • 'title' => 'load node via alias', sounds like a comment, not like a page title - use a comment
  • 'access arguments' => array('administer ajax_nodeloader'), this permission does not exist - you have to define it by hook_permission()
  • In drupal 7 there is drupal_json_output(), you don't have to make use of json_encode and set the conent type manually.
  • If node access is false your using the $output variable, which is still a boolean, as array.

Review of 6.x-1.x

  • variable_get and _set can work with TRUE and FALSE without problems - always use TRUE/FALSE for boolean values instead of 0/1
  • Only hook functions should be documented with "Implements ..", for example hook_admin() does not exist!
  • hook_init() IS a hook, document it with "Implements hook_load()."
  • * @encoded_url Incorrect doxygen documentation, should be like @param int $encoded_url
  • // Unfortunally, we need to use pure json_encode instead
      // drupal_to_js function to prevent wrong utf-8 json encoding
      // @see http://drupal.org/node/1086098
      // TODO: json_encode for php < 5.2
      $result = json_encode($output);
      drupal_set_header('Content-Type: text/javascript; charset=utf-8');

    What about drupal_json()?

  • If node access is false your using the $output variable, which is still a boolean, as array.

None of these points are super-important, anyway I'd like to see some of them fixed.
Set it back to RTBC yourself after your done.

Diogenes’s picture

@Nick Denry

Keep going Nick. I think this is a good idea, I like the fact that you have it in both D6 and D7 and I bet you could get a D8 version up and running pretty quickly. I'll try it out the module next chance I get.

In the meantime, your sandbox still has a master branch. I had trouble with getting rid of this myself.

To delete it, you must first set a different 'Default branch' on http://drupal.org/node/1447164/edit

Set it to 7.x instead of master. Then you will be able to delete master from the remote origin.

git ls-remote origin
git push origin :master

Cheers
-Dio

squarecandy’s picture

+1 for "Keep going". Cool idea. I disagree with anyone suggesting you are duplicating existing modules, from what I've found.

klausi’s picture

Status: Postponed » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

klausi’s picture

Issue summary: View changes

Typeerrors fix