https://www.icyphoenix.com/viewtopic.php?f=28&t=3682 ----------------------------------- KasLimon Sun 24 Feb, 2008 22:17 Download BBCode ----------------------------------- [b][u]Customization description[/u][/b] This BBCode will allow you to add links to downloads when posting. The link will look like this: [url=http://www.icyphoenix.com/dload.php?action=category&cat_id=2][img]http://www.icyphoenix.com/files/images/548/mid_a1f07e92d0a7deb385654421facc770c_downloadua3.gif[/img] You'll be able to add this with the tag [download]URL[/download] You'll also be able to set the target (by default _blank). For example [download target=_self]Download[/download]. [b][u]Installation instructions[/u][/b] [list=1][*]To download images right click on them and choose "Save image". Upload [img]http://www.icyphoenix.com/files/images/548/mid_345d85135c765e92f7e3ba1ba2cd2e63_downloadsv4kp3.gif[/img] to images/bbcb_mg/images/gif/download[b].gif[/b] (image by Danilo) Upload [img height=20]http://www.icyphoenix.com/files/images/548/mid_a1f07e92d0a7deb385654421facc770c_downloadua3.gif[/img] to images/download[b].gif[/b] (image found in [url=http://xlphs.deviantart.com/art/Download-52340608]Deviantart) [*]Apply code changes:[spoiler][code linenumbers=false] # #-----[ OPEN ]------------------------------------------ # includes/bbcode.php # #-----[ FIND ]------------------------------------------ # 'codeblock' => array( 'nested' => false, 'inurl' => false, ), # #-----[ AFTER, ADD ]------------------------------------------ # 'download' => array( 'nested' => false, 'inurl' => false, ), # #-----[ FIND ]------------------------------------------ # // OPACITY # #-----[ BEFORE, ADD ]------------------------------------------ # // DOWNLOAD if($tag === 'download') { if(empty($content) || $this->is_sig) { return $error; } if (isset($item['params']['target'])) { $target = $item['params']['target']; } else { $target = '_blank'; } $html = '' . $lang['Download'] . ''; return array( 'valid' => true, 'html' => $html ); }[/code] [b]Apply this to all languages you have installed[/b]:[code linenumbers=false]# #-----[ OPEN ]------------------------------------------ # language/lang_english/bbcb_mg.js # #-----[ FIND ]------------------------------------------ # s_posticyimage = ' # #-----[ AFTER, ADD ]------------------------------------------ # s_download_insert = 'Please write file URL'; # #-----[ FIND ]------------------------------------------ # s_smiley_creator = ' # #-----[ AFTER, ADD ]------------------------------------------ # s_download_help = 'Download: [download]URL[/download] Insert a link to a file'; # #-----[ FIND ]------------------------------------------ # '[emff]','[/emff]' # #-----[ REPLACE WITH ]------------------------------------------ # '[emff]','[/emff]', '[download]','[/download]' # #-----[ FIND ]------------------------------------------ # var ToAdd = "[url=" + enterURL + "]" + enterTITLE + ""; } PostWrite(ToAdd); } # #-----[ AFTER, ADD ]------------------------------------------ # function BBCdownload() { var FoundErrors = ''; var enterURL = prompt(s_download_insert, s_url_insert_tip); if (!enterURL) { FoundErrors += s_url_error; } if (FoundErrors) { alert(s_gen_error + FoundErrors); return; } var ToAdd = "[download]" + enterURL + "[/download]"; PostWrite(ToAdd); }[/code] [b]Apply this to all templates you have installed[/b]:[code linenumbers=false]# #-----[ OPEN ]------------------------------------------ # templates/mg_themes/bbcb_mg.tpl # #-----[ FIND ]------------------------------------------ # {L_BBCB_MG_URL} # #-----[ BEFORE, ADD ]------------------------------------------ # {L_BBCB_MG_DOWNLOAD}[/code][/spoiler] [*]Clean cache[/list] Enjoy this mod! :mricy: ----------------------------------- ThE KuKa Sun 24 Feb, 2008 22:49 Re: Download BBCode ----------------------------------- Nice work Kas! :D ----------------------------------- KasLimon Sat 08 Mar, 2008 11:43 Re: Download BBCode ----------------------------------- Restored to Customizations, It still works ;) ----------------------------------- TopoMotoV3X Mon 08 Jun, 2009 14:52 Re: Download BBCode ----------------------------------- hello all... You can do that you can not download the file if not answered in this topic where you download?? ----------------------------------- DWho Mon 08 Jun, 2009 22:09 Re: Download BBCode ----------------------------------- there is no download except for the images... to make the mod work you have to follow the code changes in the first post... [b]click on the spoiler[/b] :mrgreen: :mrgreen: ----------------------------------- TopoMotoV3X Tue 09 Jun, 2009 01:23 Re: Download BBCode ----------------------------------- I made the changes to the code, but on icy italy I was told that with a little modification, could use this mod to stop the download for those who do not respond in the topic.. :D I had to replace the original code bbcode.php (made from KasLimon) with this: [spoiler][code linenumbers=false] // DOWNLOAD if($tag === 'download') { if(!$userdata['session_logged_in']) { $html = '$lang['Links_For_Guests']'; } else { // Start initial var setup $forum_id = 0; $topic_id = 0; $post_id = 0; if (isset($_GET[POST_FORUM_URL]) || isset($_POST[POST_FORUM_URL])) { $forum_id = (isset($_GET[POST_FORUM_URL])) ? intval($_GET[POST_FORUM_URL]) : intval($_POST[POST_FORUM_URL]); } elseif (isset($_GET['forum'])) { $forum_id = intval($_GET['forum']); } else { $forum_id = ''; } if (isset($_GET[POST_TOPIC_URL])) { $topic_id = intval($_GET[POST_TOPIC_URL]); } elseif (isset($_GET['topic'])) { $topic_id = intval($_GET['topic']); } if (isset($_GET[POST_POST_URL])) { $post_id = intval($_GET[POST_POST_URL]); } $forum_id_append = (!empty($forum_id) ? (POST_FORUM_URL . '=' . $forum_id) : ''); $topic_id_append = (!empty($topic_id) ? (POST_TOPIC_URL . '=' . $topic_id) : ''); $post_id_append = (!empty($post_id) ? (POST_POST_URL . '=' . $post_id) : ''); $post_id_append_url = (!empty($post_id) ? ('#p' . $post_id) : ''); $sql = "SELECT u.*, p.* FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u WHERE p.topic_id = $topic_id AND u.user_id = p.poster_id"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Could not read post information.", '', __LINE__, __FILE__, $sql); } $postrow = array(); if($row = $db->sql_fetchrow($result)) { $postrow[] = $row; } while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); $total_posts = count($postrow); if(empty($content) || $this->is_sig) { return $error; } if (isset($item['params']['target'])) { $target = $item['params']['target']; } else { $target = '_blank'; } for($i = 0; $i < $total_posts; $i++) { $poster_id = $postrow[$i]['user_id']; if($poster_id == $userdata['user_id']) { $html = '' . $lang['Download'] . ''; } else { $html = '' . $lang['Reply_For_Download'] . ''; } } } return array( 'valid' => true, 'html' => $html ); }[/code][/spoiler] 2) file (language / lang_ * / lang_main.php) before: [code linenumbers=false]//$lang[''] = '';[/code] I added the following code: [code linenumbers=false]$lang['Reply_For_Download'] = 'You must answer the question to start the download.';[/code] but does not work .... :oops: ----------------------------------- nittayay Thu 10 Nov, 2011 12:30 Re: Download BBCode ----------------------------------- thanks ----------------------------------- antonio11 Thu 19 Apr, 2012 16:45 Re: Download BBCode ----------------------------------- non vedendo nesuna sezzione per i saluti anche sapendo che non e la sezione giusta saluto qua tutto il forum volevo chiedere come mai non riesco a scaricare mi serve questo codice grazie a tutti e buon lavoro ----------------------------------- Joshua203 Thu 19 Apr, 2012 18:07 Re: Download BBCode ----------------------------------- Hello and welcome to IcyPhoenix, No this is not the right place to greet the whole forum, please use the "Chit Chat" section for that: http://www.icyphoenix.com/forum.php?c=48 Please take note that this is an English speaking board, so please write in English, the Only Place where you are allowed to write in Italian is here: http://www.icyphoenix.com/viewforum.php?f=18 So in this topic please write in English (or use google-translate to translate your message to english) About your Question: [quote user="DWho" post="40317"]there is no download except for the images... to make the mod work you have to follow the code changes in the first post... [b]click on the spoiler[/b] :mrgreen: :mrgreen: [/quote] So you can download the pictures and make the codechanges ... the rest are only examples! Greetings, ...Joshua203 Translations below (click "show" to read): [spoiler][quote="Portugese Translation"] Olá e bem vindo ao IcyPhoenix, Não, este não é o lugar certo para cumprimentar o fórum inteiro, por favor use o "Chit Chat" seção para que: http://www.icyphoenix.com/forum.php?c=48 Por favor, tome nota que este é um conselho que fala Inglês, então por favor escrever em Inglês, o único lugar onde você tem permissão para escrever em italiano está aqui: http://www.icyphoenix.com/viewforum.php?f=18 Portanto, neste tópico, por favor escrever em Inglês (ou use google-traduzir para traduzir a sua mensagem para Inglês) Sobre sua pergunta: [quote user="DWho" post="40317"] não há download exceto para as imagens ... para fazer funcionar o mod você tem que acompanhar as mudanças de código no primeiro post ... [b] clique sobre o spoiler [/b] : mrgreen :: mrgreen: [/quote] Assim, você pode baixar as fotos e fazer as codechanges ... o resto são apenas exemplos! Saudações, ... Joshua203[/quote] [quote="Italian Translation"] Ciao e benvenuto IcyPhoenix, No questo non è il posto giusto per salutare tutto il forum, si prega di utilizzare il "Chit Chat" per che: http://www.icyphoenix.com/forum.php?c=48 Si prega di prendere atto che si tratta di una scheda di lingua inglese, quindi si prega di scrivere in inglese, l'unico posto dove è permesso di scrivere in italiano è qui: http://www.icyphoenix.com/viewforum.php?f=18 Quindi, in questo argomento si prega di scrivere in inglese (o usare google-translate per tradurre il messaggio all'inglese) Alla vostra domanda: [quote user="DWho" post="40317"] non vi è alcun download, tranne per le immagini ... per far funzionare il mod è necessario seguire i cambiamenti di codice nel primo post ... [b] clicca sul spoiler [/b] : mrgreen :: mrgreen: [/quote] Quindi, è possibile scaricare le immagini ed effettuare le codechanges ... il resto sono solo degli esempi! saluti, ... Joshua203[/quote][/spoiler] ----------------------------------- antonio11 Thu 19 Apr, 2012 18:45 Re: Download BBCode ----------------------------------- scusate lignoranza ma quaste modifiche si devono fare nei templat se si in quale template grazie ----------------------------------- Joshua203 Thu 19 Apr, 2012 19:04 Re: Download BBCode ----------------------------------- non capito ... ENGLISH ONLY PLEASE! If you don't use google translate why would I? ----------------------------------- antonio11 Fri 20 Apr, 2012 17:27 Re: Download BBCode ----------------------------------- [quote user="Joshua203" post="55603"]non capito ... ENGLISH ONLY PLEASE! If you don't use google translate why would I?[/quote] excuse the ignorance but how much change must rate YES if YES nia template in Which model Thanks ----------------------------------- Joshua203 Sat 21 Apr, 2012 01:38 Re: Download BBCode ----------------------------------- The install instructions are all in the first post (in the spoiler, click to open the window) In the last section is explained that you need to do those edits to ALL templates you are using, anything before the last section is done to a function file (bbcode) and ALL languages you are using. Be aware that this is for IcyPhoenix only. And please be aware that this is a very old MOD ( Older Versions Archive » Old Customizations) ... I don't know if this would still work on the current versions!! Maybe someone else can tell you more about this. Greetings, ...Joshua203