View Full Version : Moderators Functions - [AJAX] Edit Attachment Filenames
CLICK HERE FOR A LATER VERSION OF THIS HACK
Edit Attachment Filenames 2.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 maxUpdates:
Version 1.0 (09/18/06):
First release of this hack.
Version 2.0 (04/16/07):
Re-wrote most of the code to optimize AJAX code.
Please post your comments or suggestions for this hack. I read ALL posts.
MAKE SURE YOU CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=126928)!
You will get an email when a new version is released.
Spiceworld
09-18-2006, 01:36 PM
Hi
Have installed, but noticed that the first <tr> statements in each template edit are both missing the ending >
Cheers
Richard
FleaBag
09-18-2006, 01:44 PM
Great addition! I'll definately install. Thanks. :)
Hi
Have installed, but noticed that the first <tr> statements in each template edit are both missing the ending >
Cheers
Richard
I'll look into it.
Wah, i really need this a loooot!!
Thanks a lot Abe1 for the hack :)
and Spiceworld, its working that way only :)
Hi
Have installed, but noticed that the first <tr> statements in each template edit are both missing the ending >
Cheers
Richard
I think I know what you mean. The end '>' is right after the </if>
harmor19
09-18-2006, 05:30 PM
Great hack.
Snake
09-18-2006, 06:00 PM
That's pretty good. Thanks!
Milad
09-19-2006, 06:33 AM
This is very good
Basboss
09-19-2006, 06:55 AM
This one is should be a standard vb's option...thanks!
Kmaster
11-22-2006, 01:26 PM
will it work for vb35?
will it work for vb35?
I think it should but i'm not sure if it will import into a vb3.5 forum. You can try though. (It wont kill your forum)
testebr
03-18-2007, 11:16 AM
The best hack ever!!!
Need be part of default vbulletin.
Doctor Death
03-19-2007, 03:57 AM
Installed, but a couple of things I am wondering about
What about the syntax error in the first TR? No one ever corrected that.
In my forums, there doesnt seem to be a place to edit these filenames... in other words, I cannot see any affect this plugin has. I did both template edits and installed the XML file, but there doesnt seem to be any difference.
Thanks
Doctor Death
03-19-2007, 03:58 AM
I think I know what you mean. The end '>' is right after the </if>
Did you guys edit this before installing?
Installed, but a couple of things I am wondering about
What about the syntax error in the first TR? No one ever corrected that.
In my forums, there doesnt seem to be a place to edit these filenames... in other words, I cannot see any affect this plugin has. I did both template edits and installed the XML file, but there doesnt seem to be any difference.
Thanks
You have to double click right by the attachment name.
Did you guys edit this before installing?
There is no problem. He had thought something was not there.
Version 2.0 (04/16/07):
Re-wrote most of the code to optimize AJAX code.
Please redo the template edits and revert attachmentbit and postbit_attachment templates before you start.
millionart
04-20-2007, 12:48 PM
a good mod
but if i rename a attachment in Chinese, it cant work.
it doesnt Support utf8 character.
a good mod
but if i rename a attachment in Chinese, it cant work.
it doesnt Support utf8 character.
Sorry, I have no way to test it.
Surviver
05-08-2007, 12:02 PM
In the js File, ist the following Code:
function post_thanks_give(postid, integrate)
{
fetch_object('post_thanks_button_' + postid).style.display = 'none';
if (integrate == true)
{
fetch_object('post_groan_button_' + postid).style.display = 'none';
}
do_thanks_add = new vB_AJAX_Handler(true);
do_thanks_add.postid = postid;
do_thanks_add.onreadystatechange(thanks_add_Done);
do_thanks_add.send('post_thanks.php?do=post_thanks _add&using_ajax=1&p=' + postid);
}
function thanks_add_Done()
{
if (do_thanks_add.handler.readyState == 4 && do_thanks_add.handler.status == 200)
{
fetch_object('post_thanks_box_' + do_thanks_add.postid).innerHTML = do_thanks_add.handler.responseText;
}
}
function post_thanks_remove_all(postid, integrate)
{
do_thanks_remove_all = new vB_AJAX_Handler(true)
do_thanks_remove_all.postid = postid
do_thanks_remove_all.onreadystatechange(thanks_rem ove_all_Done)
do_thanks_remove_all.send('post_thanks.php?do=post _thanks_remove_all&using_ajax=1&p=' + postid)
fetch_object('post_thanks_button_' + postid).style.display = ''
if (integrate == true)
{
fetch_object('post_groan_button_' + postid).style.display = '';
}
}
function thanks_remove_all_Done()
{
if (do_thanks_remove_all.handler.readyState == 4 && do_thanks_remove_all.handler.status == 200)
{
fetch_object('post_thanks_box_' + do_thanks_remove_all.postid).innerHTML = do_thanks_remove_all.handler.responseText
}
}
function post_thanks_remove_user(postid, integrate)
{
do_thanks_remove_user = new vB_AJAX_Handler(true)
do_thanks_remove_user.postid = postid
do_thanks_remove_user.onreadystatechange(thanks_re move_user_Done)
do_thanks_remove_user.send('post_thanks.php?do=pos t_thanks_remove_user&using_ajax=1&p=' + postid)
fetch_object('post_thanks_button_' + postid).style.display = ''
if (integrate == true)
{
fetch_object('post_groan_button_' + postid).style.display = '';
}
}
function thanks_remove_user_Done()
{
if (do_thanks_remove_user.handler.readyState == 4 && do_thanks_remove_user.handler.status == 200)
{
fetch_object('post_thanks_box_' + do_thanks_remove_user.postid).innerHTML = do_thanks_remove_user.handler.responseText
}
}
Ist this Correct?
How did post thanks hack get it's way into this thread?
Triky
05-09-2007, 10:29 AM
Nice hack, Abe1. :)
millionart
10-06-2007, 09:01 PM
Sorry, I have no way to test it.
You can rename any attachment to "中文附件名测试" for testing.
(The character means by "the Chinese attachment name test".
Hope you can fix it , theanks.:)
Version 3.0 (05/11/08):
First release of this hack for vb 3.7.
https://vborg.vbsupport.ru/showthread.php?t=178937
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.