Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post How To Allow Download After Reply 
 
Hello everyone, I'm updating my forum to the new version, and I want to bring back all the changes I had in version 1.2.0.27c, this is the first change adjusted for the  version 1.3.0.53  

This is an edit function to hide the download and thus encourage the user to respond if he wants to download the file.


Go to: /includes/
File: bbcode.php

Search:
Code: [Download] [Hide] [Select]
$lang['xs_bbc_hide_message_explain'] = 'This message is hidden, you have to answer this topic to see it.';

Replace with:
Code: [Download] [Hide] [Select]
$lang['xs_bbc_hide_message_explain'] = 'Protected file, you must respond to the discussion for download.';


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



Go to:  /language/lang_english
File: lang_bbcb_mg.php

Search:
Code: [Download] [Hide] [Select]
    'xs_bbc_hide_message' => 'Hidden Message',
    'xs_bbc_hide_quote_message' => 'Quoted Hidden Message, which is still hidden.',
    'xs_bbc_hide_message_explain' => 'Sorry, but you must be registered and also post a reply to view this message.',


Replace with:
Code: [Download] [Hide] [Select]
    'xs_bbc_hide_message' => 'Hidden Message',
    'xs_bbc_hide_quote_message' => 'Quoted Message, Download Error.',
    'xs_bbc_hide_message_explain' => 'Sorry, Must send a reply to download this file.',



Upload these two images to: /images/bbcb_mg/images/gif

hide calling: hide.gif
hide1 calling: hide1.gif



Go to: /language/lang_english

File: lang_bbcb_mg.php

Search:
Code: [Download] [Hide] [Select]
'bbcb_mg_highlight' => 'Highlight',


After add:
Code: [Download] [Hide] [Select]
'bbcb_mg_hide' => 'Hide a Download',


Search:
Code: [Download] [Hide] [Select]
$js_lang['s_phpbbmod_help'] = 'phpBB Mod Template';


After add:
Code: [Download] [Hide] [Select]
$js_lang['s_hide_help'] = 'Add link to hide: [hide]Download Link.[/hide]';



Go to: /language/lang_english
File: bbcb_mg.php

Search:
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'],


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


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



Go to: templates/common/js
File: bbcb_mg.js

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


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


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


After add:
Code: [Download] [Hide] [Select]
'[hide]','[/hide]',


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


Add first:
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][/hide]";
            document.post.message.focus();
            return;
        }
    }
    else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
    {
        //mozWrap(txtarea, "[hide]", "[/hide]");
        mozInsert(txtarea, "[hide]", "[/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);
}



Go to: templates/default
File: bbcb_mg.tpl

Search:
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>


Result:
 2010_01_05_013722


 re2


 re3

I hope it is to your liking

Regards TopoMotoV3X
 




____________
IP Version: 1.3.0.53b
Server: Linux
 
TopoMotoV3XSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
Thank you very much for sharing, I will move it to customizations forum.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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