PDA

View Full Version : vbThreadSpinner


Mas*Mind
17 Jun 2001, 13:40
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:


Download the attached spinner.txt
Rename it to spinner.php or spinner.php3
Upload it to your mod directory
Backup moderator.php in your root directory
Open moderator.php
Insert:

if ($action=="spinthreads") {

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

}

after:

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

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

in the above section

Save moderator.php
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:

<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=$session[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
17 Jun 2001, 13:42
woah power users GO! :D

MrLister
17 Jun 2001, 14:43
Excellent Job! This hack is awsome!

MHR
17 Jun 2001, 16:19
awesome!;)

Prezident
17 Jun 2001, 16:29
Wow, that is one of the easiest hacks I have ever installed.

Thanks.

the_sisko
17 Jun 2001, 16:44
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
17 Jun 2001, 17:12
Yep, nice addon Mas*Mind!

dicetomato
17 Jun 2001, 19:46
wow, nice hack!

tubedogg
18 Jun 2001, 05:04
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
18 Jun 2001, 09:00
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
18 Jun 2001, 15:27
I will definitely be installing this! Well done.

Mas*Mind
18 Jun 2001, 20:29
update (see first post)

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

Rare
24 Jun 2001, 02:40
push, push, push!!! best of the best.

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

Prezident
26 Jun 2001, 14:31
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
30 Jun 2001, 15:07
BUMP

J Wahl
10 Jul 2001, 00:08
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
16 Jul 2001, 01:54
Nice Job! That's going to save tons of time! :D

MasterMind
16 Jul 2001, 04:00
Thanks for this my loyal clone. ;)

Nice work!

fury
27 Jul 2001, 23:42
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
28 Jul 2001, 03:20
Mas*Mind,

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

Axel Foley
31 Jul 2001, 17:37
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
26 Jan 2002, 02:54
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
26 Jan 2002, 03:13
nice :)

just installed it. hehe

mister
15 Feb 2002, 15:33
real nice hack.... cant wait to use it

Arathorn
17 Feb 2002, 16:57
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
27 Feb 2002, 15:14
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:


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:


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
07 Mar 2002, 17:07
Yes it does...thank you :)

v0nreagan
14 Apr 2002, 14:19
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
21 Apr 2002, 09:31
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:


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:


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


and replace it with:


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
27 Apr 2002, 09:05
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
26 Jun 2002, 07:47
does this work for 2.2.6?

Chris M
26 Jun 2002, 09:54
Dunno...

Im testing it in a second or two!:)

BTW : Great Hack:)!

Satan

Chris M
26 Jun 2002, 10:31
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
26 Jun 2002, 10:33
:(

Satan

FWC
27 Jun 2002, 07:04
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
02 Aug 2002, 08:28
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?

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:


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:


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


and replace it with:


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
02 Aug 2002, 17:25
I could probably fix that..... hold on. (I want to insdtall it too!)

Link14716
02 Aug 2002, 17:32
hellsatan: it only apears in the FORUM dropdown, not the thread dropdown.

Boofo: open up spinner.php.

change both instances of:
a href='forumid=$moveTo[$threadID]' target='_blank'
to
a href='../forumdisplay.php?forumid=$moveTo[$threadID]' target='_blank'

Not tested, but it should work ;)

Boofo
05 Aug 2002, 13:03
That fixed it. Thanks! :)

JohnWoo
19 Sep 2002, 11:42
Great huck.... You safe me...

Jeff Williams
16 Jan 2003, 08:50
I am running version 2.2.6 of vBulletin. However, when I am inside the specific forum I want to organize (I added subforums and I am just shuffling threads around), I cannot seem to find that pesky moderator options pull down. What the heck am I doing wrong?

I sure hope I can figure out how to make this work, otherwise getting this board revised is going to be a never ending project.

Also, I didn't quite follow an earlier post about accessing spinner via the Admin CP. If I could do this, it would be excellent. I see where you showed what code to add, but I am not sure to which file or template the addition should be made.

Sorry if I sound like an idiot. Generally speaking - when it comes to coding, that's exactly what I am.

http://www.northwestdiver.com/forums

Jeff Williams
16 Jan 2003, 19:21
A follow-up question. Is this a hack of a hack? I mean, is there normally a "Moderator Options" pull down available at the forum level? I have contacted a couple other friends who are running vBulletin, and they are having similar issues...

They can't find the menu either! :confused:

Link14716
31 Jan 2003, 01:01
There is not a moderator options pulldown, there is an Admin Options pulldown. Yes, that is standard to vBulletin. :)

Jeff Williams
02 Feb 2003, 03:18
OK... I am still not seeing an "admin options" pulldown.

Austin Dea
20 May 2003, 15:49
It works perfectly on 2.3.0 with scsa20's and Link's modifications. I didn't use the moderator additions (which may be where the problems are), because I wanted only the admins to be able to do it =P

Intex
20 May 2003, 20:32
Installed, works great. Good job :).

tpearl5
16 Aug 2003, 04:11
Wow.. this was hidden.. glad I found it. VERY useful for dividing up forums and putting threads in new forums!

subu1
01 Sep 2003, 21:05
hi Friends, i have the Version 2.2.8 but i dont can find this in my Moderator.php

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();
}

}

need help plaese

Zachery
02 Sep 2003, 12:25
this hack was made for 2.0.1 the code has most likly changes since then :\

subu1
02 Sep 2003, 13:10
ok, but sorry where can i put it in

this 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();
}

}

sorry for my bad english

tpearl5
06 Jan 2004, 21:51
I can't believe this hack hasn't been used more. It's so useful! I'm using it again on another one of my boards. :)

pdatoon
17 Jan 2004, 16:36
It is compatible with 2.3.0 ?

tpearl5
17 Jan 2004, 17:08
It is compatible with 2.3.0 ?

Yep.

MrNase
02 Mar 2004, 11:01
/me clicks install :)


this should be in 3.1 :)

SID297
05 Feb 2005, 05:53
Is there any chance this will work in VB3?

ViewMy.biz
04 Feb 2007, 15:51
Any chance of this great idea being resurrected for 3.6x

I have forums dedicated to specific towns in my area and instead of entering the complete data for each town over and over and over again it would be a huge help if I were able to copy the threads and tweak the information as it applies.

Any method of making this happen? . . . again :)