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)
-   -   vbThreadSpinner (https://vborg.vbsupport.ru/showthread.php?t=20512)

Mas*Mind 06-16-2001 10:00 PM

UPDATE 18/7 22:23 (Dutch Time)

Changelog:

deleted some unnecesary htmlspecialchars() and htmlentities()-calls

Fixed the problem that you couldn't move to a forum in which no threads can be posted.

Only re-upload spinner.php (newly attached) and you're done


Description: This hack allows mods/admins to selectively delete/open/close/move/copy/movewredirect threads in a certain forum at once!

VBversions: tested with 2.01 but will probably work on all versions

Features: Certain features are only shown when the particular mod has the rights for it. EG: When a mod can't close threads the 'close' option won't be shown.

Screenshots:

hidden admin option:
http://feyenoord.messagebase.nl/vbhacks/adminoption.gif

opening screen:
http://feyenoord.messagebase.nl/vbhacks/spinner1.gif

threadlist:
http://feyenoord.messagebase.nl/vbhacks/spinner2.gif

nextpage:
http://feyenoord.messagebase.nl/vbhacks/spinner3.gif

are you sure? screen:
http://feyenoord.messagebase.nl/vbhacks/spinner4.gif

confirmation screen:
http://feyenoord.messagebase.nl/vbhacks/spinner5.gif

instructions:
  1. Download the attached spinner.txt
  2. Rename it to spinner.php or spinner.php3
  3. Upload it to your mod directory
  4. Backup moderator.php in your root directory
  5. Open moderator.php
  6. Insert:

    PHP Code:

    if ($action=="spinthreads") {

      
    $permissions=getpermissions();
      if (
    $permissions[ismoderator]) {
        
    header("Location: mod/index.php?s=$session[sessionhash]&loc=spinner.php?s=$session[sessionhash]%26parentid=$forumid");
      } else {
        
    show_nopermission();
      }



    after:

    PHP Code:

    if ($action=="modattach") {

      
    $permissions=getpermissions();
      if (
    $permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canmoderateattachments=1")) {
        
    header("Location: mod/index.php?s=$session[sessionhash]&loc=moderate.php?s=$session[sessionhash]%26action=attachments");
      } else {
        
    show_nopermission();
      }



    Note: If you've renamed spinner.txt to spinner.php3 then you have to change

    header("Location: mod/index.php?s=$session[sessionhash]&loc=spinner.php?s=$session[sessionhash]%26parentid=$forumid");

    to

    header("Location: mod/index.php?s=$session[sessionhash]&loc=spinner.php3?s=$session[sessionhash]%26parentid=$forumid");

    in the above section
  7. Save moderator.php
  8. Edit your forumdisplay_adminoptions template (forumdisplay templates)

    and add a new option:

    <option value="spinthreads">Spin Threads</option>

    so it probably will look something like this:

    Quote:

    <table cellpadding="0" cellspacing="0" border="0">
    <form action="moderator.php" method="get"><tr><td>
    <smallfont>
    <input type="hidden" name="s" value="$session[sessionhash]">
    <input type="hidden" name="forumid" value="$forumid">
    <b>Admin Options:</b><br>
    <select name="action"
    onchange="window.location=('moderator.php?s=$sessi on[sessionhash]&forumid=$forumid&action='+this.options[this.selectedIndex].value)">
    <option value="modposts" selected>-- Forum Options --</option>
    <option value="modposts">View Posts Queue</option>
    <option value="modattach">View Attachment Queue</option>
    <option value="move">Mass Move</option>
    <option value="prune">Mass Prune</option>
    <option value="spinthreads">Spin Threads</option>
    </select>
    <input type="image" src="images/go.gif" border="0" align="absbottom">
    </smallfont>
    </td></tr></form>
    </table>

That's it! Enjoy :)

eva2000 06-17-2001 12:42 PM

woah power users GO! :D

MrLister 06-17-2001 01:43 PM

Excellent Job! This hack is awsome!

MHR 06-17-2001 03:19 PM

awesome!;)

Prezident 06-17-2001 03:29 PM

Wow, that is one of the easiest hacks I have ever installed.

Thanks.

the_sisko 06-17-2001 03:44 PM

Nice one, works perfect!
I've uploaded it to admin root and change the redirect to it. To get it work, you need to copy the:
// ###################### Start makemodchoosercode #######################

of your mod/global.php to your admin/global.php

Thx a lot!

h4p3 06-17-2001 04:12 PM

Yep, nice addon Mas*Mind!

dicetomato 06-17-2001 06:46 PM

wow, nice hack!

tubedogg 06-18-2001 04:04 AM

Looks great! :) Just one minor suggestion - make "do nothing" the default selected if it isn't (I haven't tried it yet, sorry :o).

Mas*Mind 06-18-2001 08:00 AM

Quote:

Originally posted by tubedogg
Looks great! :) Just one minor suggestion - make "do nothing" the default selected if it isn't (I haven't tried it yet, sorry :o).
it is :)

JamesUS 06-18-2001 02:27 PM

I will definitely be installing this! Well done.

Mas*Mind 06-18-2001 07:29 PM

update (see first post)

only re-upload the newly attached spinner.php and you're done

Rare 06-24-2001 01:40 AM

push, push, push!!! best of the best.

how-to request: please show us how to make the option only available for admin?

Prezident 06-26-2001 01:31 PM

I have another feature to request with this already awesome hack which would make it even more usefull.

Can you add an option to merge threads, maybe with a dropdown list of thread subjects that it can be merged with?

I don't know how hard that would be, or if it is possible, but I think it would be a great feature.

Let me know if you would like a more detailed explanation.

Thanks.

Prezident 06-30-2001 02:07 PM

BUMP

J Wahl 07-09-2001 11:08 PM

Quote:

Originally posted by The_Sisko
Nice one, works perfect!
I've uploaded it to admin root and change the redirect to it. To get it work, you need to copy the:
// ###################### Start makemodchoosercode #######################

of your mod/global.php to your admin/global.php


Thx a lot!

What exactly did you change?

Can please someone explain a little better?

Thank you.

DarkReaper 07-16-2001 12:54 AM

Nice Job! That's going to save tons of time! :D

MasterMind 07-16-2001 03:00 AM

Thanks for this my loyal clone. ;)

Nice work!

fury 07-27-2001 10:42 PM

Awesome hack!

One question: Does this do a check to make sure the moderator has access to the forum they are trying to do Spin Threads in?

FWC 07-28-2001 02:20 AM

Mas*Mind,

Great job! What an easy to install, useful hack.

Axel Foley 07-31-2001 04:37 PM

When I take some actions using this awesome script, the ModLogActivities hack won't log them. If I use the standard procedure (using vB standard actions) to delete, close threads actions DO get logged by ModLog hack.

I haven't had the chance to take a look at the code Mas*Mind, and I wondered if you simply call vB functions or does the hack actually make the modifications itself (that would explain why ModLog hack doesn't "trap" the actions).

Thanks for you're work Mas*Mind, you made a great hack! ;)


...Axel

WhiteKnight 01-26-2002 01:54 AM

Long time passed, but it's still a great hack.

I installed it on 2.2.1 and it works fine for admins and supermods. But it gives me some problems with moderators, because they cannot access the spinner via Admin Options. I guess it's in the permissions, rather than the hack, but I haven't had the time yet to test it thoroughly. Maybe someone could point me to the right direction.

One more thing: how can I add a link to the spinner in the admin/mod cp?

DelusionalMind 01-26-2002 02:13 AM

nice :)

just installed it. hehe

mister 02-15-2002 02:33 PM

real nice hack.... cant wait to use it

Arathorn 02-17-2002 03:57 PM

Quote:

Originally posted by WhiteKnight
How can I add a link to the spinner in the admin/mod cp?
makenavoption("Spin Threads","spinner.php?action=spinthreads");

Tarion 02-27-2002 02:14 PM

Quote:

Originally posted by WhiteKnight
Long time passed, but it's still a great hack.

I installed it on 2.2.1 and it works fine for admins and supermods. But it gives me some problems with moderators, because they cannot access the spinner via Admin Options. I guess it's in the permissions, rather than the hack, but I haven't had the time yet to test it thoroughly. Maybe someone could point me to the right direction.

One more thing: how can I add a link to the spinner in the admin/mod cp?

i got it work for my mods in 2.2.1 with this modification:

in root/moderator.php search for:

PHP Code:

if ($action=="spinthreads") {

 
$permissions=getpermissions();
  if (
$permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canmoderateattachments=1")) {
    
header("Location: mod/index.php?s=$session[sessionhash]&loc=moderate.php?s=$session[sessionhash]%26action=attachments");
  } else {
    
show_nopermission();
  }



and replace it with this code:

PHP Code:

if ($action=="spinthreads") {

  
$permissions=getpermissions();
  if (
$permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canmoderateattachments=1")) {
    
header("Location: mod/index.php?s=$session[sessionhash]&loc=spinner.php?s=$session[sessionhash]%26parentid=$forumid");
  } else {
    
show_nopermission();
  }



It worked for my mods smoothly. I hope this helps you :)

WhiteKnight 03-07-2002 04:07 PM

Yes it does...thank you :)

v0nreagan 04-14-2002 01:19 PM

Would it be possible to add search to the spinner? Basicaly you would search for a pattern in subjest and spin only those posts?

scsa20 04-21-2002 08:31 AM

Quote:

Originally posted by Arathorn


makenavoption("Spin Threads","spinner.php?action=spinthreads");

hmm...might be a little late for this, but I just like to add something to that....if you are going to use that in the admin cp, all you have to do is put in the following instead of the above:

Code:

makenavoption("Spin Threads","../mod/spinner.php?action=spinthreads");
put that somewhere in your admin/index.php file (along with the other links), and it'll just go into the mod folder to get the file (along with any other thing it needs).....if you want to know a good place (well..I didn't really put it in a good place, but it's a good place)...here's what you do:

In admin/index.php, search for:

PHP Code:

makenavoption("Who Voted?","thread.php?action=votes"); 

and replace it with:

PHP Code:

makenavoption("Who Voted?","thread.php?action=votes","<br>");
makenavoption("Spin Threads","../mod/spinner.php?action=spinthreads"); 

well...that's were I put mine...good luck for whoever needed this type of info

BenH 04-27-2002 08:05 AM

Great Hack !
just the one im looking for , but will it work on 2.2.5 ?
i dont know to do any changes

thank you
ben

Keta 06-26-2002 06:47 AM

does this work for 2.2.6?

Chris M 06-26-2002 08:54 AM

Dunno...

Im testing it in a second or two!:)

BTW : Great Hack:)!

Satan

Chris M 06-26-2002 09:31 AM

I have 2 screenshots to share...

The Good news : The screenshot below proves it works:)

The Bad news : It will only appear in the CP, as for some strange reason, it doesnt in the "admin options"...

Satan

Chris M 06-26-2002 09:33 AM

:(

Satan

FWC 06-27-2002 06:04 AM

Quote:

Originally posted by hellsatan
The Bad news : It will only appear in the CP, as for some strange reason, it doesnt in the "admin options"...

Did you add the necessary code to forumdisplay_adminoptions? It works on my 2.2.6 board.

Boofo 08-02-2002 07:28 AM

I did this but after I have moved a forum, and click on the link of the forum in the spin threads box that verifies that, it gives me a page not found error. Any ideas on this one?

EDIT: Attached is a picture of what I am talking about. Look in the lower left habd corner at the Status Bar. That is what shows up when I hightlight the forum name that the thread was moved to (Graphics design). It shows the forum/mod dir instead of just the forum dir.

And is there any way to have this just for the Admin and not mods if I want it there?

Quote:

Originally posted by scsa20


hmm...might be a little late for this, but I just like to add something to that....if you are going to use that in the admin cp, all you have to do is put in the following instead of the above:

Code:

makenavoption("Spin Threads","../mod/spinner.php?action=spinthreads");
put that somewhere in your admin/index.php file (along with the other links), and it'll just go into the mod folder to get the file (along with any other thing it needs).....if you want to know a good place (well..I didn't really put it in a good place, but it's a good place)...here's what you do:

In admin/index.php, search for:

PHP Code:

makenavoption("Who Voted?","thread.php?action=votes"); 

and replace it with:

PHP Code:

makenavoption("Who Voted?","thread.php?action=votes","<br>");
makenavoption("Spin Threads","../mod/spinner.php?action=spinthreads"); 

well...that's were I put mine...good luck for whoever needed this type of info


Link14716 08-02-2002 04:25 PM

I could probably fix that..... hold on. (I want to insdtall it too!)

Link14716 08-02-2002 04:32 PM

hellsatan: it only apears in the FORUM dropdown, not the thread dropdown.

Boofo: open up spinner.php.

change both instances of:
Code:

a href='forumid=$moveTo[$threadID]' target='_blank'
to
Code:

a href='../forumdisplay.php?forumid=$moveTo[$threadID]' target='_blank'
Not tested, but it should work ;)

Boofo 08-05-2002 12:03 PM

That fixed it. Thanks! :)

JohnWoo 09-19-2002 10:42 AM

Great huck.... You safe me...


All times are GMT. The time now is 04:50 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.01583 seconds
  • Memory Usage 1,854KB
  • 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
  • (4)bbcode_code_printable
  • (8)bbcode_php_printable
  • (8)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