[Release v2] Bump without Post (Any Authorized User Version)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tubedogg
    Senior Member
    • Feb 2001
    • 13602

    [Release v2] Bump without Post (Any Authorized User Version)

    LAST UPDATED 3.31.01 12:45 AM Eastern

    Updated to version 0.0.2
    New features in 0.0.2: Floodcheck. You can set it so that your users cannot bump any particular thread more than once every X hours. It records the time it was last bumped in a new field in the Thread table.

    This hack allows your users to bump a thread without posting in it. This is different from making a thread sticky in two ways: First, this will not append the thread title with "Sticky", and second, the thread will only be at the top of the thread list until another post is made, at which point it becomes second, so this is somewhat temporary (moreso on larger boards).

    This version will allow any authorized user to bump a thread. You can authorize in four different ways: First, any user who posted in a thread. Second, the poster of the first post in a thread. Third, the poster of the last post in a thread. And fourth, any registered (and logged in) user. You can set this in the options, as detailed below in the instructions.

    This hack is based on the canedit permission and requires that you allow your users to edit their own messages. If you don't, this hack *will not* work. If you are looking for a bump hack for just your moderators, I have released a separate version here that does just that.

    There is no demo or screenshot, but trust me it works and looks lovely.

    This hack includes a button in GIF format that says "Bump" that is made to blend with the rest of the standard purple buttons. It can be edited in any photo- or graphics-editing program to be made a different color, or you can substitute your own file for it.

    Hack Version: 0.0.2

    New features since last version: See above.

    For version: v2 beta 3 (may work with beta 1 or beta 2, but it is untested with those versions).

    Files needed: postingsadd.txt, redirect_bump_notfirst_template.txt, redirect_bump_notlast_template.txt, redirect_bump_template.txt, redirect_bump_floodcheck.txt, showthread_bump_template.txt (see attached zip file).

    Files to edit: postings.php, postingsadd.txt, showthread.php (see instructions below).

    Templates to edit/create: showthread, showthread_bump, redirect_bump_notfirst, redirect_bump_notlast, redirect_bump, redirect_bump_floodcheck (see instructions below).

    Instructions
    1] Unzip the files bumpbig.gif, posttingsadd.txt, showthread_bump_template.txt, redirect_bump_template, redirect_bump_floodcheck, and redirect_bump_notfirst_template to your hard drive.
    2] Open the file postingsadd.txt in an ASCII text editor, such as Notepad (Windows), SimpleText (Mac), EditPlus, UltraEdit, TextPad, etc. (DO NOT use WYSIWYG HTML editors such as FrontPage, HotDog, DreamWeaver, etc. They will in all likelyhood screw up the file! I will not be able to support you if you edit the file in one of these programs.)
    3] If you want anyone to be able to bump a thread, set $postersonly to 0 (on the third line). Otherwise set it to 1. If you have $postersonly set to 1, and you want only the last poster in a thread to be able to bump it, set $lastposter to 1, otherwise set it to 0. If you have $postersonly and $lastposter both set to 0 and would like only the first poster (aka thread starter) to be able to bump the thread, set $firstonly to 1, otherwise set it to 0. If you set all three options to 0, anyone (who is logged in) will be able to bump the thread.
    If you want to limit the bumping of all threads to once every X hours, set $hours to the number you want. It must be a whole number and more than -1 (e.g. 2, 5, 8, 12). If you don't want to use this, set $hours to 0.
    4] Save postingsadd.txt and then open postings.php. Add the contents of postingsadd.txt to postings.php right below
    PHP Code:
    require("./global.php"); 
    5] Save postings.php. Open showthread.php. Find
    PHP Code:
    // REMOVED FROM PRECACHING: error_invalidid,error_nopermission, 
    and right *above* it, add
    PHP Code:
    $templatesused .= ",showthread_bump"
    Then find
    Code:
     eval("\$forumrules = \"".gettemplate("forumrules")."\";");
    and right above that, add
    Code:
     eval("\$bump = \"".gettemplate("showthread_bump")."\";");
    6] Save showthread.php. Upload postings.php and showthread.php to your main forums directory, and upload bumpbig.gif to your /images directory inside the main forums directory.
    7] Go to your admin control panel. Add a new template called showthread_bump and fill it with the contents of showthread_bump_template.txt. Add another new template called redirect_bump and fill it with the contents of the redirect_bump_template.txt file. Add another new template called redirect_bump_notfirst and fill it with the contents of the redirect_bump_notfirst_template.txt file. Add another new template called redirect_bump_notlast and fill it with the contents of redirect_bump_notlast_template.txt.
    8] Edit the showthread template as follows. Find
    Code:
    <td valign="middle"><A HREF="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]">
    and replace it with
    Code:
    <td valign="middle">$bump<A HREF="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]">
    There are two instances of this in the showthread template. Change both.
    9] Test it out!

    Instructions are also included in the zip file (bump.txt).

    FEEDBACK WANTED! Likes/dislikes/modification requests all gladly accepted.
    Last edited by tubedogg; Fri 30 Mar '01, 8:52pm.
  • VirtueTech
    Senior Member
    • Jun 2000
    • 561

    #2
    Hello,

    First off thanks for all your work you've done.

    Second..I'm very tempted to use this hack but I'm a little weary of the outcome. Will users take advantage of this feature?

    I think it should have its own floodcheck...then I would defnitely use it. BAsically only allowing a user to "BUMP" the thread maybe twice a day or once a day.

    Do you think oyu could code that into it. The current floodcheck of 30 seconds is WAY too little for this feature. I have a Forsale Forum where the first post on that page is on page 2 in less than an hour. So many users would take too much advantage of this feature without a longer floodcheck.

    Let me know what you think.
    PaintballCity.com
    VB Board of the Month: October

    Comment

    • bombout
      Member
      • Feb 2001
      • 31

      #3
      possibly build a "limit" array, so you can choose which boards do not allow the bump feature?

      Then you could stop people using it on a "for sale" forum quite easily.

      Comment

      • tubedogg
        Senior Member
        • Feb 2001
        • 13602

        #4
        v0.0.2 Released

        I have released a new version of this hack, with a floodcheck function. You can set the floodcheck to any number of hours you wish, from 1 to infinite. It is a board-wide setting.

        Enjoy!

        Comment

        • VirtueTech
          Senior Member
          • Jun 2000
          • 561

          #5
          Tubedogg....is there any way to set it up for the following:
          PaintballCity.com
          VB Board of the Month: October

          Comment

          • LuBi
            Senior Member
            • Jun 2001
            • 245
            • 3.7.x

            #6
            How do I get this hack to work with 2.0.3?
            http://www.tchracing.com/forums/live...h_live_sig.jpg

            Comment

            • LuBi
              Senior Member
              • Jun 2001
              • 245
              • 3.7.x

              #7
              Having trouble with this one, I'm on 2.0.3

              Save postings.php. Open showthread.php. Find

              PHP:--------------------------------------------------------------------------------
              // REMOVED FROM PRECACHING: error_invalidid,error_nopermission,--------------------------------------------------------------------------------

              and right *above* it, add

              PHP:--------------------------------------------------------------------------------
              $templatesused .= ",showthread_bump";
              http://www.tchracing.com/forums/live...h_live_sig.jpg

              Comment

              • LuBi
                Senior Member
                • Jun 2001
                • 245
                • 3.7.x

                #8
                I'm in the middle of the install if anyone could please help me.
                http://www.tchracing.com/forums/live...h_live_sig.jpg

                Comment

                • LuBi
                  Senior Member
                  • Jun 2001
                  • 245
                  • 3.7.x

                  #9
                  Someone please, I need to get back to editing and customizing. I'm in the middle of this install and now that I'm stuck I can't move on to any other hacks or operate my forum.
                  http://www.tchracing.com/forums/live...h_live_sig.jpg

                  Comment

                  • BradC
                    Senior Member
                    • May 2001
                    • 510

                    #10
                    what are you having problems with?

                    $templatesused .= ",showthread_bump";

                    take that

                    and take at the ","..

                    $templatesused .= "showthread_bump";

                    Comment

                    • LuBi
                      Senior Member
                      • Jun 2001
                      • 245
                      • 3.7.x

                      #11
                      Well I use 2.0.3 and I cannot find

                      // REMOVED FROM PRECACHING: error_invalidid,error_nopermission

                      in showthread.php, I really just need this hack to work with 2.0.3 but I doubt it will. It's such a powerful feature I would love to have it on my forum.
                      http://www.tchracing.com/forums/live...h_live_sig.jpg

                      Comment

                      • Bane
                        Senior Member
                        • Jul 2000
                        • 515

                        #12
                        I haven't installed this hack... but try putting that just before this in the showthread.php

                        PHP Code:
                        require('./global.php');

                        // oldest first or newest first 

                        Comment

                        • LuBi
                          Senior Member
                          • Jun 2001
                          • 245
                          • 3.7.x

                          #13
                          Well I've customized this a little don't know how to install it the instructions are wrong for 2.0.3 so to answer my own question no it does not work with 2.0.3 below is my error

                          There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

                          An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

                          We apologise for any inconvenience.


                          Database error in vBulletin: Invalid SQL: SELECT lastbumptime FROM thread WHERE threadid='4'
                          mysql error: Unknown column 'lastbumptime' in 'field list'
                          mysql error number: 1054
                          Date: Thursday 30th of August 2001 12:29:18 PM
                          Script: /forums/postings.php?action=userbump&threadid=4&userid=1
                          Referer: http://www.suprascene.com/forums/sho...php?threadid=4

                          So if you guys need me to send files or something juts ask I would love to get this code to work. Also is a link to the thread where i tested it to see the results.

                          http://www.tchracing.com/forums/live...h_live_sig.jpg

                          Comment

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