Jenny Davis

Forum Replies Created

Viewing 17 posts - 1 through 17 (of 17 total)

Jenny Davis
Member

It doesn’t look like it has been able to find the latest version to trigger an update. I verified my license key is still there and correct. Is there an issue with auto-updating from version 4.6.8?


Jenny Davis
Member

Just downloaded v4.7.4 from your download area. Does the plugin not update through WordPress like normal? That is, do I need to check the site periodically to get the latest version and manually install it every time?


Jenny Davis
Member

I have Download Manager v4.6.8 installed but do not see that in /plugins/download-manager/libs/class.Package.php at line 651 or anywhere else in that file. Please see screenshot of what I have at line 651. Am I looking in the wrong place?


Jenny Davis
Member

I just looked through that /libs/class.Package.php file and found another tag: [doc_preview] that looks like it’s trying to use Google Docs to create a preview of the first page of the document like I’d like to do. Does that sound correct?


Jenny Davis
Member

No problem. I found a docPreview function in /libs/class.Package.php that seems to reference what I need. It’s on line 1296 according to my editor (not line 651) where I changed the return statement from \WPDM\FileSystem::docPreview($url, $fext); to \libs\FileSystem::docPreview($url, $fext); (see attached code screenshot)

Is this the correct change to make? I don’t see the [product_preview_300x300] tag work anywhere yet.


Jenny Davis
Member

I’m still unable to find the code you specified. Please let me know where to make the update so I can use the [product_preview] tag. Thanks!


Jenny Davis
Member

Great! I’m unable to give a temporary Admin login but I opened /download-manager/libs/class.FileSystem.php to find only 402 lines. Am I supposed to replace the class name “FileSystem”, on line 6, with “libs\FileSystem”? Screenshot attached.


Jenny Davis
Member

That worked great! You and the support here are awesome!


Jenny Davis
Member

No problem, thanks again for the quick feedback!


Jenny Davis
Member

Thanks, I will look into that!


Jenny Davis
Member

That worked perfectly! You’ve answered my question and resolved my issue, thanks!


Jenny Davis
Member

That is how I have them setup – each file is only associated with the sub-category (e.g. Brochures) and not a parent category (e.g. Marketing). The files in the sub-categories are still showing when I only click on the main category, though, for some reason. I think I may be able to add some jQuery logic on top of the display to only show the file listing when I get down to the sub-category. Your last reply does make sense though so thank you!


Jenny Davis
Member

Sure thing – I’d like to list the files out ONLY when viewing a sub-category. In this case, when I click on “Marketing” I only want to see the menu of sub-categories (Brochures, Case Studies, etc). When I then click on a sub-category (e.g. Brochures) I DO want the list the files out.

The problem is that when I disable the file listing table in aps-content-cat.php to stop the files listing in the Category (e.g. Marketing) I also lose the file listing in the sub-category (e.g. Marketing > Brochures). Is there any way to get the files to list ONLY when navigating down to the sub-category (e.g. Marketing > Brochures)?

Screenshots attached.


Jenny Davis
Member

Great! Can I remove them from the Category list, too, without breaking the sub-Category list? I saw to do that I’d also have to remove the table from “aps-content-cat.php”.

I noticed that when I remove the table in aps-content-cat.php, it stops the files from listing once I also click on the Category; but, when I click again down to the sub-Category view (the only place I actually DO want to show the list of files), the files do not show there. Is there some kind of logic I can add to aps-content-cat.php so it knows to only show the files when clicked all the way down to the sub-Category?


Jenny Davis
Member

It’s a development URL behind a firewall that IT maintains so I can’t link you directly. Attached are some screenshots of what I was trying to describe, though.

We’d like to only list the files when clicking down to the sub-category (“archive-subcat.png”, where it shows Home > Marketing > Brochures)

Using the archive view with sidebar, it’s always showing the latest files on the main files view “archive-main.png” and Category view “archive-cat.png”


Jenny Davis
Member

That worked perfectly, thank you!


Jenny Davis
Member

Thanks for the reply!

#1 fixed my first issue of properly overriding the template!

#2 I’m not sure how to traverse the array of categories. I’d like to display the category of each file as it builds the rows of files. Here’s my code with the changes you mentioned. I added $cat = wp_get_post_terms(get_the_ID(), ‘wpdmcategory’); and I see it pulling the Array when I “echo $cat”. How can I make each file’s category display instead of the entire array?

while( $packs->have_posts() ){
                        $packs->the_post();

                        $icon = get_post_meta( get_the_ID(), '__wpdm_icon', true );
                        $icon = ( $icon == '' ) ? WPDM_BASE_URL.'assets/file-type-icons/download4.png' : $icon;

                        $cat = wp_get_post_terms( get_the_ID(), 'wpdmcategory' );

                        if(strpos($icon, 'file-type-icons/') && !strpos($icon, 'assets/file-type-icons/')) $icon = str_replace('file-type-icons/', 'assets/file-type-icons/', $icon);

                        ?>
                        <tr>
                            <td>
                                <a href="#" class="apc-pack" data-item-id="<?php the_ID(); ?>">
                                <img src="<?php if(has_post_thumbnail()){the_post_thumbnail_url();}else{echo $icon;} ?>" style="float: left;margin-right: 10px;width: 40px;" />
                                <?php the_title(); ?>
                                </a>
                            </td>
                            <td><?php echo $cat; ?></td>
                            <td><?php echo get_the_modified_date(); ?></td>
                            <td><a href="#" class="btn btn-primary"><i class="fa fa-download"></i>Download</a></td>
                        </tr>
                        <?php
                    }
Viewing 17 posts - 1 through 17 (of 17 total)