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:
$lang['xs_bbc_hide_message_explain'] = 'This message is hidden, you have to answer this topic to see it.';
Replace with:
$lang['xs_bbc_hide_message_explain'] = 'Protected file, you must respond to the discussion for download.';
Find and delete:
$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:
'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.',
'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:
'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.',
'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
calling: hide.gif
calling: hide1.gif
Go to: /language/lang_english
File: lang_bbcb_mg.php
Search:
After add:
Search:
After add:
$js_lang['s_hide_help'] = 'Add link to hide: [hide]Download Link.[/hide]';
Go to: /language/lang_english
File: bbcb_mg.php
Search:
After add:
Search:
After add:
Go to: templates/common/js
File: bbcb_mg.js
Search:
After add:
Search:
After add:
Search:
Add first:
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);
}
{
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:
<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:
<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:
I hope it is to your liking
Regards TopoMotoV3X