Home

 

Home    Forum    Search    FAQ    Register    Log in

 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Download File If You Answer.
Author Message
Reply with quote Download Post 
Post Download File If You Answer. 
 
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

Image calling: hide.gif
Image 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:
 Image

I hope it is to your liking

Regards TopoMotoV3X
 



 
Last edited by TopoMotoV3X on Sat 23 Jan, 2010 09:51; edited 2 times in total 
View user's profileSend private message 
Back to topPage bottom
Thanks for the useful Topic TopoMotoV3X:
DWho (09 January), Costa (03 February) 
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
is it similar to hide this mod?
is ti possible only for webmster?
I have a news forum that only the administrator can upload the news, which can be viewed by everyone. I'd like to put a few lines of the news and then this mod, for those not registered to invite them to register. it's possible?

thanks a lot
 



 
View user's profileSend private messageVisit poster's website 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
Thank you very much for posting here... I hope everyone who reads your post will find it very useful modifiction

   
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
greetings someone to try and AVIC because I can not make it work this way and I need for my web
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
odelot ha scritto: [Visualizza Messaggio]
is it similar to hide this mod?
is ti possible only for webmster?
I have a news forum that only the administrator can upload the news, which can be viewed by everyone. I'd like to put a few lines of the news and then this mod, for those not registered to invite them to register. it's possible?

thanks a lot

you can replace the message with what you want, can set viewing permissions from the CSM page.

DWho ha scritto: [Visualizza Messaggio]
Thank you very much for posting here... I hope everyone who reads your post will find it very useful modifiction

   

Thank you DWho  

rendimare ha scritto: [Visualizza Messaggio]
greetings someone to try and AVIC because I can not make it work this way and I need for my web


Tomorrow I will give you the files modified, you only have to replace those on your server.
PS: I do not understand much of these changes php and html, I'm just presenting the changes I am doing for my forum...    I apologize for my poor English, my language is Italian.  
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
I added the files already modified.... regards.
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
Thanks for updating...

   
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
Mods on Mod  
using the button to hide the download will automatically insert a button with the specific:

 Image

How we do it?

Go to:
language/lang_english

File:
lang_bbcb_mg.php

Search:
'xs_bbc_hide_message_explain' => 'Sorry, Must send a reply to download this file.',


Replace with:
   'xs_bbc_hide_message_explain' => '<form action=II
    <input disabled="disabled" type="image"src="language/lang_english/hide_en.png"/form>',


At first I thought I'd post a message popup, but not all have to allow popup in their computers.

Everything worked fine, but do not know if the tag is correct maybe DWho, may confirm..  

Regards.
 



 
View user's profileSend private message 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Download File If You Answer. 
 
As soon as I get a chance i will add this mod to test for you... if someone has added it already maybe they can confirm

   
 



 
View user's profileSend private message 
Back to topPage bottom
Display posts from previous:   
 
HideWas this topic useful?
Share this topic
blinkslist.com blogmarks.net co.mments.com del.icio.us digg.com newsvine.com facebook.com fark.com feedmelinks.com furl.net google.com linkagogo.com ma.gnolia.com meneame.net netscape.com reddit.com shadows.com simpy.com slashdot.org smarking.com spurl.net stumbleupon.com technorati.com favorites.live.com yahoo.com DIGG ITA Fai Informazione KiPapa Ok Notizie Segnalo Bookmark IT
Link this topic
URL
BBCode
HTML
 

Post new topic  Reply to topic  Page 1 of 1
 
 

Users browsing this topic: 0 Registered, 0 Hidden and 1 Guest
Registered Users: None


 
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 cannot download files
You cannot post calendar events