Displaying download links without button or box

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
Apr 25, 2013 at 2:45 am
#5885
Member
xavier
OP

I plan on using DLMgr to restrict access to some file on my website (http://portlandyc.com) to members only. For this purpose, I would like the downloads to appear as simple links (i.e. without the download button or box). Is this possible?

Apr 28, 2013 at 4:34 pm
#5949
Member
xavier
OP

I found how to hide the button. It doesn’t remove it in the sense that the space for it is still quite visible, but at least it’s a blank transparent image.

I still don’t know how to remove the border.

May 3, 2013 at 11:36 am
#6012
Keymaster
Shahjada
Staff

sorry not clear, which border, may you please give me your url to check

May 4, 2013 at 3:42 pm
#6036
Member
xavier
OP

Shaon,

You can see an example of what I’m trying at http://portlandyc.com/test-2/

Additional Note: My son figured out how to make it work by creating a separate standard link with the URL from the button. Looks like I’m OK unless you can think of a flaw with this approach (e.g. if the GUID in the link changes during edit, which doesn’t appear to be the case.)

Thanks
Xavier

May 5, 2013 at 5:26 pm
#6062
Member
xavier
OP

Additional thought: In the Insert Package or Category dialog, it would be nice to have the option to add a simple link such as shown on the last line of the test page above. Currently I have to create the package, add the shortcode to a test page, view the test page and copy the link location associated with the link displayed in the download button, then create a new link where I truly want to have it displayed.

May 6, 2013 at 8:20 am
#6074
Member
antwal

Hello,

I had the same problem, I solved it like this:

theme: functions.php

remove_shortcode(‘wpdm_file’,’wpdm_downloadable_nsc’);

function link_wpdm_downloadable_nsc($params) {
global $wpdb;
extract($params);

$home = home_url(‘/’);

$sap = count($_GET) > 0 ? ‘&’ : ‘?’;

$data = $wpdb->get_row(“select * from ahm_files where id=’$id'”, ARRAY_A);

if ($title == ‘true’) {
$title = “” . $data[‘title’] . “”;
} else {
$title = ”;
}

if ($desc == ‘true’) {
$desc = $data[‘description’] . “”;
} else {
$desc = ”;
$desc = stripslashes($desc);
}

if ($data[‘show_counter’] != 0) {
$hc = ‘has-counter’;
}

if ($template == ”) {
$template = ‘wpdm-only-button’;
}

$wpdm_login_msg = get_option(‘wpdm_login_msg’) ? get_option(‘wpdm_login_msg’) : ‘Login Required’;
$link_label = $data[‘link_label’] ? $data[‘link_label’] : ‘Download’;

if ($data[‘access’] == ‘member’ && !is_user_logged_in()) {
$url = get_option(‘siteurl’) . “/wp-login.php?redirect_to=” . $_SERVER[‘REQUEST_URI’];
$uuid = uniqid();

$html = “$link_label“;
} else {

if ($data[‘password’] == ”) {
$url = home_url(‘/?wpdmact=process&did=’ . base64_encode($id . ‘.hotlink’));
$classrel = “”;
} else {
$classrel = ‘haspass’;
$url = home_url(‘/’);
$password_field = “Enter password”;
}

$html = “$link_label“;
}
return $html;
}

add_shortcode(‘wpdm_file’,’link_wpdm_downloadable_nsc’);

I also had the need to capture only the link for two pdf in multi language, I created two separate files in the plugin with two different id, then I created a page for each language by entering the appropriate code in the shortcode and added dell’footer this:


$page = get_page_by_path(“info-page”); // Slug Path

if ($page) {
$post = get_page($page->ID);
$content_link = apply_filters(‘the_content’, $post->post_content);
$content_link = preg_replace(“//”, “$1”, $content_link);
$content_link = str_replace(“”, “”, $content_link);
} else {
$content_link = “”;
}

I hope I have solved your problem.

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

The topic "Displaying download links without button or box" is closed to new replies.