Icy Phoenix

     
 

SOLVED Controlled Download

SOLVED Controlled Download

Article
Reply with quote    Download Post  
Post Controlled Download 
 
You can prevent downloading files, if not responding to the topic that contains the file you want to download?



 
TopoMotoV3X - View user's profile Send private message  
TopoMotoV3X [ Wed 24 Jun, 2009 23:07 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


SOLVED Controlled Download

Comments
Reply with quote    Download Post  
Post Re: Controlled Download 
 
Yes you can.

I think thats in ADV downloads



 
spydie - View user's profile Send private message  
spydie [ Wed 24 Jun, 2009 23:20 ]
Reply with quote    Download Post  
Post 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.



 
TopoMotoV3X - View user's profile Send private message  
TopoMotoV3X [ Thu 25 Jun, 2009 00:02 ]
Reply with quote    Download Post  
Post 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.




 
TheSteffen - View user's profile Send private message  
TheSteffen [ Thu 25 Jun, 2009 19:41 ]
Reply with quote    Download Post  
Post 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   .... thanks in advance, greeting.



 
TopoMotoV3X - View user's profile Send private message  
TopoMotoV3X [ Thu 25 Jun, 2009 21:10 ]
Reply with quote    Download Post  
Post 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  


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.  



 
TopoMotoV3X - View user's profile Send private message  
TopoMotoV3X [ Mon 06 Jul, 2009 23:52 ]
Reply with quote    Download Post  
Post Re: Controlled Download 
 
TopoMotoV3X wrote: [View Post]
Special thanks: TheSteffen for this great idea, Zuker for the BBCode button tutorial.  


You are welcome.  

Glad you solved your problem yourself.



 
TheSteffen - View user's profile Send private message  
TheSteffen [ Fri 10 Jul, 2009 08:44 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron