Sorting Download Files

Viewing 25 posts - 26 through 50 (of 58 total)
#8718

Shahjada
Keymaster

here you can read more details about custom post type: http://codex.wordpress.org/Post_Types

#8748

donkeymusic
Member

So we will be sorting the downloads via WP rather than Download Manager?

When is this likely to come into play as I am now looking at alternatives for file management as i require files to be in date order.

#8906

I have given up on WPDM. All we ask is for a simple sorting function. Simple as that. Donkeymusic-if you find a good alternative, post back. We will do the same.

#9149

I must have it, How did you do that?
I thougt I must repalace the $id parameter with something like $name to sort it by name.
How did you do that?
It works at this website: http://culchethhigh.co.uk/the-eagle-newsletter/ .
If my English is not so good, I’m a German.

#9462

Alexander,

Sorting by ID is fine, but name is not working. Following the reposted link in your posting, it is clear this guy wasn’t able to sort by Name either.
I wish the developer would add name sorting already!!

#9467

For theconsolidatedlodge;

Ok, now I know it…
It’s not so good, that the developer hasn’t add this function, to sort by nme, but now, I guess, you must replace this:

$ndata = $wpdb->get_results(“select * from ahm_files where category like ‘%\”$id\”%’ limit $start, $item_per_page”,ARRAY_A);

wih this:

$ndata = $wpdb->get_results(“select * from ahm_files where category like ‘%\”$id\”%’ order by title asc limit $start, $item_per_page”,ARRAY_A);

But it’s better, if you lokk in your dat-tabel, of the plugin an find out, wht, you want to sort.

Thank you for a reply,
Alexander Jank

#9468

Are you suggesting that the snippet you provided sorts the packages by name? if so, in which file did you make this edit?

#9472

For theconsolidatedlodge;

I edited the file named “download-manager/download-manager.php” in the plugin, it’s 100% compatible with the new version 2.5.3.
But you must search with ctrl+f for “items” and there is only one result. The line 7 after the found word is the line, you must edit.
I updated the Post, what I have writte before this, there are the compatible things.
It’s line 600.
My change is into the MySQL command.

Thank you for a reply,
Alexander Jank

#9473

Oh, yes, i have forgotten the example:
Go to this Link:
http://test.alexanderjank.de/wordpress/downloads/

It’s our school WordPress.
I’m developing for my school.

#9479

donkeymusic
Member

The link you show, isnt working with sorting by name and only was until the update earlier this year since then it has not worked and the lack of support from the designer is very limited although they did say they update in April would include this option.

#9480

donkeymusic
Member

I have made the changes as suggested in post #9467 and this returns an error. Returned to an earlier post and added order “by id desc” to line 600 of download-manager.php – no error and this was the change i made earlier in the year that worked. However nothing is happening now.

So, I am now questioning myself as to what i am expecting to happen, I was hoping that from the backend i can force the ordering of the files, but going through all options i cannot see this, so as a back up option i would like to be able to sort them from the front end and then any member of the publish can filter them as they wish, but i dont see any filter options at all.

The page i am working on is http://culchethhigh.co.uk/the-eagle-newsletter/ and as you can see the newsletters are in no order.

Any advice or assistance would be much appreciated.

Thank you

#9482

For theconsolidatedlodge;

It’s to much work, I think, to add a line with filter options, it will be to much work, because you must add the Line and there some buttons must appear, you must style them with a lot of css and gthen, the user can order them in the frontdend by name.
My solution, is for the frontednd and not for the backend.
I konw, that the letters in my example are ordered, it orders the files alphabetical.
I have now added my “download-manager/download-manager.php” in the txt format to post #9467.
Here is the Link to the file I have uplouded:

http://www.wpdownloadmanager.com/wp-content/uploads/2013/10/d-manager.txt

The SQL command, what does this work ist: “SELECT * FROM ‘ahm_files‘ WHERE ‘category‘ LIKE ‘%\”$id\”%’ ORDER BY ‘title‘ ASC”
It’ correct SQL syntax.

I have made a screensshot, later, I will add it to the post, I’ve got technical problems…

Thank you for replys.
Alexander Jank

#9489

Alexander, these edits didn’t seem to fix my issue either 🙁 , but at least they didn’t throw an error like it did for donkeymusic.
Donkeymusic, I think it would be great for the author to implement filtering, but to do this is a huge amount of coding and CSS.
it would be wonderful to see sorting actually work, searching and filtering go into future releases. i am going to play around with this a bit more today; I’ll post back anything that may be useful in helping us to resolve this name sorting issue. Also, for the record, I did attach a screen capture of my document library, just so you can see what i am dealing with. Cannot provide a link to this library-too sensitive.

#9491

hey donkeymusic, hey theconsolidatedlodge,

Ok, my Link was false, it was password protected.
New link to the Plugin on my testblog:
http://test.alexanderjank.de/wordpress/downloads/

Ok.
Thanks for a reply
Alexander Jank

#9492

it looks like you fixed it for your site. What does your shortcode look like? Also, did you make any changes other than line 600 in download-manager.php?

My shortcode: [wpdm_tree order_by=”title” order=”desc”]

#9493

I’ve got the download manager free.
My shortcode:

{wpdm_category=download-site}

because, they are all in the category called download-site.

I’ve only made the changes in line 600 of the file.

Alexander jank

#9494

For theconsolidatedlodge,

In you thing, if you want to display the tree, you must edit line 345.
please replace:

$ndata = $wpdb->get_results(“select * from ahm_files where category like ‘%\”{$_POST[‘dir’]}\”%'”,ARRAY_A);

with this:

$ndata = $wpdb->get_results(“select * from ahm_files where category like ‘%\”{$_POST[‘dir’]}\”%’ order by title asc”,ARRAY_A);

I’ve added the file, for the tree and the category list to this post.

Thanks for replys.
Alexander Jank

#9496

I’ve forgotten to say:
I’ve added the tree with your shortcode to my example.
look at:
http://test.alexanderjank.de/wordpress/downloads/

It’s in the end of this site.

#9497

I have the free edition as well. Thanks for the shortcode; we’re using two different views.
However, you were helpful in pointing me in the right direction, so thank you! I am trying to use the dropdown tree view and order the documents by name (‘title’). I think i need to change the code between lines 568-574 to force the dropdown tree to sort by title.

#9498

I’ve written it before…
It’s line 345 to sort the files in the dropdown list by title.
It’s in #9494.
And, I know, we use two diffrent views, but I have fixed it for your view too, look at #9494.
And go to the link….
Under my method, there is your tree structure method.

#9499

donkeymusic
Member

Alexanderjank, I have copied your suggestions and it has done the job, the issue for me is that i think i needed them to be listed in date created order. Now they are in a more random order than before http://culchethhigh.co.uk/the-eagle-newsletter/

#9500

Totally did not see your post 9494 earlier. I implemented you code on line 345 and it worked perfect. Thank you SO much, Alexander! You really helped me out!!

#9501

You cannot sort the items by creation-date.
Because tthe creation-date is not given to the MySQL Database.

Thank you for your replys.
Alexander Jank, Germany

#9502

donkeymusic
Member

mmm, i m sure i used to have them like this, just trying to find my original thread to see what i enquired about

#9503

What schould this mean, I’m a German, I don’t understand it….

Viewing 25 posts - 26 through 50 (of 58 total)

The topic ‘Sorting Download Files’ is closed to new replies.