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)
-   -   Add-On Releases - Module CMPS:Recent Attachments (https://vborg.vbsupport.ru/showthread.php?t=143143)

sinisterpain 03-24-2007 10:00 PM

Module CMPS:Recent Attachments
 
Module CMPS Recent Attachments


Idea was based on original hack by MindTrix

A request from a member for showing document such as text and zip files prompted me to add an additional zip file to this hack. Please be sure you download the correct file. The CMPS_recent_attachment_images.zip is for showing pictures only. The CMPS_newattachments_files.zip will display both but will only output the extension image with the file name and info (see Screenshot below).

What it does:

It will query attachments from the database for the latest 4 images or files posted, and output it to the module created on your home page. I believe I have seen this requested both here and at vBadvanced.
Will add 1 query to the home page.

Files and Templates added:

CMPS_recent_attachment_images.zip
recentattachment.php
adv_portal_newattachments

CMPS_newattachments_files.zip
newattachment.php
adv_portal_recentattachments

Tested on vb3.6.4

Installation:

1. Extract the module file from the zip to your desktop.

2. Go to your admincp->vBa CMPS->Download/Upload Module.

3. Browse to where you put the module file click submit.

4. Make sure you set all options and permisions for the module.

5. Be sure that you enable the module in your default home page or it will not show.


Change log:

version 1.00 - First release. Added additional module for files and docs.
version 1.01 - Added ability to view the members post of the image or file attachment in a new window from CMPS module.
Added update for CMPS 3.0 module
Please be sure to click installed if you want support

sinisterpain 03-25-2007 08:06 PM

Reserved

tehPARADOX 03-25-2007 08:33 PM

Any plans on displaying other attachments? such as docs & archives?

sinisterpain 03-25-2007 08:36 PM

Quote:

Originally Posted by tehPARADOX (Post 1212144)
Any plans on displaying other attachments? such as docs & archives?

I plan on playing around with different options so its a possibility

sinisterpain 03-26-2007 02:28 AM

Quote:

Originally Posted by tehPARADOX (Post 1212144)
Any plans on displaying other attachments? such as docs & archives?

Updated and added additional zip file for your request. Hopefully its what you where looking for. :D

tehPARADOX 03-26-2007 02:40 AM

Wow that was fast, great job! And yes it's exactly what I was looking for.

sensimilla 03-26-2007 06:36 AM

Outstanding! I have almost payed for this hack ! :) 5 stars and MOTM

Thumbnail creation isnt perfect, they are deformed.

I would request the possibilty to
- not display file title ( with large titles it doesnt look good )
- select forum from which they should be grabbed
- select number of attachments to display

great job! keep up developing this mod!

sinisterpain 03-26-2007 08:09 PM

Quote:

Originally Posted by sensimilla (Post 1212508)
Outstanding! I have almost payed for this hack ! :) 5 stars and MOTM

Thumbnail creation isnt perfect, they are deformed.

I would request the possibilty to
- not display file title ( with large titles it doesnt look good )
- select forum from which they should be grabbed
- select number of attachments to display

great job! keep up developing this mod!

If your using the image only zip file you can adjust the size of the picture you want by editing the php file. I think I set it to 75 width 75 height. Change the code in red to what ever size you want.
Code:

[ $newattachment['attachment'] .= '<div><img class="inlineimg" src="' . $vbulletin->options['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $attachment['attachmentid'] . '" width="75" height="75">
You can also change the number of files displayed by changing the query from the current 4 to what ever you wish to display. Change the red 4 to what you want.
Code:

$query_attachments = $db->query_read("
 SELECT *
  FROM " . TABLE_PREFIX . "attachment
  WHERE visible = 1 AND dateline < " . TIME() ." ORDER BY dateline DESC LIMIT 4");

Glad you could use it. Enjoy :)

FleaBag 03-26-2007 09:17 PM

Brilliant, thanks! :)

Invalid ID 03-27-2007 01:17 AM

It's just great. But there's one problem, it's also showing the attachments members using for their signature.

Also, it does not show the pictures attached using https://vborg.vbsupport.ru/external/2011/07/5.gif

Can you please give us one that can also work with images that are attached from some website?

Thanks


All times are GMT. The time now is 09:47 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.01152 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (3)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