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)
-   -   Moderators Functions - [AJAX] Edit Attachment Filenames (https://vborg.vbsupport.ru/showthread.php?t=126928)

Abe1 09-17-2006 10:00 PM

[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 max
Updates:

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!
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. :)

Abe1 09-18-2006 02:14 PM

Quote:

Originally Posted by Spiceworld
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.

DPSR 09-18-2006 03:49 PM

Wah, i really need this a loooot!!

Thanks a lot Abe1 for the hack :)

and Spiceworld, its working that way only :)

Abe1 09-18-2006 05:20 PM

Quote:

Originally Posted by Spiceworld
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?

Abe1 11-22-2006 06:30 PM

Quote:

Originally Posted by Kmaster (Post 1122924)
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

Quote:

Originally Posted by Abe1 (Post 1077699)
I think I know what you mean. The end '>' is right after the </if>

Did you guys edit this before installing?

Abe1 03-19-2007 12:29 PM

Quote:

Originally Posted by Doctor Death (Post 1207093)
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.

Abe1 03-19-2007 12:30 PM

Quote:

Originally Posted by Doctor Death (Post 1207094)
Did you guys edit this before installing?

There is no problem. He had thought something was not there.

Abe1 04-16-2007 12:09 PM

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.

Abe1 04-20-2007 02:05 PM

Quote:

Originally Posted by millionart (Post 1231935)
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:

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_remove_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_remove_user_Done)
        do_thanks_remove_user.send('post_thanks.php?do=post_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?

Abe1 05-08-2007 10:46 PM

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

Quote:

Originally Posted by Abe1 (Post 1231978)
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.:)

Abe1 05-12-2008 01:01 AM

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

https://vborg.vbsupport.ru/showthread.php?t=178937


All times are GMT. The time now is 05:19 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.01132 seconds
  • Memory Usage 1,773KB
  • 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
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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