vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - NZB Attachment Parser (https://vborg.vbsupport.ru/showthread.php?t=136063)

Dismounted 01-09-2007 10:00 PM

NZB Attachment Parser
 
NZB Attachment Parser

Description:
This product will parse nzb attchments and display the contents in postbit.

Request Thread:
https://vborg.vbsupport.ru/showthread.php?t=135621

Installation:
All the installation information is in the package.

Changes:
1 Plugin
1 File Upload

Change Log:
11/01/2007 - Version 1.1
- Collapsible NZB File Content Tables

10/01/2007 - Version 1.0
- Initial Release

Dismounted 01-10-2007 02:59 AM

/me Reserves

bashy 01-10-2007 05:14 AM

Didnt work for me, I am using GARS, so this could be the reason :(

Code:

<if condition="$show['attachments']">
            <!-- attachments -->
                <div style="padding:$stylevar[cellpadding]px">

                    <if condition="$show['thumbnailattachment']">
                        <fieldset class="fieldset">
                            <legend>$vbphrase[attached_thumbnails]</legend>
                            <div style="padding:$stylevar[formspacer]px">
                            $post[thumbnailattachments]
                            </div>
                        </fieldset>
                    </if>

                    <if condition="$show['imageattachment']">
                        <fieldset class="fieldset">
                            <legend>$vbphrase[attached_images]</legend>
                            <div style="padding:$stylevar[formspacer]px">
                            $post[imageattachments]
                            </div>
                        </fieldset>
                    </if>

                    <if condition="$show['imageattachmentlink']">
                        <fieldset class="fieldset">
                            <legend>$vbphrase[attached_images]</legend>
                            <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                            $post[imageattachmentlinks]
                            </table>
                            </fieldset>
                    </if>

                    <if condition="$show['otherattachment']">
                        <fieldset class="fieldset">
                            <legend>$vbphrase[attached_files]</legend>
                            <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                            $post[otherattachments]
                            </table>
                        </fieldset>
                    </if>

                    <if condition="$show['moderatedattachment']">
                        <fieldset class="fieldset">
                            <legend>$vbphrase[attachments_pending_approval]</legend>
                            <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                            $post[moderatedattachments]
                            </table>
                        </fieldset>
                    </if>
                </div>
            <!-- / attachments -->
            </if>

Theres the attachment code, I have to go work so will be back later, great hack btw :)

Dismounted 01-10-2007 05:30 AM

What do you mean by 'It doesn't work?'

Raptor 01-10-2007 02:50 PM

worked perfect first time - great hack

bashy 01-10-2007 03:33 PM

Its ok, now sorted :)

I do have a question though, Would it be possible to have this so you have to
click a Show Files link and then they show?

EDIT: Sorry but when its a say DVD nzb theres lots of files and it slows the page down no end
I have had to remove this for now, If you do manage to find a way to add a link to show files
then i will deffo install again.....Thanks

Dismounted 01-11-2007 08:06 AM

Hack Updated!

11/01/2007 - Version 1.1
- Collapsible NZB File Content Tables

sde 01-11-2007 01:42 PM

does this require you to store your attachments in a directory vs the db?

bashy 01-11-2007 03:25 PM

Thank you so very much Dismounted, i actually thought it was a long shot, much appreciated :)

Sorry to ask some more but...

How do i set the table so that its closed by default please?
Also the image for the nzb attchment is no longer showing for some reason
Also i would like to see a gap between the attached file and the nzb file info window please

Dismounted 01-12-2007 03:14 AM

Quote:

Originally Posted by sde (Post 1156246)
does this require you to store your attachments in a directory vs the db?

Yes, you must store your attachments in the file system.
Quote:

Originally Posted by bashy (Post 1156298)
Thank you so very much Dismounted, i actually thought it was a long shot, much appreciated :)

Sorry to ask some more but...

How do i set the table so that its closed by default please?

1) In 'class_nzbparser.php', find
PHP Code:

$nzbfiletable "<table class=\"tborder\" cellpadding=\"$cellpadding\" cellspacing=\"$cellspacing\" border=\"0\" width=\"100%\" align=\"center\"><td class=\"tcat\" colspan=\"2\"><a style=\"float: right;\" href=\"#top\" onclick=\"return toggle_collapse('nzbfile" $nzbfileid "');\"><img id=\"collapseimg_nzbfile" $nzbfileid "\" src=\"" $imgdir_button "/collapse_tcat.gif\" alt=\"\" border=\"0\"></a>NZB File Contents</td></table>"

Replace with:
PHP Code:

$nzbfiletable "<script type=\"text/javascript\">
var times=1;
function check_collapse()
{
if (times==1)
{
times=2;
return toggle_collapse('nzbfile" 
$nzbfileid "');
}
}
</script>"
;
$nzbfiletable .= "<table class=\"tborder\" cellpadding=\"$cellpadding\" cellspacing=\"$cellspacing\" border=\"0\" width=\"100%\" align=\"center\"><td class=\"tcat\" colspan=\"2\"><a style=\"float: right;\" href=\"#top\" onclick=\"return toggle_collapse('nzbfile" $nzbfileid "');\"><img id=\"collapseimg_nzbfile" $nzbfileid "\" src=\"" $imgdir_button "/collapse_tcat.gif\" alt=\"\" border=\"0\" onload=\"check_collapse();\"></a>NZB File Contents</td></table>"

Quote:

Originally Posted by bashy (Post 1156298)
Also the image for the nzb attchment is no longer showing for some reason

In postbit_attachment, find:
HTML Code:

<!-- Start NZB Attachment Parser -->
<if condition="$attachment[attachmentextension] != 'nzb'">
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
</if>
<!-- End NZB Attachment Parser -->

Replace With:
HTML Code:

<img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
Quote:

Originally Posted by bashy (Post 1156298)
Also i would like to see a gap between the attached file and the nzb file info window please

In postbit_attachment, find:
PHP Code:

$nzb 

Add before:
HTML Code:

<br />


All times are GMT. The time now is 02:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04839 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_html_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete