vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   [SOLVED]Change attachments name in post acoording type ( for 2 types only ) (https://vborg.vbsupport.ru/showthread.php?t=267772)

danyxxx 08-01-2011 12:10 PM

[SOLVED]Change attachments name in post acoording type ( for 2 types only )
 
Hello,

I need a change, a plugin or something that when I attach a file. txt ( whatever name for exemple: vbulletin.txt ) and make de thread\post , in the attachments will show:

Code:

get file
Instead to see:

Code:

vbulletin.txt
The same thing for .rar type , exemple for: vbulletin.rar archive to show ->

Code:

get archive
Instead to see:

Code:

vbulletin.rar
Please nice help me with this kind of modification :erm:

ps: sorry for my bad english .

danyxxx 08-04-2011 02:20 PM

In 3 days no answer?
Maybe this is "up" or "bump" but even then, no answer !?
It's really a god modification guys :cool:

Lynne 08-04-2011 04:27 PM

I don't really understand what you are trying to do. If the extension is .txt or .rar then instead of showing the attachment name, you want to just say "get file" or "get archive"?

danyxxx 08-04-2011 05:33 PM

Exactly :) ( in postbit, obviously ... for 3.8.x )

danyxxx 08-07-2011 11:32 AM

01 Aug 2011, 14:10 -> 1 week and nobody want's to offer a little help with this modification?
Sad ... :erm:

kh99 08-07-2011 12:05 PM

Create a plugin using hook postbit_attachment,

PHP Code:

if (substr($attachment['filename'], -4) === ".txt")
    
$attachment['filename'] = "get file";
else if (
substr($attachment['filename'], -4) === ".rar")
    
$attachment['filename'] = "get archive"


danyxxx 08-07-2011 12:38 PM

Ok... I will try and I will return with the answer .

EDIT:

Yeah it's working .
Kind Regards!


All times are GMT. The time now is 04:02 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.01810 seconds
  • Memory Usage 1,721KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete