Support » Plugin: Lana Downloads Manager » A few suggestions

  • Resolved cartpauj

    (@cartpauj)


    Cool plugin!

    1) I’d like to be able to set the text of the link instead of having it show (Download X). There’s a couple of thoughts:
    1a) Update your shortcode to accept a second $content parameter so I can put the name of the link in-between the shortcode [lana_download id=”X”]Link Text Here[/lana_download]
    1b) Add an option to use the Download Post Title as the download link text.

    2) I’d really like an action hook just before the file is downloaded so I can redirect if the current user doesn’t have access to download the file (based on my own logic).

    
    function lana_downloads_manager_download_handler() {
    ...
    do_action('lana_download_before_file_download', $download_id);
    
    		/**
    		 * Local file
    		 */
    		if ( $file_path && $local_file ) {
    ...
    }

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lana Codes

    (@lanacodes)

    You can change the download button text. Use the shortcode ‘text’ parameter.
    For example: [lana_download text="Filename Download" id="2"]

    I’ve been thinking a lot about other solutions. But then I decided that only the easiest button would be lana_download shortcode. Too many options complicate the use of simple users.
    Lana Downloads Manager gives URLs, so users can create their own style buttons using HTML and CSS.
    But the Post Title is an interesting idea. I think about it.

    Action hook before download handle is a great idea. I’ll do this in the next version. I need a few days for this, and then I upload it to svn.

    Thanks for your feedback.

    If you have any other ideas, suggestions or bugs, please contact me.

    Sincerely,
    Lana Codes

    Cool, I missed the text parameter. I’ll give that a try!

    I think using the Post Title of the Download for the Link Text would be a pretty good option as it’s an easy place to pull it from so the user doesn’t have to type it twice. [lana_download id="X" text="post_title"] or something like that.

    Anyways, looking forward to the hook also, thanks!

    • This reply was modified 1 year, 2 months ago by  cartpauj.
    Plugin Author Lana Codes

    (@lanacodes)

    I updated the plugin.

    It now includes post_title (with text attr).
    How to use:
    [lana_download id="1" text="%post_title%"]

    And I added text attr to the tinymce shortcode popup.

    Thanks for your feedback.

    Sincerely,
    Lana Codes

    Thanks! It works perfectly. Let me know when you’ve added the action hook also.

    Plugin Author Lana Codes

    (@lanacodes)

    Sorry, I totally forgot.

    I added the action hook.

    Sincerely,
    Lana Codes

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘A few suggestions’ is closed to new replies.