vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Moderators Functions - [AJAX] Edit Attachment Filenames (https://vborg.vbsupport.ru/showthread.php?t=178937)

Abe1 05-11-2008 10:00 PM

[AJAX] Edit Attachment Filenames
 
Edit Attachment Filenames 3.0


About this hack:
This hack is a pretty useful hack. It lets you edit filenames of attachments. Only users with 'canmoderateattachments' permissions on the forum that the attachment it posted by will be allowed to edit the filenames.

You access the edit by double clicking right near the filename of an attachment. It will bring up an edit box similar to the edit thread title vb feature. You will get an option to save or cancel the edit.

Now that you can see a list of all attachments in one thread, you would want to name some attachments differently so they can be identified with out looking at the post.

The filename extension cannot be edited.

Installation information on hack:
  • Files edited: 0
  • Templates edited: 2
  • Files to upload via FTP: 1
  • Time to install: 1 minute max
Updates:

Version 3.0 (05/11/08):
  • First release of this hack for vb 3.7.

Please post your comments or suggestions for this hack. I read ALL posts.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

veenuisthebest 05-12-2008 01:30 AM

reserved !!

RvG2 05-12-2008 02:18 AM

installed!

Boofo 05-12-2008 07:24 AM

Will this work for attachments as files as well as attachments in the db?

Milad 05-12-2008 09:30 AM

I wish you can eliminate the template edits! Can you?

Stoebi 05-12-2008 09:57 AM

Quote:

Originally Posted by Milad (Post 1516990)
I wish you can eliminate the template edits! Can you?

Do you have installed Template Modification System from Andreas? Use the attachment. ;)

@Abe1
Better use $vbphrase[save] and $vbphrase[cancel], please. :)

Javascript error, if I want inline edit an attachment in postbit template (see attached thumbnail, please):
Error: document.getElementById("attachment_filename_" + attachmentid) has no properties
Source file: .../clientscript/edit_attachment_filenames.js
Line: 9
Code:

document.getElementById('attachment_filename_' + attachmentid).innerHTML = ''
Edit:
Updated templateedits, because copy & paste error. Please download the templateedits-abe1_edit_attachment_name.xml again and reimport. sorry. :(

Regards

Abe1 05-12-2008 10:54 AM

Quote:

Originally Posted by Stoebi (Post 1517012)
Do you have installed Template Modification System from Andreas? Use the attachment. ;)

@Abe1
Better use $vbphrase[save] and $vbphrase[cancel], please. :)

Will be hard. It hard codes this into the plugin because I use 'button' and not 'submit'. It right now compares the Save or Cancel text.

Quote:

Originally Posted by Stoebi (Post 1517012)
Javascript error, if I want inline edit an attachment in postbit template (see attached thumbnail, please):
Error: document.getElementById("attachment_filename_" + attachmentid) has no properties
Source file: .../clientscript/edit_attachment_filenames.js
Line: 9
Code:

document.getElementById('attachment_filename_' + attachmentid).innerHTML = ''
Regards

You did not do the template edits perfectly then. It seems like you are missing the 2nd template edit for postbit_attachment

Abe1 05-12-2008 11:00 AM

Quote:

Originally Posted by Boofo (Post 1516904)
Will this work for attachments as files as well as attachments in the db?

Sure.

Abe1 05-12-2008 11:01 AM

Quote:

Originally Posted by Milad (Post 1516990)
I wish you can eliminate the template edits! Can you?

Nope. I wish I was able to though. I can make the headinclude edit go automatic. Maybe for next version.

Stoebi 05-12-2008 11:32 AM

Thank you very much Abe1 for this hint, this was a typically copy & paste error. Copied twice same text for find and replace :(

Regards


All times are GMT. The time now is 07:06 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.01187 seconds
  • Memory Usage 1,738KB
  • 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
  • (5)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