SOLVED Controlled Download


Subject: Controlled Download
You can prevent downloading files, if not responding to the topic that contains the file you want to download?

Subject: Re: Controlled Download
Yes you can.

I think thats in ADV downloads

Subject: Re: Controlled Download
perhaps you mean this:
Quote:
Number of Posts a user needs to get download access

I would like to impose an answer in topic where the files to download .... This option requires X number of messages before downloading ..
I would like (example)

Quote:
Download Link


Prevent this download, if the user does not write anything in this topic.

Subject: Re: Controlled Download
Another way is to hide the Link...
This only would be visible after you post.

Code: [Download] [Hide] [Select]
[hide][url=http://www.icyphoenix.com/dload.php?action=file&file_id=36]Link to Activity Mod[/url][/hide]


Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.

Profile PM  
Subject: Re: Controlled Download
Great idea! but I would like to further amend this..

you can see the words contained between the tags?

example:

]Download[/url]

I would like to change the written
"Sorry, but you must be registered and also must post a reply to view this message.
with
Must send a reply to download this file.
make sure to see this message after clicking on written Download...
maybe I'm asking too much :mryellow: .... thanks in advance, greeting.

Subject: Re: Controlled Download
Well, I made a change to satisfactory:

1) File: includes/bbcode.php

Find


Code: [Download] [Hide] [Select]
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';

Delete :mryellow:


2)
File: /language/lang_XXXX/lang_bbcb_mg.php

Find:
Code: [Download] [Hide]
  1. $lang['xs_bbc_hide_message_explain'] = 'Sorry, but you must be registered and also must post a reply to view this message.'; 



Changes with:


Code: [Download] [Hide] [Select]
$lang['xs_bbc_hide_message_explain'] = 'Sorry, Must send a reply to download this file.';



if we want to complete the work, I found this change... we can add this button, thanks to this mod by Zuker:

Zuker wrote: [View Post]





With this changes, you can add this button.
Example Image of the button: Image of the button pressed
Follow this instructions:

Upload to /images/bbcb_mg/images/gif this images:
hide7aq = (rename this to hide.gif)
hide13lp = (rename this to hide1.gif)

In /languages/lang_xxx/lang_bbcb_mg.php

FIND:
Code: [Download] [Hide] [Select]
$lang['bbcb_mg_highlight'] = 'Highlight';


AFTER, ADD

Code: [Download] [Hide] [Select]
$lang['bbcb_mg_hide'] = 'Hide a message';


FIND:
Code: [Download] [Hide] [Select]
$lang['s_highlight_help'] =


AFTER, ADD

Code: [Download] [Hide] [Select]
$lang['s_hide_help'] = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]';


In /includes/bbcb_mg.php

FIND:
Code: [Download] [Hide] [Select]
'L_BBCB_MG_HIGHLIGHT' => $lang['bbcb_mg_highlight'],


AFTER, ADD

Code: [Download] [Hide] [Select]
'L_BBCB_MG_HIDE' => $lang['bbcb_mg_hide'],


FIND:
Code: [Download] [Hide] [Select]
'L_HIGHLIGHT_HELP' => $lang['s_highlight_help'],


AFTER, ADD

Code: [Download] [Hide] [Select]
'L_HIDE_HELP' => $lang['s_hide_help'],


In /languages/lang_xxx/bbcb_mg.js

FIND:
Code: [Download] [Hide] [Select]
s_smiley_creator = 'Smiley Creator: [smiley=1]Text[/smiley] insert a smiley with text';


AFTER, ADD

Code: [Download] [Hide] [Select]
s_hide_help = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]';


FIND:

Code: [Download] [Hide] [Select]
var Td = 0;


AFTER ADD:

Code: [Download] [Hide] [Select]
var Hide = 0;


FIND:

Code: [Download] [Hide] [Select]
'[highlight=]'


AFTER ADD

Code: [Download] [Hide] [Select]
'[hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]',


FIND:

Code: [Download] [Hide] [Select]
function BBCbold()


BEFORE ADD:

Code: [Download] [Hide] [Select]
function BBChide()
{
var txtarea = document.post.message;

if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text;
if (theSelection != '')
{
document.selection.createRange().text = "[hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
//mozWrap(txtarea, "[hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]");
mozInsert(txtarea, "[hide]Messaggio Nascosto Citato, rimane invisibile.[/hide]");
return;
}
if (Hide == 0)
{
ToAdd = "[hide]";
document.post.hide_img.src = bbcb_mg_img_path + "hide1" + bbcb_mg_img_ext;
Hide = 1;
}
else
{
ToAdd = "[/hide]";
document.post.hide_img.src = bbcb_mg_img_path + "hide" + bbcb_mg_img_ext;
Hide = 0;
}
PostWrite(ToAdd);
}


In /templates/mg_themes/bbcb_mg.tpl

FIND:

Code: [Download] [Hide] [Select]
<a href="javascript:BBChl()" ><img src="{BBCB_MG_IMG_PATH}highlight{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" class="bbimages" /></a>


AFTER ADD:
Code: [Download] [Hide] [Select]
<a href="javascript:BBChide()"><img src="{BBCB_MG_IMG_PATH}hide{BBCB_MG_IMG_EXT}" name="hide_img" onMouseOver="helpline('hide')" alt="{L_BBCB_MG_HIDE}" title="{L_BBCB_MG_HIDE}" class="bbimages" /></a>


Now, with this changes, we have a new button to use the bbcode hide in the posting page

Result:
1

2

Special thanks: TheSteffen for this great idea, Zuker for the BBCode button tutorial. :bye_01:

Subject: Re: Controlled Download
TopoMotoV3X wrote: [View Post]
Special thanks: TheSteffen for this great idea, Zuker for the BBCode button tutorial. :bye_01:


You are welcome. :mricy:

Glad you solved your problem yourself.

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.9524s (PHP: 2% SQL: 98%)
SQL queries: 15 - Debug Off - GZIP Enabled