Announcement

Collapse
No announcement yet.

[Release v2] Admin Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Release v2] Admin Functions

    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
    Date/Time conversion
    --Converts to and from Unix Timestamp format, which is used by vBulletin in the database

    Screenshots

    For version: 2.0.3

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

    Files to edit: admin/index.php

    Instructions:
    1) Upload browseatt.php, viewatt.php, convert.php, and rematt.php to your admin directory.

    2) Open up admin/index.php in a text editor and find
    Code:
    <a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=move"> Move </a>
    </td></tr>
    Right below it, add
    Code:
    <tr><td>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
    <?php maketableheader("Attachments"); ?>
    </table>
    <a href="browseatt.php?s=<?php echo $session[sessionhash]; ?>&action=intro"> Browse </a> |
    <a href="rematt.php?s=<?php echo $session[sessionhash]; ?>&action=intro"> Delete </a>
    </td></tr>
    Then find
    Code:
    <a href="misc.php?s=<?php echo $session[sessionhash]; ?>"> Update counters... </a>
    And replace it with
    Code:
    <a href="misc.php?s=<?php echo $session[sessionhash]; ?>"> Update counters... </a><br>
    <a href="convert.php?s=<?php echo $session[sessionhash]; ?>&action=intro"> Convert Date/Time </a>
    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.
    Last edited by tubedogg; Sat 25th Aug '01, 1:58pm.

  • #2
    Re: [Release v2] Admin Functions

    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...??

    Comment


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

      Comment


      • #4
        Great job Tubedogg!!!

        This will be very helpful
        PaintballCity.com
        VB Board of the Month: October

        Comment


        • #5
          Nice work
          HP DL-380 G6, 2x E5520, 28GB RAM, 4x300GB SAS, VMWare ESXi
          -
          Unreal Tournament : Assault forums - irc://irc.utassault.net:6667 -

          Comment


          • #6
            Great Hack, as usual

            Comment


            • #7
              delete attachement doesn't work

              Comment


              • #8
                Um...yeah it does...?

                Comment


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

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      Is this fully compatible with 2.0.3, or does it need new instructions, or what?
                      -Justin "JJR512" Rebbert
                      JJR512.com: Chat about anything!

                      Comment


                      • #12
                        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?

                        Comment


                        • #13
                          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

                          ?
                          :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                          :: Nginx SPDY SSL - World Flags Demo [video results]
                          :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                          Comment


                          • #14
                            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.

                            Comment


                            • #15
                              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.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X