First of all, thank you!

I am using nodequeue + views to produce my content; using nodequeue position id in views sort criteria. Sorting works on the views side; whenever I change the order of elements in my nodequeue the views reflects this.

I've also setup ddblock to show on my page, with number pagers.

Problem: Whatever the sort of the nodequeue or views sort criteria, ddblock sorts the content by itself, it does not respect the order of the elements coming from views block.

There is a configuration setting in the block configuration page (random, asc, desc) but it works as if it gets the rows from the views block unordered and later applies a sorting on top of it; which makes ordering of nodequeue elements useless.

Any hint?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

serkan.arikusu’s picture

Status: Active » Needs work

Hi again,
I've solved the problem by removing the line asort($content); in ddblock.module.

I think this overrides the views sort criteria.

Maybe we should have a "None" option in ddblock configuration page, which does not do anything?

ppblaauw’s picture

Status: Needs work » Needs review
FileSize
2.72 KB

Thanks for reporting.

Next version will have a "None" option for the order.

None for using the original content order.

The attached patch can be used to use the original content order. e.g. from nodequeue.

Please let me know if this works.

serkan.arikusu’s picture

Status: Needs review » Reviewed & tested by the community

It works, thank you...

mrfelton’s picture

works for me too. Thanks

ppblaauw’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Closing issue, patch will be applied in next version of the dynamic display block module.

coderb’s picture

Hi,

Thanks for the module and the sort patch, but I have a question regarding the sorting.

For my ddblock content type, I am using a cck imagefield which allows unlimited uploads.
The reason I am using this imagefield, is because it provides a thumbnail and drag-and-drop sort option of all uploaded images.

The ddblock module, with sort patch, and set to sorting: 'none', displays all images in the defined folder in order of upload.
If I then do the drag-and-drop sort of my uploaded images, it has no effect on the display order of the slideshow.

Is there an easy way to pick up that order? Or perhaps there is an easier way to for me to handle this?

thanks for any advice.

zdean’s picture

Status: Closed (fixed) » Active

Is it possible this patch could be applied to the RC version and then published? I am unable to upgrade to the dev (breaks my ddblock) and not able to apply the patch myself. Any help is appreciated.

Thanks.

zdean’s picture

Status: Active » Closed (fixed)

I was able to apply the patch using this tutorial:

http://drupal.org/node/60818

Anonymous’s picture

Thanks for the patch. This helped to solve my problem with custom sorting.

Danny_Joris’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Reviewed & tested by the community

Hello. First of all, thanks for the patch.

I just completely configured a ddblock slider using the 6.x-1.0-rc6 version and now I stumble on this issue. I don't feel like upgrading to the dev version at this stage, so I will probably tweak the patch in manually.

It would be really great if this very basic functionality gets a fix in a next release candidate. The current RC is dated February 26 2009 (!).

venusrising’s picture

This patch fails on the RC version. Is any way to get a patch that will will with the RC version and not DEV since the RC is from 2009 and we really dont want to run a dev module on a production site and not being able to re-order the DD Block makes it hard to use.

ppblaauw’s picture

Priority: Critical » Normal

The patch should work with RC6.

The patch is relatively small. It can be applied manually in a few minutes.

The dev version is for test purposes and should not be used on websites for this module.

venusrising’s picture

FileSize
3.27 KB

Weird-
I get the following fails, see attached doc

venusrising’s picture

Status: Reviewed & tested by the community » Needs review

Hi There, cannot get the patch to apply to the RC, see above

ppblaauw’s picture

Status: Needs review » Postponed

The patch is relatively small.
It can be applied manually in a few minutes.
I suggest you do this.

Set status to postponed

venusrising’s picture

Status: Postponed » Active

This is not easy to apply as the stable module code does not match the patch module code for instance the code in the patch at line 31-41 does not coincide with the module code so it is not easy to see where to put it which seems like why the patch failed to begin with. Is there any way to clarify this or post a module file update to this post as it is difficult to use the module when the nodes cannot be ordered.

Thanks!

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

Can you attach your ddblock.module file.
I will patch it for you

Danny_Joris’s picture

Why no commit?

ppblaauw’s picture

#18 busy, priorities.

venusrising’s picture

FileSize
81 KB

Thanks, that is so nice of you. I had to add txt to the end as upload would not allow mod files.

ppblaauw’s picture

FileSize
81.54 KB

#20 Attached the modified ddblock.module file
Rename again to ddblock.module

Hope this helps you further, please let me know.

narendrak’s picture

Title: Nodequeue + Views + ddblock: Sorting Problem » views_slideshow_ddblock : Sorting Problem

I was facing orderby problem with slideshow ddblock. i found that in views_slideshow_ddblock.module
function template_preprocess_views_slideshow_ddblock(
// sort the result using ddblock, none for using order of view
if (!empty($rows)) {
switch ($options['settings']['order']) {
case 'random':
shuffle($rows);
break;
case 'asc' :
asort($rows);
break;
case 'desc':
rsort($rows);
break;
case 'none':
break;
}
just comment this code . it will take views sort values.

pbull’s picture

Successfully applied ppblaauw's patch (http://drupal.org/node/397018#comment-1355100) against ddblock 6.x-1.0-rc6 with no troubles.

ppblaauw’s picture

Title: views_slideshow_ddblock : Sorting Problem » Nodequeue + Views + ddblock: Sorting Problem
Status: Postponed (maintainer needs more info) » Patch (to be ported)

#22 please leave original title, this issue is not for the views_slideshow_ddblock module but for the ddblock. Would make it confusing for other users.

In views_slideshow_ddblock the none option is already added in the settings page.
You don't need to apply any patch and don't need to comment the code, just choose none in the configuration page of the slideshow (views display style settings)

set to patch (to be ported) till it is committed.

mmachina’s picture

patch worked beautiful...

claar’s picture

Patch worked great -- thanks, ppblaauw. Will be a great improvement when committed.

jonwithhtop’s picture

Assigned: Unassigned » jonwithhtop

WORKED LIKE A DREAM!

claar’s picture

Assigned: jonwithhtop » Unassigned
msathesh’s picture

@ppblaauw patch works great.. thanks..