vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Admin Functions (https://vborg.vbsupport.ru/showthread.php?t=23692)

tubedogg 07-25-2001 10:00 PM

String -> MD5 Encrypted String function added. To upgrade just reupload convert.php to your admin directory.

----------------------------------------------------------------

2 bugs fixed. To upgrade just reupload the files.

----------------------------------------------------------------

This is a series of four adminstration scripts covering two functions. They are:
Attachment Management
--Find and view attachments with ease, remove with two clicks
--Remove multiple attachments by forum, extension, and other options
Conversion/Encryption Functions
--Converts to and from Unix Timestamp format, which is used by vBulletin in the database
--Encrypt a text string with md5 - useful for comparing a string to an encrypted password in the database

Screenshots

For version: 2.0.3 and above

Files needed: rematt.php, browseatt.php, convert.php, viewatt.php

Files to edit: admin/index.php

Instructions are in the zip file - look for att.txt

DO NOT PM or email me about this hack - it will be ignored!

I will not support you if you edit these files.

You may not redistribute these scripts, edited or unedited, without my prior permission.

Disclaimer: I disclaim all responsibility for your use of this hack. It has been extensively tested but still may screw something up. It is recommended that if you are going to be deleting a lot of attachments you have a recent database backup on hand.

moonfish 07-26-2001 02:40 AM

Then find
Code:

<a href="misc.php?s=<?php echo $session[sessionhash]; ?>"> Update counters... </a>
And right below it, add
Code:

<a href="misc.php?s=<?php echo $session[sessionhash]; ?>"> Update counters... </a><br>

may i ask the point of this is... surely you made a mistake... isn't it just the same thing...??

tubedogg 07-26-2001 02:43 AM

*Doh* Sorry yeah. I'll update the instructions above.

VirtueTech 07-26-2001 03:53 AM

Great job Tubedogg!!!

This will be very helpful :)

Martz 07-26-2001 10:22 AM

Nice work :)

janw 07-26-2001 11:17 AM

Great Hack, as usual :rolleyes:

floleb7 08-05-2001 08:28 AM

delete attachement doesn't work

tubedogg 08-05-2001 08:08 PM

Um...yeah it does...? :confused:

floleb7 08-07-2001 11:48 AM

not for me everything work but when i click on delete the attachment is still there

Fryzid 08-07-2001 05:43 PM

In rematt.php
Code:

$DB_site->query("UPDATE post SET attachment=0 WHERE postid='$postid'");
should be
Code:

$DB_site->query("UPDATE post SET attachmentid=0 WHERE postid='$postid'");
Don't know why noone else discovored this.

JJR512 08-07-2001 10:11 PM

Is this fully compatible with 2.0.3, or does it need new instructions, or what?

dwh 08-08-2001 03:08 AM

Cool hack, now if you could add an optimizer that optimizes all pics with 100% no lossy compressions that would be the end of the world. Are there any functions for this?

eva2000 08-16-2001 08:53 AM

can this hack be modified to display a gallery like page (similar to the admin view of smilies/avatars) for attachments specific to a forum?

i.e.

gallery.php?s=&forumid=1

?

Nicholas Brown 08-16-2001 10:38 PM

Quote:

Originally posted by Fryzid
In rematt.php
Code:

$DB_site->query("UPDATE post SET attachment=0 WHERE postid='$postid'");
should be
Code:

$DB_site->query("UPDATE post SET attachmentid=0 WHERE postid='$postid'");
Don't know why noone else discovored this.

Actually, correct me if Im wrong but setting the attachementid=0 wouldnt remove the attached file, it would just set its id to 0.

Fryzid 08-17-2001 07:04 AM

Quote:

Originally posted by Nicholas Brown


Actually, correct me if Im wrong but setting the attachementid=0 wouldnt remove the attached file, it would just set its id to 0.

Try to find a field called attachment in the post table. It does not exist.
Threads with no attachment have set the attachmentid to 0.
The actual delete is done in the line above
Code:

$DB_site->query("DELETE FROM attachment WHERE attachmentid='$attachmentid'");
Another thing I found is that the attachment count is not reduced when you delete an attachment.

ethank 08-18-2001 03:06 AM

Tubedog

How difficult would it be to add an option to save attachments to the file system on the server?

Ethan

ethank 08-18-2001 08:18 PM

To answer my own question:

Not too difficult at all!

I hacked in code that allows me to search for threads with attachments in a certain folder, then save all attachments with extension X to the file system, in a directory like this THREADID_threadttitle

Works like a charm. I extracted 2 gigs of MP3s out of the database. The next step is to redo it so it also creates an index file with the contents of the posts.

EThan

tubedogg 08-18-2001 09:18 PM

Quote:

Another thing I found is that the attachment count is not reduced when you delete an attachment.
Fixed.

Quote:

Code:

$DB_site->query("UPDATE post SET attachment=0 WHERE postid='$postid'");
should be
Code:

$DB_site->query("UPDATE post SET attachmentid=0 WHERE postid='$postid'");

Fixed.

Quote:

does it need new instructions [for 2.0.3]
No.

Sarge 08-23-2001 01:25 PM

Fatal error: Call to undefined function: getrowbg() in /home/dlrarmy/public_html/forums/admin/browseatt.php on line 25

This script does not work for me

When I search for attachments by user or by forums it just gives me the above error message.

Whats up with that?
I did it exactly like in the instructions!

tubedogg 08-23-2001 05:42 PM

You'll need to upgrade to 2.0.3 to run it...plus 2.0.3 has an important security fix.

Sarge 08-23-2001 06:39 PM

I would prefer not to upgrade.
Any chances on this working on 2.0?
Thanks in advance

tubedogg 08-23-2001 06:52 PM

Chris trust me you want to upgrade. You don't want to be running 2.0 when the details of the security hole are released.

Mike Gaidin 08-23-2001 11:37 PM

I'm getting the same error as Sarge. I'm not comfortable upgrading though. I don't feel comfortable enough to back up my data and upgrade. I'm afraid something will go wrong and I won't be able to get it working. I know nothing of php or mysql. I tried adding the session.php file and it wouldn't let anyone but me log on. I would really like this admin mod of yours to work though. Can it be modified for 2.0.1?

SirSteve 08-25-2001 05:59 PM

I am using 2.0.3 and the Delete function is not working. ?? No errors are shown, it just goes to a blank screen. No message at all.

tubedogg 08-25-2001 07:27 PM

Are you using mass-delete or the "remove" link next to each attachment?

SirSteve 08-25-2001 07:30 PM

Quote:

Originally posted by tubedogg
Are you using mass-delete or the "remove" link next to each attachment?
The Remove link next to each attachment.

tubedogg 08-25-2001 08:24 PM

-- fixed --

SirSteve 08-25-2001 08:31 PM

Quote:

Originally posted by tubedogg
SirSteve try download the zip file attached to this message and upload the files to your site and try again. This time (if it's what I think it is) you'll get a message telling you what's wrong.
Ok, done. I got this error message:
Your session hash doesn't match the one in the database. Try logging in again.

I logged out and back in again and it worked! Thanks!
I just hope I don't have to do that often. ;)

tubedogg 08-25-2001 08:57 PM

I don't know what caused that. It shouldn't have happened...but I've added error-checking to make sure that if it does happen again you won't just get a blank screen.

SirSteve 08-26-2001 01:30 AM

Great hack!

Mike Gaidin 09-08-2001 08:48 PM

Finally upgraded to 2.0.3. :D

Great hack tubedogg!!

squawell 09-11-2001 01:57 PM

what is this hack to do??somebody tell me~~

have any picture??

SirSteve 11-10-2001 09:11 PM

Can you upgrade this to work on vb 2.2.0 ?

Thanks.

FWC 11-10-2001 09:39 PM

Quote:

Originally posted by SirSteve
Can you upgrade this to work on vb 2.2.0 ?

Thanks.

It works with 2.2.0. Just add:

makenavoption("Browse","browseatt.php?action=intro ","<br>");
makenavoption("Delete","rematt.php?action=intro");
makenavselect("Attachments");

wherever you want it to appear in admin/index.php.

SirSteve 11-10-2001 10:13 PM

Gracias!

FWC 11-11-2001 12:21 AM

Quote:

Originally posted by SirSteve
Gracias!
Glad to help. It's a great hack. :)

MApI 11-25-2001 05:24 PM

:D
Work great with 2.21 too. Thx !!!

cya

|DarkManX| 11-25-2001 07:24 PM

awesome

here are updated install instructions for 2.2

i'm not taking credit, just putting it all in one place for everyone :)

tubedogg 12-03-2001 03:09 AM

I've updated the hack with instructions for v2.2 and above and with a new function for encrypting strings with md5.

See the first post for instructions.

eva2000 12-03-2001 03:11 AM

Quote:

Originally posted by tubedogg
I've updated the hack with instructions for v2.2 and above and with a new function for encrypting strings with md5.

See the first post for instructions.

:cool: x 2 :D


All times are GMT. The time now is 04: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.03099 seconds
  • Memory Usage 1,816KB
  • 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
  • (9)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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