https://www.icyphoenix.com/viewtopic.php?f=37&t=6019
-----------------------------------
TopoMotoV3X
Wed 24 Jun, 2009 23:07

Controlled Download
-----------------------------------
You can prevent downloading files, if not responding to the topic that contains the file you want to download?


-----------------------------------
spydie
Wed 24 Jun, 2009 23:20

Re: Controlled Download
-----------------------------------
Yes you can.

I think thats in ADV downloads


-----------------------------------
TopoMotoV3X
Thu 25 Jun, 2009 00:02

Re: Controlled Download
-----------------------------------
perhaps you mean this:
[quote]Number of Posts a user needs to get download access[/quote]
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 [url=http://www.icyphoenix.com/dload.php?action=file&file_id=36]Link[/quote]

Prevent this download, if the user does not write anything in this topic.


-----------------------------------
TheSteffen
Thu 25 Jun, 2009 19:41

Re: Controlled Download
-----------------------------------
Another way is to hide the Link...
This only would be visible after you post.

[code linenumbers=false]Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
[/code]

Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.



-----------------------------------
TopoMotoV3X
Thu 25 Jun, 2009 21:10

Re: Controlled Download
-----------------------------------
Great idea! but I would like to further amend this..
	 	
you can see the words contained between the tags? 

example:

][color=#FF5500][font=Arial][b][i]Download[/i][/b][/font][/color]

I would like to change the written 
[b]"Sorry, but you must be registered and also must post a reply to view this message.[/b]
with	
[b]Must send a reply to download this file.[/b]
make sure to see this message after clicking on written Download... 
maybe I'm asking too much  :mryellow: .... thanks in advance, greeting.


-----------------------------------
TopoMotoV3X
Mon 06 Jul, 2009 23:52

Re: Controlled Download
-----------------------------------
Well, I made a change to satisfactory:

[color=red][b]1)[/b][/color] [b]File: includes/bbcode.php[/b]

[b]Find[/b]


[code linenumbers=false]$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';[/code]
[b]Delete[/b]  :mryellow: 

[color=red][b]
2)[/b][/color] [b]File: /language/lang_XXXX/lang_bbcb_mg.php[/b]

[b]Find: [/b]
[code]$lang['xs_bbc_hide_message_explain'] = 'Sorry, but you must be registered and also must post a reply to view this message.';[/code]

	
[b]Changes with:
[/b]

[code linenumbers=false]$lang['xs_bbc_hide_message_explain'] = 'Sorry, Must send a reply to download this file.';[/code]

	
if we want to complete the work, I found this change... 	we can add this button, thanks to this mod by Zuker:

[quote user="Zuker" post="11381"]


[hr]
With this changes, you can add this button. 
[color=darkgreen][b]Example Image of the button[/b][/color]: [url=http://img458.imageshack.us/img458/1566/hidebuttonly5.jpg]Image of the button pressed
Follow this instructions:

Upload to [b][color=blue]/images/bbcb_mg/images/gif[/color][/b] this images:
[img]http://img106.imageshack.us/img106/4094/hide7aq.gif[/img] = (rename this to [i]hide.gif[/i])
[img]http://img106.imageshack.us/img106/6684/hide13lp.gif[/img] = (rename this to [i]hide1.gif[/i])

In [b][color=blue]/languages/lang_xxx/lang_bbcb_mg.php[/color][/b]

[b]FIND[/b]:
[code linenumbers=false]$lang['bbcb_mg_highlight'] = 'Highlight';[/code]

[b]AFTER, ADD[/b] 

[code linenumbers=false]$lang['bbcb_mg_hide'] = 'Hide a message';[/code]

[b]FIND[/b]:
[code linenumbers=false]$lang['s_highlight_help'] = [/code]

[b]AFTER, ADD[/b] 

[code linenumbers=false]$lang['s_hide_help'] = 'Hide a text, registered users must reply or thanks topic to view the hidden message: Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
';[/code]

In [b][color=blue]/includes/bbcb_mg.php[/color][/b]

[b]FIND[/b]:
[code linenumbers=false]	'L_BBCB_MG_HIGHLIGHT' => $lang['bbcb_mg_highlight'],[/code]

[b]AFTER, ADD[/b] 

[code linenumbers=false]	'L_BBCB_MG_HIDE' => $lang['bbcb_mg_hide'],[/code]

[b]FIND[/b]:
[code linenumbers=false]	'L_HIGHLIGHT_HELP' => $lang['s_highlight_help'],[/code]

[b]AFTER, ADD[/b] 

[code linenumbers=false]	'L_HIDE_HELP' => $lang['s_hide_help'],[/code]

In [b][color=blue]/languages/lang_xxx/bbcb_mg.js[/color][/b]

[b]FIND[/b]:
[code linenumbers=false]s_smiley_creator = 'Smiley Creator: [smiley=1]Text[/smiley] insert a smiley with text';[/code]

[b]AFTER, ADD[/b] 

[code linenumbers=false]s_hide_help = 'Hide a text, registered users must reply or thanks topic to view the hidden message: Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
';[/code]

[b]FIND[/b]:

[code linenumbers=false]var Td = 0;[/code]

[b]AFTER ADD[/b]:

[code linenumbers=false]var Hide = 0;[/code]

[b]FIND[/b]:

[code linenumbers=false]'[highlight=]'[/code]

[b]AFTER ADD[/b]

[code linenumbers=false]'Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
',[/code]

[b]FIND[/b]:

[code linenumbers=false]function BBCbold()[/code]

[b]BEFORE ADD[/b]:

[code linenumbers=false]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 = "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
";
			document.post.message.focus();
			return;
		}
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		//mozWrap(txtarea, "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
");
		mozInsert(txtarea, "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
");
		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);
}[/code]

In [b][color=blue]/templates/mg_themes/bbcb_mg.tpl[/color][/b]

[b]FIND[/b]:

[code linenumbers=false]					<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>[/code]

[b]AFTER ADD[/b]:
[code linenumbers=false]					<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>[/code]

Now, with this changes, we have a new button to use the bbcode hide in the posting page[/quote]
[b]Result:[/b]
 [img]http://www.icyphoenix.com/files/images/3404/1.png[/img] 

 [img]http://www.icyphoenix.com/files/images/3404/2.png[/img] 

Special thanks: [b]TheSteffen[/b] for this great idea, [b]Zuker[/b] for the BBCode button tutorial.  :bye_01:


-----------------------------------
TheSteffen
Fri 10 Jul, 2009 08:44

Re: Controlled Download
-----------------------------------
[quote user="TopoMotoV3X" post="41014"]Special thanks: [b]TheSteffen[/b] for this great idea, [b]Zuker[/b] for the BBCode button tutorial.  :bye_01:[/quote]

You are welcome.  :mricy: 

Glad you solved your problem yourself.


