vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Search/Browse Attachments Across All Forums (https://vborg.vbsupport.ru/showthread.php?t=32503)

incursio 11-18-2001 10:00 PM

A little something I whipped up for one of our busier sites, which has several thousand image attachments.

Basically, it allows you to perform searches for attachments across your forums, or just a single forum, by username. You can also sort by date posted, forum it was posted in, thread title, or the attachment filename.

This is a rewrite from the initial version. Due to popular demand, it now uses the vB template system. Yes, Virginia, including your headers and footers. It also uses attachment icons now - kind of a nice touch.

To install, copy attachment_browser.php to your main forums directory. Then, you'll need to create 3 templates:
  • attachment_browser_search_form
  • attachment_browser_results
  • attachment_browser_result_bits

A sample .SQL file is included with the distribution. To create the templates using this file, simply run it through the mysql client as follows:

Code:

/path/to/mysql -u user -ppassword db_name template < attachment_browser_templates.sql
Enjoy.

Cheers.
Scott

incursio 11-18-2001 11:14 PM

Here's the file:

Cheers.
Scott

squawell 11-19-2001 12:06 AM

any screenshot?? or something can make this hack clear~~

over 11-19-2001 12:14 AM

very useful hack thanks :)

incursio 11-19-2001 02:02 AM

It isn't a hack - and no screenshots, you can see a vanilla example (no header, and a simple footer) here though:

http://www.wetcanvas.com/forums/browse_attach.php

Search for "scottb" for an example.

Cheers.
Scott

squawell 11-19-2001 02:50 AM

oh~~~it's great !!

nice work !!

Admin 11-19-2001 04:37 AM

I would use it but it's not template driven...
Is it supposed to be something external to the forum?

FWC 11-19-2001 04:47 AM

Quote:

Originally posted by FireFly
I would use it but it's not template driven...
Is it supposed to be something external to the forum?

It's pretty cool. I modified it to require config.php instead of having the database info in the file. But, I do need to get it to call the header and footer from my forums. Right now I'm using the includes from our home page.

incursio 11-19-2001 05:20 AM

Getting it to use the headers/footers from the forums is a simple SELECT from the database. I'll post something tomorrow - going to bed now.

With regard to the look and feel of the actual results - you can simply customize the HTML in the script to do what you want.

Cheers.
Scott

Admin 11-19-2001 05:52 AM

[QUOTE]Originally posted by incursio
With regard to the look and feel of the actual results - you can simply customize the HTML in the script to do what you want.


All times are GMT. The time now is 06:13 PM.

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.01018 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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