Log in

View Full Version : Inline Moderation Tools (v1.2.1)


Pages : [1] 2

rob_daemon
08-27-2004, 10:00 PM
Note: Development of this hack has stopped.
The built-in version is far superior to this hack and has better controls and permission checking. For those of you who will remain on 3.0.x, I will try to support this hack as best I can, but it won't be a top priority. If you plan on moving to 3.5, I hope this hack made your life a little bit easier while you waited :).

Current Version: 1.2.1 (Wed Dec 11 15:26:30 PDT 2004)

What this is?
This hack will allow you and your moderators to do your job more effectively by allowing you to mass-moderate. You can perform the same action on multiple threads and posts without leaving the current page!

What is required?
In order to use this hack, you must have cookies and JavaScript enabled! If you don't, this hack will not work. (Note: there is no "alternative display" for people without JavaScript enabled).

How many changes?
Uploads: 2
File edits: 2
And template additions/edits

Support
I will provide all support here in this thread.

Bugs
I have thoroughly tested this hack with as many different combinations I could think of. But I probably have either over looked one or two, or just didn't think of some. If you find any odd behaviour, please let me know!

Changes Since

1.2.0
Fixed problems with merging threads Enhancement to the merge thread screen
1.1.0
(Hopefully) resolved all JavaScript issues Merge threads Removed search results moderation ability (it was too much work to maintain and a user could bypass the protection if he knew how the hack operated) Bug with not updating all user fields in post merge Bug with checking for the wrong permissions when deleting a post Template caching Selection boxes only appear when a user is a moderator
1.0.0
Fixed search results Added small announcement patch


Fixes For 1.2.1
The following fixes are in in the next version:

Instructions typo for threadbit template (https://vborg.vbsupport.ru/showpost.php?p=581226&postcount=131)
Attachments are lost when merging posts (https://vborg.vbsupport.ru/showpost.php?p=661132&postcount=248) The download has not yet been updated with this fix!


On The To-Do List

Usergroup permission for inline moderation


If you'd like a moderator action added to this hack, post it below and I'll look into it.

What are the screen shots of?

Thread listing with inline moderation (https://vborg.vbsupport.ru/attachment.php?attachmentid=20422&stc=1)
Post listing with inline moderation (https://vborg.vbsupport.ru/attachment.php?attachmentid=20423&stc=1)
Merge posts screen (https://vborg.vbsupport.ru/attachment.php?attachmentid=20424&stc=1)
Result of merging posts (https://vborg.vbsupport.ru/attachment.php?attachmentid=20425&stc=1)
Split thread screen (https://vborg.vbsupport.ru/attachment.php?attachmentid=20426&stc=1)


Don't forget to click install!!!

N. Wright
08-28-2004, 12:21 AM
I haven't tested it out fully, but this hack seems to work good except for a few minor bugs: During the install one of the template modifications says to modify FORUMHOME, but thats actually supposed to be FORUMDISPLAY. Also, the colspan of announcements is not increased when it should be.

Good work tho, I'm going to continue using it.

alkatraz
08-28-2004, 12:38 AM
Sweet!!

rob_daemon
08-28-2004, 01:09 AM
I haven't tested it out fully, but this hack seems to work good except for a few minor bugs: During the install one of the template modifications says to modify FORUMHOME, but thats actually supposed to be FORUMDISPLAY. Also, the colspan of announcements is not increased when it should be.

Good work tho, I'm going to continue using it.
Thanks for pointing that out to me. The instructions have now been changed :)

Sweet!!

Glad you like ;)

N. Wright
08-28-2004, 02:49 AM
forumdisplay_announcement changes:
Find: <td class="alt2" colspan="<if condition="$show['threadicons']">5<else />4</if>">
Replace: <td class="alt2" colspan="<if condition="$show['threadicons'] AND !can_moderate()">5<else /><if condition="!$show['threadicons'] AND can_moderate()">5<else /><if condition="$show['threadicons'] AND can_moderate()">6<else />4</if></if></if>">

Red Blaze
08-28-2004, 04:13 AM
Works on 3.0.0. Would make things easier. ^_^ Thank you.

/me clicks install

EDIT: You could add this to the search thread thing since the checkbox appears there too. *shrugs* just a suggestion.

pjdaley
08-28-2004, 05:16 AM
INSTALLING PRONTO

you have asnwered my prayers: https://vborg.vbsupport.ru/showthread.php?t=68461

thank you thank you

rob_daemon
08-28-2004, 05:26 AM
forumdisplay_announcement changes:
Find: <td class="alt2" colspan="<if condition="$show['threadicons']">5<else />4</if>">
Replace: <td class="alt2" colspan="<if condition="$show['threadicons'] AND !can_moderate()">5<else /><if condition="!$show['threadicons'] AND can_moderate()">5<else /><if condition="$show['threadicons'] AND can_moderate()">6<else />4</if></if></if>">
Thanks for the fix :)

I've added it into the next version and have added you to the "special thanks" list that is also in the next version.

INSTALLING PRONTO

you have asnwered my prayers: https://vborg.vbsupport.ru/showthread.php?t=68461

thank you thank you

Glad I could help :)

Works on 3.0.0. Would make things easier. ^_^ Thank you.

* Sonikku clicks install

Thanks :)

EDIT: You could add this to the search thread thing since the checkbox appears there too. *shrugs* just a suggestion.

I can look at adding this into the search results page.

SnowBot
08-28-2004, 06:14 AM
I have clicked Install but may hang fire as you are making a new version to actulary install it :) I love the idea of this.

HiDeo
08-28-2004, 07:37 AM
Thanks, I'll install today ;)

* HiDeo clicks install

Mephisteus
08-28-2004, 10:23 AM
Very nice :)

* Mephisteus clicks install

SaN-DeeP
08-28-2004, 11:10 AM
rob_daemon.
this is surely a very handy tool. I appreciate your time for same..

Will install it once tested.

Big thnx

mharmon
08-28-2004, 06:58 PM
Nice -- but shouldn't there be an option in the actual thread to select multiplie posts and delete them permanently? Not just soft delete?

Reeve of shinra
08-28-2004, 07:42 PM
Doesnt most of this appear under thread tools? (feels like I missed something)

rob_daemon
08-28-2004, 07:57 PM
Nice -- but shouldn't there be an option in the actual thread to select multiplie posts and delete them permanently? Not just soft delete?
I considered hard delete but that could be a problem if you accidentally selected the wrong option.

Doesnt most of this appear under thread tools? (feels like I missed something)

Yes they do. The point is to be able to do it onto multiple posts/threads at the same time.

Mephisteus
08-28-2004, 08:24 PM
What I am wondering is that although this is considered one of the few real missing features in vBulletin, it only has 12 installs...

accyroy
08-28-2004, 08:38 PM
at last - this finally brings vbulletin upto the same standards as my old YaBB board! :)
Been waiting for ages for this!

rob_daemon
08-28-2004, 08:40 PM
What I am wondering is that although this is considered one of the few real missing features in vBulletin, it only has 12 installs...

I did only release it yesterday. But as long as at least one person installs it, I'm happy :).

at last - this finally brings vbulletin upto the same standards as my old YaBB board!
Been waiting for ages for this!

:)

Floris
08-28-2004, 09:11 PM
Current Version: 1.0.0 (Fri Aug 27 16:58:26 PDT 2004)

What this is?
This hack will allow you and your moderators to do your job more effectively by allowing you to mass-moderate. You can perform the same action on multiple threads and posts without leaving the current page!

What is required?
In order to use this hack, you must have cookies and JavaScript enabled! If you don't, this hack will not work. (Note: there is no "alternative display" for people without JavaScript enabled).

How many changes?
Uploads: 2
File edits: 1
Template edits: 9
New templates: 3
Queries: 0

Support
I will provide all support here in this thread.

Bugs
I have thoroughly tested this hack with as many different combinations I could think of. But I probably have either over looked one or two, or just didn't think of some. If you find any odd behaviour, please let me know!

Fixes For 1.0.0
The following fixes are in in the next version:

https://vborg.vbsupport.ru/showpost.php?p=547258&postcount=5


On The To-Do List

Merge threads


If you'd like a moderator action added to this hack, post it below and I'll look into it.

What are the screen shots of?

Thread listing with inline moderation (https://vborg.vbsupport.ru/attachment.php?attachmentid=20422&stc=1)
Post listing with inline moderation (https://vborg.vbsupport.ru/attachment.php?attachmentid=20423&stc=1)
Merge posts screen (https://vborg.vbsupport.ru/attachment.php?attachmentid=20424&stc=1)
Result of merging posts (https://vborg.vbsupport.ru/attachment.php?attachmentid=20425&stc=1)
Split thread screen (https://vborg.vbsupport.ru/attachment.php?attachmentid=20426&stc=1)


Don't forget to click install!!!
Why didn't you use the forum / thread tool drop down box instead of adding more data on the screen?

great step forward :)

rob_daemon
08-28-2004, 09:29 PM
Why didn't you use the forum / thread tool drop down box instead of adding more data on the screen?

great step forward :)
Because on my forum, I stripped out all of the DHTML menus and I prefer to not use them :). It wouldn't be hard to move it into the DHTML menu, though.

Skyline_GT
08-28-2004, 09:58 PM
nice hack
* Skyline_GT clicks installed

YLP1
08-28-2004, 10:26 PM
Hi all, I installed this mod.... and went back through to make sure I didn't miss a step but I don't have the inline mod tools showing on my forums:
http://www.yourlincolnpark.com/LPSForum/lpsforum.php

Any ideas where I screwed up? And yes... I created the new templates.

YLP1
08-28-2004, 10:31 PM
OOps....I see it now but it only appears on my defualt skin and not the child skins.....any ideas why?

Diana Notacat
08-28-2004, 10:38 PM
If you could add a mass close/open to that it would be beyond fantastic. XD

rob_daemon
08-29-2004, 02:32 AM
OOps....I see it now but it only appears on my defualt skin and not the child skins.....any ideas why?
If you have customized the templates that require changing, then that would cause this to happen.

If you could add a mass close/open to that it would be beyond fantastic. XD

This already exists in the toolset. :) View a forum and the check out the tool list and you'll see "Open Theads" and "Close Threads" (here for a picture (https://vborg.vbsupport.ru/attachment.php?attachmentid=20422&stc=1)).

wrongful
08-29-2004, 11:52 AM
at last - this finally brings vbulletin upto the same standards as my old YaBB board! :)
Been waiting for ages for this!Haha, yeah this was the only thing that I missed from my old YaBB board.

Great hack, installed!

dndog
08-29-2004, 02:20 PM
Thanks so much. Heck, even phpBB has this feature that vBulletin lacks!

/me clicks install.

Abe1
08-30-2004, 12:24 AM
<font color="#2da72e">* Abe1 clicks installed</font>

Great hack!

2 bugs:

1) When you click the usercp, you see the 'New Subscribed Threads'. They all have check boxes next to them that do nothing.

2) When a thread is deleted, and you click 'view', you see check boxes by every post that do nothing.

integra99
08-30-2004, 12:51 AM
Another bug, if you do a search for new post, it shows the checkboxes, and gives a javascript error if you check them

rob_daemon
08-30-2004, 01:33 AM
I'll look into putting conditionals around the check boxes for the next version.

AxelF
09-02-2004, 06:11 AM
Great hack... :)

Any update on those conditionals to fix the check boxes showing in subscribed threads and search results? Thanks.

teksigns
09-02-2004, 05:53 PM
awaiting update to install ! cool script man !

keep up the good work !

rob_daemon
09-03-2004, 02:01 AM
Great hack... :)

Any update on those conditionals to fix the check boxes showing in subscribed threads and search results? Thanks.

It may be this weekend or not. School just started, but I have labour day off. It should be there within the next two weeks, though.

teksigns
09-04-2004, 01:56 PM
I noticed that there is a merge feature for merging post....

how about a feature to merge threads as well ?

any idea how to make that happen ?

rob_daemon
09-04-2004, 05:48 PM
I noticed that there is a merge feature for merging post....


how about a feature to merge threads as well ?

any idea how to make that happen ?
Look at the "On The To-Do List" part of the first post.

integra99
09-07-2004, 12:43 AM
Ok, here's a quick fix for the search bug..

In search.php, add in after the declarations if ($_REQUEST['mod'] == 1)
{
$onload .= " inline_reset(); ";
}

In template search_results find <body>
and replace with<script type="text/javascript" src="clientscript/inline_moderation.js"></script>

<body onload="inline_init($foruminfo[forumid], 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>">

Then find $vbphrase[showing_results_x_to_y_of_z]</phrase></span>
</td>
</tr>
</table>

And add after <if condition="can_moderate()"><br>
<div align="right"><table>
<tr valign="top">
<td colspan="2" align="right">
<form action="inlinemod.php" method="post" name="inlinemod">
<input type="hidden" name="type" value="thread" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" align="right">
<tr class="alt1">
<td align="right" class="smallfont">
<strong>Inline Moderation Tools:</strong>
<select name="inlinemodact">
<option value="close" selected="selected">Close Threads</option>
<option value="open">Open Threads</option>
<option value="stick">Stick Threads</option>
<option value="unstick">Unstick Threads</option>
<option value="move">Move Threads</option>
<option value="delete">Delete Threads</option>
<option value="undelete">Undelete Threads</option>
</select>
<input id="inline_go" type="submit" name="submit" value="Go" />
<input type="button" name="reset" value="Clear" onclick="inline_reset();" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table></div>
</if>

Then find <td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
and add after <if condition="can_moderate()">
<td class="thead" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>

I believe that does it! The only bug I can find so far is because you are using the tools from a search window and not a forum, when the script tries to redirect you back to the forum you were viewing, it gives an error, but the moderation tools still work fine. Click on your logo to take you back to your forums index, go on about your day :)

integra99
09-07-2004, 12:44 AM
Also, if you check the box at the top of the search window (in thead), it will not show it as selecting all the boxes, but if you use the inline mod tools, it will mod everything you see :)

rob_daemon
09-07-2004, 05:29 AM
I thank you integra99 for you posting the template fixes, but I wouldn't do those straight up. Because the forumid isn't passed, there's no way to tell (unless you want to be query-happy) if user x is a moderator of forum y via the search results.

In version 1.1.0, I have added the ability to use inline moderation tools via search results only if you have removed the security stop(s). For more detailed information about these security stops, please read READ_THIS_NOTICE in the new downloadable archive.

And 1.1.0 is now released :)

integra99
09-07-2004, 02:50 PM
I thank you integra99 for you posting the template fixes, but I wouldn't do those straight up. Because the forumid isn't passed, there's no way to tell (unless you want to be query-happy) if user x is a moderator of forum y via the search results.

In version 1.1.0, I have added the ability to use inline moderation tools via search results only if you have removed the security stop(s). For more detailed information about these security stops, please read READ_THIS_NOTICE in the new downloadable archive.

And 1.1.0 is now released :)
If I had known you were going to release it that quick, I wouldn't have done that :D

Sure works a lot better than my quick fix, thanks!

AloneEagle
09-12-2004, 02:05 AM
Hi there,
I don't really understand the step where you said "Add inline_merge:" and "Add inline_move:" Can you please tell me how and what to do on this step ?
Thanks

rob_daemon
09-12-2004, 03:57 AM
Hi there,
I don't really understand the step where you said "Add inline_merge:" and "Add inline_move:" Can you please tell me how and what to do on this step ?
Thanks
Sure! What you do is you go into the Style Manager and in the style's drop-down menu to the left, select "Add New Template" and name to what the instructions say and make the template's contents be what the instructions specify.

Phalynx
09-15-2004, 06:50 AM
Great, thanks!

Burns
10-02-2004, 09:52 PM
Hi rob_daemon!

When i have read the name "Inline Moderation" i was very happy,
but i looks like this hack does not include what i really need :( :

- show unapproved posts along with others
( whereever they would apprear after approvement ),
and let moderators approve ( or delete ) them.

Also it would be nice to be able to "unapprove" a post
( if a moderator approved a post by mistake,
while he/she actually wanted to wait with approvement of this post
until other mod/admin reviewes it, or let others approve it )

I requested it in vb.com forum , and others requested it too
http://www.vbulletin.com/forum/showthread.php?t=110020&highlight=inline
http://www.vbulletin.com/forum/showthread.php?t=110876&highlight=inline

Could you add this feature to your Inline Moderation hack?

rob_daemon
10-03-2004, 02:32 AM
I'm not sure how feasible it would to go from moderated to unmoderated posts, but the other way shouldn't be hard. The first one may present a challenge, but I can take a look and see.

Burns
10-03-2004, 05:57 AM
Thank you ^_^
I tried to do it myself this evening,
but i know too little about vB code, and php in general,
i all could do so far was to let users with mod. privilegies see unapproved posts in threads,
while other users can not.
Then i tried to find out how to change the background color for unapproved posts
( or highlight them anyhow ), but failed : (
( though it's rather simply task... )

There are not many admins who need to approve new posts,
but i'm sure, everyone who does, will be grateful if you add this option...

About change from unmoderated to moderated - probably i wouldn't think of it myself,
but it was in IPB and i liked this feature

Also i would like to add, that to approve new posts inline,
the unapproved posts really need to be highlighted, as well as the threads, pages and forums with unapproved posts
( else it would be alomst impossible to find them )

And the last thing... guess it would not go well along with your inline moderation concept,
but it would be really nice to have for approvement "approve/delete" buttons at every post, it could save a lot of click-work,
if you need to approve or delete just single posts in many threads or even forums...
( 1 click instead of 4 clicks + scroll-down pro approvement )

rob_daemon
10-03-2004, 07:41 AM
I have an idea of how to make it work (and yes the posts would be highlighted). My only concern is that it may require quite a few modifications to showthread.php; other than that I can see it working.

It will probably be a few weeks as school keeps me extremely busy.

pjdaley
10-03-2004, 03:03 PM
how would i be able to edit more then 1 thread title at the same time using this wonderful hack? i need to add a prefix to all my threads in a certain forum. thanks in advanced

rob_daemon
10-03-2004, 05:10 PM
That's beyond the scope of the hack. You could probably do it with a single MySQL query, though.

korg
10-07-2004, 01:10 AM
Thanks for this beautiful work, I will install this hack in my board.

HuangA
10-09-2004, 07:53 PM
Great hack, thanks for sharing this great work with us.

*HuangA clicks install


Edit: oops, didn't see you already mention inline merge therads is already in the works. GOOD JOB! :)

Lord Brar
10-10-2004, 11:26 AM
I installed it. It worked fine when I was logged in as Admin... but as soon as I logged out, It gave a JS error on show thread and forum display pages :(

Any Idea why???????

BTW I am on IE 6 and WinXP

rob_daemon
10-10-2004, 09:56 PM
Can you post the JavaScript error? I don't run into any problems.

Lord Brar
10-11-2004, 11:18 AM
Can you post the JavaScript error? I don't run into any problems.
I unistalled this hack... But I got that yellow ! sign of JS error in IE. BTW I will reinstall it and see if I get that error again and if I do, I will ask you what to tell you :D

lanc3lot
10-11-2004, 01:03 PM
Hello rob_daemon,

First of all, congrats for this great hack!

Can u please tell me, how can i move a single post to another forum and thread(cant understand how can i do that with Vb either..:( )

Thanks, keep up the good work

Ps

In case i want to uninstall later(i dont want, i just check), i must undo whatever i did...right?

:)

rob_daemon
10-11-2004, 05:57 PM
Hello rob_daemon,

First of all, congrats for this great hack!

Can u please tell me, how can i move a single post to another forum and thread(cant understand how can i do that with Vb either..:( )

Thanks, keep up the good work

Ps

In case i want to uninstall later(i dont want, i just check), i must undo whatever i did...right?

:)

To move a single post to another forum in vB, you first have to split it from the thread. This will create a new thread with only the post(s) you wanted and then you can move it around.

As for uninstalling, you just undo whatever you did to install it.

korg
10-11-2004, 10:43 PM
how do I make this work in postbit vertical? I can't see the tick to split posts.

XanaduRanch
10-11-2004, 11:39 PM
Thanks! This works great! But I am getting an error, "Can't Find Phrase 'splitthread'". I didn't see any instructions for adding a phrase. but it's late here. Did I miss something? Seems to work anyway ...

XR

integra99
10-11-2004, 11:51 PM
I'd like to see all the normal thread and post management tools in your hack, such as merging threads, physically deleting threads and posts, soft deleting threads/posts, etc. It would also be nice to have your inline tools work with this hack (https://vborg.vbsupport.ru/showthread.php?t=65536) so you could mass download threads, and this hack (https://vborg.vbsupport.ru/showthread.php?t=60427) for bumping a few threads at a time.

rob_daemon
10-12-2004, 02:01 AM
how do I make this work in postbit vertical? I can't see the tick to split posts.

Did you add the template modification in the instructions to the postbit template?

Thanks! This works great! But I am getting an error, "Can't Find Phrase 'splitthread'". I didn't see any instructions for adding a phrase. but it's late here. Did I miss something? Seems to work anyway ...

XR

Odd, I'm not sure why that would be occurring. I don't even get the thread split redirect message.

I'd like to see all the normal thread and post management tools in your hack, such as merging threads, physically deleting threads and posts, soft deleting threads/posts, etc. It would also be nice to have your inline tools work with this hack so you could mass download threads, and this hack for bumping a few threads at a time.

As stated previously in this thread: merging is on the to-do, and physically deleting is something I considered but decided against (it may wander its way into the hack in the future, though), and soft deletes already exist.

I don't have any intentions, however, to make this hack specifically compatible with other hacks. It's not hard to add custom actions if you know PHP, however.

integra99
10-12-2004, 04:42 AM
Sounds like a plan. I'll look into what it would take to integrate those other hacks on my own, and post them up when I get some time. I would like to see the physical delete though :D

korg
10-12-2004, 10:39 PM
postbit or postbit_legacy

Find:
$post[iplogged]
Add after:

<if condition="can_moderate()"><input type="checkbox" id="inlinemod_$post[postid]" name="inlinemod_$post[postid]" value="1" onclick="select_item($post[postid], this);" /></if>



I did this only in postbit, as you said either one.....or you meant both?

This is my modification:
<else />&nbsp;</if>
<div style="padding:0px 0px 1px 0px;"></div>
<div align="center">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] <if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> </if>$post[iplogged]<if condition="can_moderate()"><input type="checkbox" id="inlinemod_$post[postid]" name="inlinemod_$post[postid]" value="1" onclick="select_item($post[postid], this);" /></if></div>
</td>

rob_daemon
10-12-2004, 11:17 PM
If you want the checkbox to appear on the left-style postbit, edit postbit_legacy. If you want it to appear on the top-style postbit, edit postbit.

psico
10-16-2004, 03:56 AM
If you want the checkbox to appear on the left-style postbit, edit postbit_legacy. If you want it to appear on the top-style postbit, edit postbit.
The split option is not working... I?ve checked 2 or more post in a thread and then select Split Posts from the pop-down menu and the I received this error:
"You must specify some posts to split off from this thread."

theArchitect
10-16-2004, 05:39 AM
*theArchitect clicks install. And is very impressed with one of the best and most useful hacks he has seen.*

What is the progress of the fix for check boxes being displayed even when a moderator does not have permission to moderate that forum?

rob_daemon
10-16-2004, 07:46 AM
The split option is not working... I?ve checked 2 or more post in a thread and then select Split Posts from the pop-down menu and the I received this error:
"You must specify some posts to split off from this thread."

I'm not sure what is happening. I haven't had any problems. Are you sure that you uploaded the JavaScript file into the clientscript folder and that you made the JavaScript file included on the proper pages?

*theArchitect clicks install. And is very impressed with one of the best and most useful hacks he has seen.*

:) Glad you like it.

What is the progress of the fix for check boxes being displayed even when a moderator does not have permission to moderate that forum?

I'll look into doing this but I'm not sure when I'll have time to work on this hack; school keeps me pretty busy.

theArchitect
10-19-2004, 12:34 AM
I have just had a bug reported from one of my users. When he click on any page that utilises the inline_moderation.js file he gets the attached error.

Though the strange thing is that I am not getting this error, nor are 99% of my users.

If you could help me with this it would be most appreciated as I do not wish to ditch the inline tool but do want to spare my members the hassle of having to cancel an error message box every time they view a thread.

rob_daemon
10-19-2004, 04:50 AM
For now, do the following:

Open up all the templates in which you added <script type="text/javascript" src="clientscript/inline_moderation.js"></script>

And wrap that line in this condition:

<if condition="can_moderate()"></if>

Leaving you with

<if condition="can_moderate()"><script type="text/javascript" src="clientscript/inline_moderation.js"></script></if>

And that should hide all the errors from him. I'm not sure why it's choking on line 99, however.

By the way, I'll add this in the next update (when it's ready).

theArchitect
10-19-2004, 06:14 AM
For now, do the following:

Open up all the templates in which you added <script type="text/javascript" src="clientscript/inline_moderation.js"></script>

And wrap that line in this condition:

<if condition="can_moderate()"></if>

Leaving you with

<if condition="can_moderate()"><script type="text/javascript" src="clientscript/inline_moderation.js"></script></if>

And that should hide all the errors from him. I'm not sure why it's choking on line 99, however.

By the way, I'll add this in the next update (when it's ready).
Many thanks for your speedy response.

I have made the changes and am just waiting to hear back from the user with the problem.

DJ WaBBiT
10-24-2004, 09:30 AM
Installed and my moderators are verry gratefull 2 you :D

nice work thanx allot.

Revan
10-26-2004, 05:35 AM
I am having some errors.
1. In my UserCP, udner Subscribed Threads, I see the checkboxes but no Inline Mod Tools buttons for thread managing. Checking these boxes displays the following error (loosely translated from Norwegian): "A runtime error has occurred. Do you wish to debug?
Line: 523
Error: Expected an object"

2. Whenever I (Admin, so not related to problem above with the can_moderate() fix) view forumdisplay?f=$forumid, I get this error: "A runtime error has occurred. Do you wish to debug?
Line: 93
Error: 'null' is null or not an object"


Otherwise, this hack has recieved great responses from my coadmin (and me;))
cheers :)

rob_daemon
10-26-2004, 03:25 PM
I'll check these both out when I get home tonight, but I'm not sure what is causing them.

Andy R
11-03-2004, 05:55 PM
Thanks for such a useful tool!

Is there anyway to have a "select all" feaure? I sue this tool to search for off-topic keywords and then from the serach results want to delete pages of posts. Clicking each is taking forever. Since that is a Javascript function, I was thinking it might be an easy addition???

rob_daemon
11-04-2004, 03:17 AM
Thanks for such a useful tool!

Is there anyway to have a "select all" feaure? I sue this tool to search for off-topic keywords and then from the serach results want to delete pages of posts. Clicking each is taking forever. Since that is a Javascript function, I was thinking it might be an easy addition???
I looked into a "select all" feature and it's a little more complicated than one would think. I'll check out some solutions for this, though.

Revan
11-05-2004, 10:46 AM
Um...doesnt using the internal jscript function "js_select_all(this)" (or something like that, its used in the backup.php in acp if you want to know the exact code) work?
I know it will if the IMT uses a form to submit the selected boxes... I didnt look for this in the code, Im just throwing off hopefully helpful suggestions :)

rob_daemon
11-05-2004, 01:43 PM
Hmm... I'll play around with the code but I'm not sure how that function works so I can't vie a definite answer. Thanks for the suggestion :)

seraphex
11-06-2004, 05:00 AM
Here's what I did to remedy the script errors mentioned above. I don't know if this is the correct way to do it and I'm not a coder.

After the hack is installed..

FORUMDISPLAY TEMPLATE

Find:
<script type="text/javascript" src="clientscript/inline_moderation.js"></script>

<body onload="inline_init($foruminfo[forumid], 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>">
Replace with:
<if condition="can_moderate()">
<script type="text/javascript" src="clientscript/inline_moderation.js"></script>
<body onload="inline_init($foruminfo[forumid], 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>">
</if>
<else /><body><else />

SHOWTHREAD TEMPLATE**

Find:
<script type="text/javascript" src="clientscript/inline_moderation.js"></script>
</head>
<body onload="inline_init($thread[threadid], 'post');$onload">
Replace with:

<if condition="can_moderate()"><script type="text/javascript" src="clientscript/inline_moderation.js"></script>
</head>
<body onload="inline_init($thread[threadid], 'post');$onload">
</if>

<else />
</head>
<body>
<else />


search_results TEMPLATE

Find:
<script type="text/javascript" src="clientscript/inline_moderation.js"></script>
<body onload="inline_init(0, 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>">
Replace with:
<if condition="can_moderate()"><script type="text/javascript" src="clientscript/inline_moderation.js"></script>
<body onload="inline_init(0, 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>">
</if>
<else /><body><else />

Users see an extra row between views and forum without this edit

In the same file..

Find:
<td class="thead" nowrap="nowrap">&nbsp;</td>
Replace with:
<if condition="can_moderate()">
<td class="thead" nowrap="nowrap">&nbsp;</td>
</if>

or if you want some text above the checkboxes describing what they are for use:

<if condition="can_moderate()">
<td class="thead" nowrap="nowrap">&nbsp;Moderate?&nbsp;</td>
</if>



** Edit: Fixed a typo.. thanks for pointing it out O-H..

Andy R
11-07-2004, 02:52 AM
I noticed that the Private Message Interface has a select all feature. It looks like the javascript for it is in the pm_messagelist template.

Amavisca
11-11-2004, 11:44 PM
I have a small problem. I install everything fine, my Mod said everything is working however the del funtion when they try to use it, it said they dont have permision. How can i fix it?

theArchitect
11-11-2004, 11:47 PM
I have a small problem. I install everything fine, my Mod said everything is working however the del funtion when they try to use it, it said they dont have permision. How can i fix it?
You may need to check your permissions for moderators. So long as they have the power to delete posts it should work fine.

Zoints
11-15-2004, 03:49 AM
It looks like your tamplates aren't cached? I know inline_merge isn't.

Another question, is it possible to limit the ability to use these tools by usergroup? I only want my admin, supermods, and mods to be able to use and see it. Right now I have some users who are moderators of private forums but aren't REAL moderators. They can see and use this right now which I don't want.

Thanks! And great hack!

rob_daemon
11-15-2004, 04:21 AM
Yes, the current version does not cache the templates and I have fixed that. Currently the project is a mess in development and I'm trying to clean it up and release a new version which will fix a ton of bugs and add some features.

As far as limiting the power, they only have access to the tools that they'd have in the "Thread Tools" popup menu. Do you want to prevent them from using inline moderation all together?

And don't forget to click install ;).

Zoints
11-15-2004, 04:35 AM
Yes, the current version does not cache the templates and I have fixed that. Currently the project is a mess in development and I'm trying to clean it up and release a new version which will fix a ton of bugs and add some features.

As far as limiting the power, they only have access to the tools that they'd have in the "Thread Tools" popup menu. Do you want to prevent them from using inline moderation all together?

And don't forget to click install ;).

Yes, i'd like to limit them from seeing/using the inline tools altogether. I only want my REAL mods, supermods, and admin to see it.

And I just licked install.

*edit* and clicked it

theArchitect
11-15-2004, 04:59 AM
I have finally sourced the error that was causing the error in the inline.js file.
// ################################################## ################# // Set the name of the go button function write_button(avalue)
{
fetch_object("inline_go").value = "Go (" + avalue + ")";
}Everytime my friend tries to access a thread he got and error message, and the above code was what his debugger returned.

Your help with this would be apprecaited.

Zoints
11-15-2004, 08:24 AM
Nevermind, I got it figured out. Thanks again for a great hack.

rob_daemon
11-15-2004, 01:55 PM
theArchitect: when does this happen? Does he press the checkboxes or does this only occur when the page loads? Is he a moderator and does he have access to the inline tools?

thegunowner149: glad you got it working, the new version has a usergroup setting to control the usage of inline moderation tools.

theArchitect
11-16-2004, 12:15 PM
theArchitect: when does this happen? Does he press the checkboxes or does this only occur when the page loads? Is he a moderator and does he have access to the inline tools?

thegunowner149: glad you got it working, the new version has a usergroup setting to control the usage of inline moderation tools.
It happens on most pages for him, but mainly when replying to a post or creating a thread.

He is not a moderator and does not have access to the inline tools.

Hope this helps with the trouble shooting.

rob_daemon
11-16-2004, 01:50 PM
I'll hopefully have the new version of the tools out by next Tuesday. Hopefully that'll fix the problem. It will not show any of the tool items or load any of the scripts unless the user has moderator powers in that specific forum. I'll also do some rigorous JavaScript testing in IE6 with high security settings, etc.

theArchitect
11-17-2004, 12:53 AM
I'll hopefully have the new version of the tools out by next Tuesday. Hopefully that'll fix the problem. It will not show any of the tool items or load any of the scripts unless the user has moderator powers in that specific forum. I'll also do some rigorous JavaScript testing in IE6 with high security settings, etc.
Many Thanks for your support.

Zoints
11-17-2004, 06:15 AM
I'm getting the same error as theArchitect. I can give a lot more information on it.

It only occurs with IE. It occurs when loading forumdisplay.php and showthread.php pages.

MY exact error is:

Line: 94
Char: 2
Error: Null is null or not an object
Code: 0

It's a problem with inline_moderation.js -- It's trying to set the value of a button called inline_go but the button doesn't exist on the pages anywhere.

Ideas how to fix it?

rob_daemon
11-17-2004, 06:16 PM
As I stated above, it will be fixed in the future. Thanks for the information :). This is the new version of write_button() in inline_moderation.js. Replace this:

// ################################################## #################
// Set the name of the go button
function write_button(avalue)
{
fetch_object("inline_go").value = "Go (" + avalue + ")";
}

With:

// ################################################## #################
// Set the name of the go button
function write_button(avalue)
{
if (thebutton = fetch_object("inline_go"))
{
thebutton.value = "Go (" + avalue + ")";
}
}

That should do the trick, but I have yet to test it on IE.

Zoints
11-17-2004, 07:51 PM
That fixed it rob_daemon, thank you! Great support.

rob_daemon
11-18-2004, 05:08 AM
Glad that fixed it up :).

Zoints
11-22-2004, 05:29 AM
Here's a troublesome bug. I found today when doing an IP search that some people were showing as having posted under other's IP's, including admin, supermods, and such. I thought there was an exploit until I investigated and found it was a bug with this hack. When merging posts, you use:

$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET pagetext = '" . addslashes($_POST['finalpost']) . "', userid = " . intval($_POST['mergeuser']) . ", title = '" . addslashes(htmlspecialchars_uni($_POST['title'])) . "' WHERE postid = {$vars['newpost']['postid']}");


However, it just updates the userid, but not the username which wreaks all kinds of havok.

rob_daemon
11-22-2004, 09:08 PM
Here's a troublesome bug. I found today when doing an IP search that some people were showing as having posted under other's IP's, including admin, supermods, and such. I thought there was an exploit until I investigated and found it was a bug with this hack. When merging posts, you use:

$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET pagetext = '" . addslashes($_POST['finalpost']) . "', userid = " . intval($_POST['mergeuser']) . ", title = '" . addslashes(htmlspecialchars_uni($_POST['title'])) . "' WHERE postid = {$vars['newpost']['postid']}");


However, it just updates the userid, but not the username which wreaks all kinds of havok.
Thanks. I've set it to now update all the user-based fields. The new update should be coming either today or tomorrow :).

theArchitect
11-27-2004, 09:18 PM
Thanks. I've set it to now update all the user-based fields. The new update should be coming either today or tomorrow :).
Sorry to bug you, I know that you are busy with School, but do you have an eta on the update?

sv1cec
12-03-2004, 06:17 AM
I just installed this hack, and it is a God-send, thank you.

Just one suggestion, instead of using can_moderate(), why don't you use can_moderate($forumid, '', $bbuserinfo[userid])? In that way, the checkboxes etc. will appear only in the forums that the moderator can actually moderate. This works in forumdisplay, etc. In postbit and postbit_legacy, use can_moderate($forum[forumid], '', $bbuserinfo[userid]).

I also noticed a dangerous issue here. A moderator can delete a post, which is made by an administrator or a super moderator. I am sure you wouldn't like this happening. I am working on finding a way to prevent that.

Now, I am going to see what I can do about the search results thing.

Rgds
----------
John
SV1CEC

rob_daemon
12-03-2004, 10:01 PM
For the first bit: yes, as I stated above the new version that I hope to release this weekend does take care of that by having a conditions that attend to that.

For the second bit: That's how the vB permission system works. If a moderator can delete posts, he or she is eligible to delete any posts, regardless of the users' rank.

sv1cec
12-04-2004, 04:27 AM
For the first bit: yes, as I stated above the new version that I hope to release this weekend does take care of that by having a conditions that attend to that.

For the second bit: That's how the vB permission system works. If a moderator can delete posts, he or she is eligible to delete any posts, regardless of the users' rank.
Rob,

You are right on the last issue, I did some checks yesterday. It's not difficult however, to add some functionality over vB's standard permissions. For example, in my Advanced Warning Hack, I use an hierarchical warning schema, where the admins can warn everyone, the Super mods can warn mods and simple users and the mods can warn only simple users.

Actually, I had modified your code yesterday, enough to have it working like this, a simple mod couldn't delete an admin's thread or post etc. Then I screwed up something and had to remove the code from the forumdisplay and threadbits, but it still works in the postbit part. If you want, I can work with you on that, later today, it requires a couple of modifications in the forumdisplay query that gets the threads and then some conditionals in the forumdisplay, threadbit and threadbit_deleted templates.

I plan to do them for my system today, since the twins will be at their grandmother (peace of mind), so if you want, they are all yours.

Rgds
-------------

John

rob_daemon
12-04-2004, 08:51 AM
Thanks for the offer, but I like to keep the permissions system based on the true vB3 permissions set to prevent confusion (both on my end and the users'). You're more than welcome to post the changes in the thread, though.

sv1cec
12-04-2004, 10:18 AM
Thanks for the offer, but I like to keep the permissions system based on the true vB3 permissions set to prevent confusion (both on my end and the users'). You're more than welcome to post the changes in the thread, though.
I have one question. An admin of one forum cannot delete a thread from the forumdisplay, while he can from the thread tools within the thread. I checked your code in inlinemod.php and it appears that you are using the following conditional:


if (!can_moderate($vars['forumid'], 'canremoveposts'))
{
print_no_permission();
}


Wouldn't that check for permanent deletion? I suppose that you should use candeleteposts, instead of canremoveposts, but I am not sure. Can you please clarify?

Rgds and tnx

rob_daemon
12-04-2004, 11:10 AM
I have one question. An admin of one forum cannot delete a thread from the forumdisplay, while he can from the thread tools within the thread. I checked your code in inlinemod.php and it appears that you are using the following conditional:


if (!can_moderate($vars['forumid'], 'canremoveposts'))
{
print_no_permission();
}


Wouldn't that check for permanent deletion? I suppose that you should use candeleteposts, instead of canremoveposts, but I am not sure. Can you please clarify?

Rgds and tnx
Thanks for catching that. It should be candeleteposts, not canremoveposts; hard delete is a separate entity.

Dean C
12-04-2004, 11:18 AM
Thankyou for sharing your work with the community :)

sv1cec
12-07-2004, 07:16 AM
Thankyou for sharing your work with the community :)
Do we have an ETA for the merge threads option?

Tnx
---------
John

rob_daemon
12-07-2004, 01:48 PM
Do we have an ETA for the merge threads option?

Tnx
---------
John
Merging threads is in the next version. I was planning to release it last night, but after six hours of homework I really wasn't up for it. Should be updated this evening.

sv1cec
12-07-2004, 02:21 PM
Merging threads is in the next version. I was planning to release it last night, but after six hours of homework I really wasn't up for it. Should be updated this evening.
Thanks for your response, I know it is hard for you, given your school obligations.

No hurry for me, I came up with my own version, but I would be interested to see how it compares with yours. If you need the code, please let me know.

Rgds
-----------
John

sv1cec
12-08-2004, 06:12 AM
I am not sure if someone would be interested in that, but I noticed that if you do a search and come up with the results, then you do an inline moderation action, like delete a thread (supposing you are allowed to do that), then you are no longer returned to the search results, but to the forums home page.

That bothered me, since I use the search to find all posts since yesterday, and I want to return there to check for more.

What I came up with, is that you may catch up the fact that you called the inlinemod.php from the search results, and have the program return you there. All you have to do is to pass a hidden parameter from the search_results template form to inlinemod.php.

Here is what you have to do:

Open your search_results template and find:


<input type="hidden" name="unsafe" value="1" />


Right below that, add:


<input type="hidden" name="searchid" value="$searchid" />


Save the template. Now open your inlinemod.php file and find:


if ($_POST['type'] == 'thread')
{
// Set our globals
$vars['inlineid'] = htmlspecialchars_uni($_COOKIE['bbinlineid']);
$vars['forumid'] = intval(end(explode('_', $vars['inlineid'])));
$vars['action'] = htmlspecialchars_uni($_POST['inlinemodact']);
$vars['forum'] = fetch_foruminfo($vars['forumid']);


Right below that, add:


$searchid=$_POST['searchid'];


Further down in the same file, find:


if ($vars['forumid'])
{
$url = "forumdisplay.php?$session[sessionurl]f=$vars[forumid]&mod=1";
}


Replace all occurences of that piece of code, with:


if ($vars['forumid'])
{
$url = "forumdisplay.php?$session[sessionurl]f=$vars[forumid]&mod=1";
}
if ($searchid!='')
{
$url = "search.php?searchid=$searchid";
}


Now everytime you went to inlinemod.php from a search results page, you will be returned to your search results, after the inline moderation action is completed.

Rgds
---------
John

rob_daemon
12-08-2004, 06:16 AM
Alrighty! At long last, here it is! Inline Moderation Tools 1.2.0 should resolve all of the JavaScript users were having. Check boxes now only display when they need to, all templates are now cached, thread merging has been added (however, threads with polls it will not merge because it was too much work to figure out all of that logic), it removed search results moderation (sorry but this was a security hole that needed to be closed (if you want it enabled, I can explain how for you)), and a few other various fixes.

Upgrade instructions as well as fresh install ones are in the ZIP. Don't forget to click install!

sv1cec
12-08-2004, 07:48 AM
Alrighty! At long last, here it is! Inline Moderation Tools 1.2.0 should resolve all of the JavaScript users were having. Check boxes now only display when they need to, all templates are now cached, thread merging has been added (however, threads with polls it will not merge because it was too much work to figure out all of that logic), it removed search results moderation (sorry but this was a security hole that needed to be closed (if you want it enabled, I can explain how for you)), and a few other various fixes.

Upgrade instructions as well as fresh install ones are in the ZIP. Don't forget to click install!
Terrific,

Just change your instruction in global.php, it should say:


if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'forumdisplay')
{
$show['inlinemod'] = true;
}
else
{
$show['inlinemod'] = false;
}


you use forumdisplay.php, while the script name is forumdisplay.

Rgds

Revan
12-08-2004, 09:05 AM
Great, thanks for the update :) And thank you for that fix sv1, dunno if I'd notice that on my own, well now we dont have to find out ;)

Small suggestion: Getting rid of the .DS_Store files to save zip space :p
PS: I just wanted to say, whatever you did to the install HTML file, thank you! You have no idea how great it is to be able to use Crtl+A inside a textarea to fetch only the text inside that :D Oooh me happy now :D
*ahem*
Ill go away now :p

WebMasterAJ
12-08-2004, 12:00 PM
Hello -

I've installed this hack, but for some reason nothing displays at all. Am I supposed to activate it someway?

Please let me know!

Thank you for your time and energy!

rob_daemon
12-08-2004, 01:27 PM
Terrific,

Just change your instruction in global.php, it should say:


if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'forumdisplay')
{
$show['inlinemod'] = true;
}
else
{
$show['inlinemod'] = false;
}


you use forumdisplay.php, while the script name is forumdisplay.

Rgds
Thanks sv1ec, I thought I had changed the upgrade XML file, guess not. I'll do so and then rebuild the HTML instructions :).

Raven: I guess that's a bug in my ZIP packager then for not removing .DS_Store. I'll get rid of it when I repackage the zip tonight. Glad you like the installer :D. I love being able to do Apple/Control + A to select all the text, too. It's so much easier :D.

WebMasterAJ: If you are upgrading, make sure that in global.php the following:

// ################################################## ###########################
// are we on a script that uses inline moderation
if (THIS_SCRIPT == 'showthread.php' OR THIS_SCRIPT == 'forumdisplay.php')
{
$show['inlinemod'] = true;
}
else
{
$show['inlinemod'] = false;
}

Is actually:

// ################################################## ###########################
// are we on a script that uses inline moderation
if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'forumdisplay')
{
$show['inlinemod'] = true;
}
else
{
$show['inlinemod'] = false;
}

sv1cec
12-08-2004, 03:18 PM
I think I found one more little thing. In the threadbit template, your instructions (at least for those upgrading from 1.1.0) ask us to enter:


<if condition="can_moderate($thread['forumid'])">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>


I think this should be:


<if condition="(can_moderate($thread['forumid']) AND $show['inlinemod'])">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>


or else the checkboxes will appear in the search results.

Rgds

rob_daemon
12-08-2004, 03:39 PM
I think I found one more little thing. In the threadbit template, your instructions (at least for those upgrading from 1.1.0) ask us to enter:


<if condition="can_moderate($thread['forumid'])">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>


I think this should be:


<if condition="(can_moderate($thread['forumid']) AND $show['inlinemod'])">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>


or else the checkboxes will appear in the search results.

Rgds
Thanks. It was hard to remember what I changed and what I didn't as there's no easy way to diff between templates.

sv1cec
12-08-2004, 03:43 PM
Thanks. It was hard to remember what I changed and what I didn't as there's no easy way to diff between templates.
Don't worry, I know what you mean. And your hack touches 4-5 templates, mine deals with about 20 of them.

Rgds

rob_daemon
12-09-2004, 12:00 AM
Okay, the ZIP should now be all fixed with those two problems with the instructions and the .DS_Store files are now removed :).

sv1cec
12-09-2004, 11:43 AM
I am getting the following error when trying to merge two threads (IDs are: 1791 and 1793)

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1791 WHERE threadid IN (1793, 1791)
mysql error: Duplicate entry '1-1791' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 08:42:23 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

Any idea?

Rgds

rob_daemon
12-09-2004, 01:40 PM
Try this:

Find from in ./inlinemod.php:

case 'merge':

To the next 'break;' statement.

Replace all that with:

case 'merge':
if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))
{
print_no_permission();
}
if (!is_array($vars['threads']) OR count($vars['threads']) < 2)
{
eval(print_standard_error('error_invalidid'));
}

if (empty($_POST['do']))
{
define('PRINT_TPL', 'inline_merge_thread');
}
else
{
if ($_POST['title'])
{
toss_cookies();

$sqlthreads = implode(', ', $vars['threads']);

$firstpost = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");

// sort out poll crap
$threadsortdata = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "thread WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
$threadopen = 1;
$threadsticky = 0;
while ($threadsort = $DB_site->fetch_array($threadsortdata))
{
if (!$firstthread)
{
$firstthread = $threadsort['threadid'];
}
else
{
$mergethreads[] = $threadsort['threadid'];
}
if ($threadsort['pollid'])
{
eval(standard_error('The threads you specified to merge have a poll(s). You can not use inline moderation for this type of merge. Sorry!'));
}
if (!$threadsort['visible'] OR $threadsort['isdeleted'])
{
eval(standard_error('You can not merge invisible or deleted threads.'));
}

// if any thread is sticky or closed, then the new thread is
if ($threadsort['sticky'])
{
$threadsticky = 1;
}
if (!$threadsort['open'])
{
$threadopen = 0;
}

$votenum += $threadsort['votenum'];
$votetotal += $threadsort['votetotal'];
$views += $threadsort['views'];
$rebuildposts[] = $threadsort['firstpostid'];
}

$isqlthreads = implode(', ', $mergethreads);

// post updates...
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET threadid = $firstthread WHERE threadid IN ($sqlthreads)");

// set post parentids
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET parentid = $firstpost[postid] WHERE threadid = $firstthread AND postid <> $firstpost[postid] AND parentid IN (" . implode(', ', $rebuildposts) . ")");

// update new thread
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET title = '" . addslashes(htmlspecialchars_uni($_POST['title'])) . "', views = $views, open = $threadopen, sticky = $threadsticky, iconid = 0, votenum = $votenum, votetotal = $votetotal WHERE threadid = $firstthread");

// remove old threads
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "thread WHERE threadid IN ($isqlthreads)");

// thread ratings
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "threadrate WHERE threadid IN ($isqlthreads)");

// subscriptions
$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");

// lots-o-updating
foreach ($rebuildposts AS $postid)
{
delete_post_index($postid);
build_post_index($postid, $vars['forum']);
}

build_thread_counters($firstthread);
build_forum_counters($vars['forum']['forumid']);

$url = "showthread.php?$session[sessionurl]t=$firstthread&mod=1";
eval(print_standard_redirect('redirect_mergethread '));
}
else
{
eval(standard_error('You did not specify a title!'));
}
}
break;

I hope that fixes it. Let me know :).

sv1cec
12-09-2004, 02:17 PM
Try this:

Find from in ./inlinemod.php:

case 'merge':

To the next 'break;' statement.

Replace all that with:

case 'merge':
if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))
{
print_no_permission();
}
if (!is_array($vars['threads']) OR count($vars['threads']) < 2)
{
eval(print_standard_error('error_invalidid'));
}

if (empty($_POST['do']))
{
define('PRINT_TPL', 'inline_merge_thread');
}
else
{
if ($_POST['title'])
{
toss_cookies();

$sqlthreads = implode(', ', $vars['threads']);

$firstpost = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");

// sort out poll crap
$threadsortdata = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "thread WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
$threadopen = 1;
$threadsticky = 0;
while ($threadsort = $DB_site->fetch_array($threadsortdata))
{
if (!$firstthread)
{
$firstthread = $threadsort['threadid'];
}
else
{
$mergethreads[] = $threadsort['threadid'];
}
if ($threadsort['pollid'])
{
eval(standard_error('The threads you specified to merge have a poll(s). You can not use inline moderation for this type of merge. Sorry!'));
}
if (!$threadsort['visible'] OR $threadsort['isdeleted'])
{
eval(standard_error('You can not merge invisible or deleted threads.'));
}

// if any thread is sticky or closed, then the new thread is
if ($threadsort['sticky'])
{
$threadsticky = 1;
}
if (!$threadsort['open'])
{
$threadopen = 0;
}

$votenum += $threadsort['votenum'];
$votetotal += $threadsort['votetotal'];
$views += $threadsort['views'];
$rebuildposts[] = $threadsort['firstpostid'];
}

$isqlthreads = implode(', ', $mergethreads);

// post updates...
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET threadid = $firstthread WHERE threadid IN ($sqlthreads)");

// set post parentids
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET parentid = $firstpost[postid] WHERE threadid = $firstthread AND postid <> $firstpost[postid] AND parentid IN (" . implode(', ', $rebuildposts) . ")");

// update new thread
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET title = '" . addslashes(htmlspecialchars_uni($_POST['title'])) . "', views = $views, open = $threadopen, sticky = $threadsticky, iconid = 0, votenum = $votenum, votetotal = $votetotal WHERE threadid = $firstthread");

// remove old threads
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "thread WHERE threadid IN ($isqlthreads)");

// thread ratings
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "threadrate WHERE threadid IN ($isqlthreads)");

// subscriptions
$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");

// lots-o-updating
foreach ($rebuildposts AS $postid)
{
delete_post_index($postid);
build_post_index($postid, $vars['forum']);
}

build_thread_counters($firstthread);
build_forum_counters($vars['forum']['forumid']);

$url = "showthread.php?$session[sessionurl]t=$firstthread&mod=1";
eval(print_standard_redirect('redirect_mergethread '));
}
else
{
eval(standard_error('You did not specify a title!'));
}
}
break;

I hope that fixes it. Let me know :).
Sorry, this time the error message is:

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1799 WHERE threadid IN (1800)
mysql error: Duplicate entry '1-1799' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 11:16:10 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

rgds

rob_daemon
12-09-2004, 02:43 PM
Sorry, this time the error message is:

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1799 WHERE threadid IN (1800)
mysql error: Duplicate entry '1-1799' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 11:16:10 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

rgds
Honestly, I have on idea. Try finding:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");

Replace it with:

$subs = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "subscribethread WHERE threadid IN ($isqlthreads)");
while ($sub = $DB_site->fetch_array($subs))
{
$subthreads[] = $sub['subscribethread'];
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)");

sv1cec
12-09-2004, 02:59 PM
Honestly, I have on idea. Try finding:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");

Replace it with:

$subs = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "subscribethread WHERE threadid IN ($isqlthreads)");
while ($sub = $DB_site->fetch_array($subs))
{
$subthreads[] = $sub['subscribethread'];
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)");
Nope!

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 281 WHERE subscribethread IN (Array)
mysql error: Unknown column 'subscribethread' in 'where clause'

mysql error number: 1054

Date: Thursday 09th of December 2004 11:57:56 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

rob_daemon
12-09-2004, 03:07 PM
Nope!

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 281 WHERE subscribethread IN (Array)
mysql error: Unknown column 'subscribethread' in 'where clause'

mysql error number: 1054

Date: Thursday 09th of December 2004 11:57:56 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245
Replace

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)");

With:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");

And if that doesn't work, then just change:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");

To:

// $DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");

sv1cec
12-09-2004, 04:41 PM
Replace

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)");

With:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");

And if that doesn't work, then just change:

$DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");

To:

// $DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")");
Can you please check your code in inlinemod.php? for example:


case 'move':
if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))



case 'open':
if (!can_moderate($vars['forumid'], 'canopenclose'))


In the first case, you check for $threadinfo['forumid'] and in the second you check for vars['forumid']. I think the second is the correct, but should it be replaced in all thread-related cases?

sv1cec
12-09-2004, 05:20 PM
OK, here is the code I came up with, it is mostly based on the postings.php code, with some mods to make it suitable for more than two threads.


case 'merge':

if (!can_moderate($vars['forumid'], 'canmanagethreads'))
{
print_no_permission();
}
if (!is_array($vars['threads']))
{
eval(print_standard_error('error_invalidid'));
}
if (empty($_POST['do']))
{
define('PRINT_TPL', 'inline_merge_thread');
}
else
{
toss_cookies();

$sqlthreads = implode(', ', $vars['threads']);

$firstpost = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
$notes=$firstpost['notes'];
$thrd_firstpost=$firstpost['postid'];
$oldtitle=$firstpost['title'];
$notes=$firstpost['notes'];
$title=$_POST['title'];
$threadid=$firstpost['threadid'];
$newnotes = sprintf('Thread merged from other threads by %1$s on %2$s at %3$s via Moderation Tool.', $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$newnotes .= $notes;

if ($title=='')
{
$title=$oldtitle;
}

foreach ($vars['threads'] AS $mergethreadid)
{
if ($mergethreadid!=$threadid)
{
$mergethreadid = verify_id('thread', $mergethreadid);
$mergethreadinfo = fetch_threadinfo($mergethreadid);
$mergeforuminfo = fetch_foruminfo($mergethreadinfo['forumid']);

if (!$mergethreadinfo['visible'] OR $mergethreadinfo['isdeleted'] OR $mergethreadid == $threadid)
{
eval(print_standard_error('error_invalidid'));
}

// check forum permissions for the merge forum
$mergeforumperms = fetch_permissions($mergethreadinfo['forumid']);
if (!($mergeforumperms & CANVIEW) OR !can_moderate($mergethreadinfo['forumid'], 'canmanagethreads'))
{
print_no_permission();
}

// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($mergeforuminfo['forumid'], $mergeforuminfo['password']);
$mrgthrd_firstpost = $DB_site->query_first("
SELECT postid
FROM " . TABLE_PREFIX . "post
WHERE threadid = $mergethreadinfo[threadid]
ORDER BY dateline ASC
");

// sort out polls
$pollcode = '';
if ($mergethreadinfo['pollid'] != 0)
{ // merge thread has poll ...
if ($threadinfo['pollid'] == 0)
{ // ... and original thread doesn't
$pollcode = ',pollid = ' . $mergethreadinfo['pollid'];
}
else
{ // ... and original does
// if the poll isn't found anywhere else, delete the merge thread's poll
if (!$poll = $DB_site->query_first("
SELECT threadid
FROM " . TABLE_PREFIX . "thread
WHERE pollid = $mergethreadinfo[pollid] AND
threadid <> $mergethreadinfo[threadid]
"))
{
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "poll WHERE pollid = $mergethreadinfo[pollid]");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "pollvote WHERE pollid = $mergethreadinfo[pollid]");
}
}
}

// move posts
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET threadid = $threadid WHERE threadid = $mergethreadid");
$DB_site->query("UPDATE " . TABLE_PREFIX . "post SET parentid = $thrd_firstpost[postid] WHERE postid = $mrgthrd_firstpost[postid]"); // make merge thread child of first post in other thread
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET title = '" . addslashes(htmlspecialchars_uni($title)) . "'$pollcode WHERE threadid = $threadid");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "thread WHERE threadid = $mergethreadid");
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET pollid = $threadid WHERE open = 10 AND pollid = $mergethreadid"); // update redirects
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "threadrate WHERE threadid = $mergethreadid");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "subscribethread WHERE threadid = $mergethreadid");

// update postindex for the 2 posts who's titles may have changed (first post of each thread)
delete_post_index($thrd_firstpost['postid']);
delete_post_index($mrgthrd_firstpost['postid']);
build_post_index($thrd_firstpost['postid'] , $foruminfo);
build_post_index($mrgthrd_firstpost['postid'] , $foruminfo);

build_thread_counters($threadid);
build_forum_counters($threadinfo['forumid']);
if ($mergethreadinfo['forumid'] != $threadinfo['forumid'])
{
build_forum_counters($mergethreadinfo['forumid']);
}
}
}
if ($vars['forumid'])
{
$url = "forumdisplay.php?$session[sessionurl]f=$vars[forumid]&mod=1";
eval(print_standard_redirect('redirect_mergethread '));
}
}
break;


It works for me!

I just do not know what toss_cookies does!

Rgds

rob_daemon
12-10-2004, 04:49 AM
Tell me if the attached file fixes the bug, it should. If it does I'll release 1.2.1. By the way, the code you posted doesn't handle polls in two or more threads elegantly (which is why I chose to throw an error in this event), it doesn't update the parentid for all the merged threads, and other things for more than two threads. If you just merge two, it should work, but otherwise there will be a problem.

By the way, toss_cookies() is the first of two methods to remove the inline moderation cookies after an action.

sv1cec
12-10-2004, 05:23 AM
Tell me if the attached file fixes the bug, it should. If it does I'll release 1.2.1. By the way, the code you posted doesn't handle polls in two or more threads elegantly (which is why I chose to throw an error in this event), it doesn't update the parentid for all the merged threads, and other things for more than two threads. If you just merge two, it should work, but otherwise there will be a problem.

By the way, toss_cookies() is the first of two methods to remove the inline moderation cookies after an action.
Rob_daemon,

Yes, this file works fine. May I humbly suggest two improvements before you release next version? First, I would like to see a note attached at the merged thread saying "This thread was created by merging other threads, by ...., on ...., at ..... . I'll add that myself if you don't, but I think it is a worthwhile addition.

Second, you do not have to be so restrictive with the title of the new thread. What I would suggest is, to show the mod the title of the first thread you are merging, and allow him to change it, if he so wants. If he doesn't, then you can use the original, first thread title, as the title for the new merged thread.

Finally, since merging two threads can result in a new thread, whose placement needs to be changed (moved to a different forum), why don't you add the forum selection in the template form, and if the user selects a different forum, from the one in which the initial threads were, then move the new, merged thread to the new forum. In that way, the mod does not have to do a merge and then do a move.

Just a couple of thoughts.

One more thing I just found out, although I am not sure if you can do something about it. I have installed another hack, which shows me which members have seen a thread. It looks as if after the merging, that information is lost, since in the merged thread, it only shows me, as having seen it. I think it should show all members who have seen all merged threads. A pain? Yeah, I guess you are right. I'll see if I can do something about this.

By the way, this is one of the most useful hacks I've seen, thank you Sir.

Rgds

rob_daemon
12-10-2004, 03:26 PM
Glad that finally fixed :).

I do plan to add logging to all of the inline actions; I do it for a few right now, but I want to add it in for all as well as cleaning up the entire system.

Also in 1.2.1 there will be a small change to the inline_merge_thread template that will set the default title.

Adding a move thread in the merge screen could be a possibility. I'll see about adding that in either 1.2.1 or the next version.

As far as that hack, wherever the hack is storing read information, the table probably needs to be updated to change all the old threadid's to the new ones.

sv1cec
12-10-2004, 04:37 PM
Glad that finally fixed :).

I do plan to add logging to all of the inline actions; I do it for a few right now, but I want to add it in for all as well as cleaning up the entire system.

Also in 1.2.1 there will be a small change to the inline_merge_thread template that will set the default title.

Adding a move thread in the merge screen could be a possibility. I'll see about adding that in either 1.2.1 or the next version.

As far as that hack, wherever the hack is storing read information, the table probably needs to be updated to change all the old threadid's to the new ones.
I have changed the merge_thread template and the code, to do a merging and a move. I also edit it so that it shows the user the title of the first thread, and if he doesn't change it, the merged thread uses that title instead. If you want, I can send you my code.

I also added the remove thread functionality, to show up in the menu only for admins. Admitedly it's a risk, but it's quite useful for cleaning up the forums sometimes.

Rgds
----------
John

dndog
12-11-2004, 02:41 PM
I don't understand, but the inline moderation tools work horridly at my site.

They often deny users with permission the ability to use them. The users are in the registered user group, but they have moderator abilities.

In IE, they cause a "script error, debug" message which pops up on each page where they are.

I am currently using vB3.0.1.

Any fix I can do for this?

rob_daemon
12-11-2004, 06:21 PM
I don't understand, but the inline moderation tools work horridly at my site.

They often deny users with permission the ability to use them. The users are in the registered user group, but they have moderator abilities.

In IE, they cause a "script error, debug" message which pops up on each page where they are.

I am currently using vB3.0.1.

Any fix I can do for this?
What version of the inline moderation tools are you using? If you're not using at least 1.2.0 you should upgrade which will fix all of the javascript errors and other problems.

WebMasterAJ
12-11-2004, 08:12 PM
Thanks for that first fix... but I have some good news and some bad news.

It now displays the drop down menu for my, however, there are no check boxes in the forum display and posts. It just displays a black cell in the forum display...

Any ideas?

Thanks again for your time and energy!

Sincerely,
Andrew Tatum

rob_daemon
12-11-2004, 08:44 PM
Thanks for finding this. This is a small bug. In the instructions for the threadbit template, use the following:

Find:

</tr>

Add before:

<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>

Edit: ZIP package updated and link to this post added

aab
12-12-2004, 12:04 AM
help me please...

Invalid inline moderation items specified. If you followed a valid link, please notify the webmaster

rob_daemon
12-12-2004, 05:36 AM
I need more information than that. What exactly did you do to reach that error?

aab
12-12-2004, 09:36 AM
i can a little speak english,

i applyed your inline Moderation tools.

but dont work. please help me,

best regards.

rob_daemon
12-12-2004, 09:42 AM
i can a little speak english,

i applyed your inline Moderation tools.

but dont work. please help me,

best regards.
You need to select the check boxes in each post to perform the actions on it.

aab
12-12-2004, 05:02 PM
i am sorry , thank you very much rob daemon.

dndog
12-12-2004, 05:15 PM
What version of the inline moderation tools are you using? If you're not using at least 1.2.0 you should upgrade which will fix all of the javascript errors and other problems.

I am not sure which version I am running.

Is there anyway I can find out? :ermm:

rob_daemon
12-12-2004, 05:58 PM
I am not sure which version I am running.

Is there anyway I can find out? :ermm:
Open inlinemod.php and look at the top. It will have the version number there.

Delphiprogrammi
12-13-2004, 09:59 AM
hi,

nice mode thanks dude working fine

Delphiprogrammi
12-13-2004, 11:11 AM
while testing some stuff with your mod i get permission denied page when i try to close a thread

permission denied is impossible because i am logged in on my administrator account wich has more rights then a moderator so ????

Revan
12-13-2004, 11:14 AM
(Wed Dec 11 15:26:30 PDT 2004)
Erm by which calendar is this? :rolleyes:

Upgrading to newest version now :)

rob_daemon
12-13-2004, 02:01 PM
while testing some stuff with your mod i get permission denied page when i try to close a thread

permission denied is impossible because i am logged in on my administrator account wich has more rights then a moderator so ????
Odd... does the forum have special permissions? Also does the "Go" button have a number of selected items on it? The no permission can be thrown in the following events:

- You don't have any moderator permissions
- There is no forumid (caused by search results or not having the proper cookie set)
- You don't have permission to close threads

Not sure why this would be happening...

Revan: Type "date" in a UNIX shell and that's the date that comes out. And my ZIP packager is just a shell script, so that's how that date is formed ;).

Delphiprogrammi
12-13-2004, 04:27 PM
hi,

now it works only if you enable that redirection messages the wrong template is shown but that isn't that worse mean thing is the stuff is working

Zachariah
12-14-2004, 02:52 AM
rob_daemon - damb sexy sir.
How about a hard del option w/ soft del.

I don't even use soft del in windows OS. :D (disable) ahahha

rob_daemon
12-14-2004, 04:18 AM
Delphiprogrammi: I'll resolve this for the next update.

Harry: I've considered a hard delete in the past but it wasn't added in because you could accidentally hit the wrong button. I may add it in the future, though.

Zachariah
12-14-2004, 04:47 PM
Delphiprogrammi: I'll resolve this for the next update.

Harry: I've considered a hard delete in the past but it wasn't added in because you could accidentally hit the wrong button. I may add it in the future, though.


Thats an easy fix. Warning popup "ARE YOU SURE YOU WANT TO DEL"
Yes (button) / No (button)

Just thoughts.

dndog
12-14-2004, 08:16 PM
Open inlinemod.php and look at the top. It will have the version number there.

Thanks so much. I got it working.

-dndog

IC-Games
12-15-2004, 01:52 PM
WOHOO! Exactly what I wanted

I love you :D

rob_daemon
12-15-2004, 06:16 PM
Glad you like it :).

Don't forget to click install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=68791)!

trackpads
12-17-2004, 11:08 PM
Hi,

For some reason I am getting the No permissions page when I try to move threads. I am logged on as an admin and even made myself the mod of those forums but no luck.

Any ideas?

Thanks again for the help,

-Jason

Delphiprogrammi
12-18-2004, 07:34 PM
you could add a "check all" "uncheck all" link to the bottom of those checkboxes just an idea i have but i don't wanna steel somebody elses work so i tell you here ;) this can be done quite easly with javascript

IC-Games
12-20-2004, 12:09 AM
* IC-Games clicks install

sorry about that :)

red_baron2000
12-23-2004, 10:24 AM
thanks "rob_daemon" for this great hack..however whenever i want to move or delete etc some posts i get this error message i am admins tho: any idea?

thanking you in advance :)

trackpads
12-23-2004, 01:40 PM
Hi,

For some reason I am getting the No permissions page when I try to move threads. I am logged on as an admin and even made myself the mod of those forums but no luck.

Any ideas?

Thanks again for the help,

-Jason


*bump* please!

rob_daemon
12-23-2004, 03:18 PM
red_barron2000: this could be caused by the inline moderation cookie expiring. Does this happen every time or only after a certain period of time. Also if you visit another forum or thread while you're selecting inline moderation items, the selected item information will be over-written.

trackpads: I don't know why this would be happening. I took a look at the permissions in the code and all of them appear to be set fine.

trackpads
12-24-2004, 03:18 AM
red_barron2000: this could be caused by the inline moderation cookie expiring. Does this happen every time or only after a certain period of time. Also if you visit another forum or thread while you're selecting inline moderation items, the selected item information will be over-written.

trackpads: I don't know why this would be happening. I took a look at the permissions in the code and all of them appear to be set fine.
As funny as this sounds it was working fine until I upgraded :)

Tonight I comletely removed it and then reinstalled it and still had the same problem. I then opened the 1.1.0 version and uploaded just the inlinemod.php and now it is working fine.

Any ideas?

Thanks again,

-Jason

rob_daemon
12-24-2004, 03:28 AM
Try this:

Upload inlinemod.php from 1.2.1 and find:

if (!can_moderate($vars['forumid'], 'canmanagethreads'))

Replace it with:

if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))

trackpads
12-24-2004, 03:51 AM
Try this:

Upload inlinemod.php from 1.2.1 and find:

if (!can_moderate($vars['forumid'], 'canmanagethreads'))

Replace it with:

if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))
No luck. There were 5 occurances in that file of that string and I replaced them all.

Thanks again,

-Jason

Jmonto
12-27-2004, 11:32 PM
how can i make it so administrators can use this function without adding themselves to every forum as a mod?

rob_daemon
12-27-2004, 11:51 PM
Administrators should be able to use it if they are marked as "Super Moderators" in the usergroup management screen.

Jmonto
12-27-2004, 11:53 PM
thanks for the quick reply...very nice hack by the way

YLP1
12-28-2004, 11:25 PM
Hi everyone...I am using the lastest version of this mod (I updated it today)...I have gone through every code change three times, confirmed that admins and mods are at super moderator status yet when I (the main admin) attempt to use any of the inline mod functions I receive this:

Robin, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation

Where did I go wrong?

theArchitect
12-29-2004, 11:29 PM
It is working on my old board fine. But I have just installed it on a new board and the tools are working ok in postbit but not in threadbit.

In threadbit I don't see any check boxes nor can I see the Forum column either.

Any thoughts?

Zachariah
01-04-2005, 03:22 AM
Be nice to add the "check box" and inline mod tool to search.php page. EX: If a search for a "term" and get a result it would be nice to check a load of treads and move it ect ...

Prob just a few template edits.

rob_daemon
01-04-2005, 05:38 AM
Be nice to add the "check box" and inline mod tool to search.php page. EX: If a search for a "term" and get a result it would be nice to check a load of treads and move it ect ...

Prob just a few template edits.
If you look back the thread a few pages, I added this in an earlier version but I removed it due to security issues. There's no easy way to check permissions for each thread unless you want to query each thread/forum permission that you have selected, which I decided against.

Zachariah
01-04-2005, 12:49 PM
If you look back the thread a few pages, I added this in an earlier version but I removed it due to security issues. There's no easy way to check permissions for each thread unless you want to query each thread/forum permission that you have selected, which I decided against.


Cool I'll take a look back.

I edited your script for my needs.

find: can_moderate($foruminfo['forumid'])
replace: $bbuserinfo['userid'] == 1

In all template edits. I'll read a little bit and make it to only usergroups x,x,x

Nick0r
01-15-2005, 07:49 PM
Really Really nice hack.... there should be a physical delete option though, or if not, maybe a "if the thread is already soft deleted and delete is selected again, phsyically delete it"

MaTraX
02-05-2005, 03:37 AM
Hi
I`m getting e-mails with problem:

Invalid SQL: DELETE FROM post_parsed WHERE postid IN (82305, 81448)
mysql error: Table 'matrax.post_parsed' doesn't exist

mysql error number: 1146

Date: Saturday 05th of February 2005 12:51:23 AM
Script: http://www.matrax.net/forum/inlinemod.php
Referer: http://www.matrax.net/forum/inlinemod.php
In the install instruction there isn`t anythin about creating some tables..
Could you help me?

Thank you in advance

Slybone
02-05-2005, 01:39 PM
I considered hard delete but that could be a problem if you accidentally selected the wrong option.

Well couldn't you just post a modification for it so the people that want it in there can get it?

rob_daemon
02-05-2005, 04:27 PM
Hi
I`m getting e-mails with problem:

Invalid SQL: DELETE FROM post_parsed WHERE postid IN (82305, 81448)
mysql error: Table 'matrax.post_parsed' doesn't exist

mysql error number: 1146

Date: Saturday 05th of February 2005 12:51:23 AM
Script: http://www.matrax.net/forum/inlinemod.php
Referer: http://www.matrax.net/forum/inlinemod.php
In the install instruction there isn`t anythin about creating some tables..
Could you help me?

Thank you in advance
Have you modified your database in any way? The post_parsed table is a default table in vBulletin and should be there. Check in phpMyAdmin that it is.

Well couldn't you just post a modification for it so the people that want it in there can get it?

It's in the next version :).

Slybone
02-05-2005, 05:21 PM
It's in the next version :).

Beautiful, May I just add that this hack makes moderating my forum 10 times easier.

* Slybone Clicks install

Vevina
02-17-2005, 03:01 PM
Installed this but ... the inline moderation toolbar is not displaying :( what did i do wrong?

epic1
02-17-2005, 11:48 PM
This hack is great, thanks. Only questions I have so far....

1) It seems as if I can't do anything with inline moderation when I'm actually in a post and the three options are listed. Are checkboxes supposed to be showing by each post? Not sure, just seems like nothing functions. However, on forum homes, things like making posts stickies work like a charm.

I'm talking about how when you click through to each thread you have:
Merge Posts
Soft Delete Posts
Split Posts

How do I make those function?

MaTraX
02-18-2005, 04:50 AM
@rob_daemon - It`s everything ok. now.. I just didn`t have the proper prefix in the inlinemod.php file : There was standard post_parsed and I have v3_post_parsed :) After changing this it`s working great.

Btw.
What I have to do to remove posts physically and not only soft? It`s pretty important for me. Thank you in advance for help

rob_daemon
02-20-2005, 06:15 PM
Installed this but ... the inline moderation toolbar is not displaying what did i do wrong?

Are you sure you have added the toolbars to the SHOWTHREAD and FORUMDISPLAY templates? Also that you added the small global.php hack?

This hack is great, thanks. Only questions I have so far....

1) It seems as if I can't do anything with inline moderation when I'm actually in a post and the three options are listed. Are checkboxes supposed to be showing by each post? Not sure, just seems like nothing functions. However, on forum homes, things like making posts stickies work like a charm.

I'm talking about how when you click through to each thread you have:
Merge Posts
Soft Delete Posts
Split Posts

How do I make those function?

Do you have the inline moderation toolbar at the bottom?

@rob_daemon - It`s everything ok. now.. I just didn`t have the proper prefix in the inlinemod.php file : There was standard post_parsed and I have v3_post_parsed After changing this it`s working great.

Btw.
What I have to do to remove posts physically and not only soft? It`s pretty important for me. Thank you in advance for help

You're right about the improper query prefix. I've fixed this in SVN.

And the physical delete stuff will be in the next version.

epic1
02-21-2005, 05:15 AM
Do you have the inline moderation toolbar at the bottom?


Yep I do! It seems on the old-school postbit legacy the checkboxes show up fine on individual postbits. However, on the vertical display, no checkboxes are showing next to the posts.

rob_daemon
02-21-2005, 05:18 AM
You need to then reapply the modification instructions for the postbit template. You don't have it there, only on the postbit_legacy one.

epic1
02-21-2005, 02:23 PM
Yep I feel like an idiot. :D Just must have read over it since that was the only instruction that combined two templates.

Thanks for the assistance - awesome code. I wish this was included with vBulletin to begin with!

msimplay
02-21-2005, 06:51 PM
works well i installed today

YLP1
03-08-2005, 08:46 PM
UGGHHHHH I updated my vb version to 3.0.7 and the inline quit working. So I completely uninstalled and reinstalled and double checked the modifications and I continue to get this error when trying to use any of the three options like split post

I am too young to get all this gray hair...can someone lend me an eye and advise me on how to get this working. I would greatly appreciate (so will my hair)

Here is the error:
Invalid inline moderation items specified. If you followed a valid link, please notify the webmaster

rob_daemon
03-09-2005, 04:44 AM
Are you viewing multiple threads or forums at the same time as selecting items for moderation?

YLP1
03-09-2005, 01:55 PM
I only have one window open meaning I am only viewing a single topic and am trying to split some of the posts out of the topic (using the check marks). I noticed that the "go" button doesn't show the number of boxes checked like it did before.

kcadd
03-09-2005, 04:55 PM
* kcadd clicks install :D

rob_daemon
03-09-2005, 09:54 PM
I only have one window open meaning I am only viewing a single topic and am trying to split some of the posts out of the topic (using the check marks). I noticed that the "go" button doesn't show the number of boxes checked like it did before.
This means the system isn't being initialized. If it doesn't read "Go (0)" when the page is fully loaded, then there's something wrong with the templates or you don't have the JavaScript file uploaded. Check to make sure that the HTML of threads and forums link to the inline_moderation.js file and that the file actually exists.

YLP1
03-09-2005, 11:52 PM
This means the system isn't being initialized. If it doesn't read "Go (0)" when the page is fully loaded, then there's something wrong with the templates or you don't have the JavaScript file uploaded. Check to make sure that the HTML of threads and forums link to the inline_moderation.js file and that the file actually exists.

Ok I double checked that and all appears the way it should. Here is more info....

This problem is occuring ONLY when try to moderate individual posts:

In the first graphic example, I have checked 4 posts that I want to split from this topic and see the inline mod tools GO button has no (#) on it.

But the Inline Mod is working for the actual topics:

In the 2nd graphic example, the GO button has the correct amount of topics that I checked and allows me to pick a choice from the dropdown.

I don't know what I've done wrong but this Mod has been a really good time saver and I am lost without it any help is greatly appreciated.

Robin

rob_daemon
03-09-2005, 11:57 PM
Can you post in HTML tags the HTML source of a thread page. I'm at a loss as to why this doesn't work.

YLP1
03-10-2005, 01:23 AM
Can you post in HTML tags the HTML source of a thread page. I'm at a loss as to why this doesn't work.

Here is the html from this page: http://www.yourlincolnpark.com/LPSForum/showthread.php?t=4415



<body>


<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('Are you sure you want to log out?'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

<br />

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="2" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">

<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1)"><img src="argon/misc/navbits_start.gif" alt="Go Back" border="0" /></a></td>
<td>&nbsp;</td>
<td width="100%"><span class="navbar"><a href="lpsforum.php?" accesskey="1">Your Lincoln Park Community Forums - Where YOU have a VOICE!</a></span>
<span class="navbar">&gt; <a href="forumdisplay.php?f=17">GENERAL COMMUNITY FORUMS</a></span>
<span class="navbar">&gt; <a href="forumdisplay.php?f=26">Teen Chat</a></span>
</td></tr><tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="/LPSForum/showthread.php?t=4415"><img class="inlineimg" src="argon/misc/navbits_finallink.gif" alt="Reload this Page" border="0" /></a> <strong>
Minimum wage for teenagers

</strong></td></tr></table></td>
<td valign="top" nowrap="nowrap" class="alt2">
<div class="smallfont">
<!--<span style="float:right">[<a href="login.php?do=logout&amp;u=1" onclick="return log_out()">Log<br/>Out</a>]</span>-->
<strong>Welcome, Robin.</strong><br />
You last visited: 03-04-05 at <span class="time">7:32 pm</span>
<br /><a href="private.php?">Private Messages</a>: 0 Unread, Total 225.<br />There have been 166 topics & 1271 posts since your last visit!</div></td>
</tr></table><!-- / breadcrumb, login, pm info -->

<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="2" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<tr align="center">
<!--<td class="vbmenu_control"><a href="lpsforum.php?">Main</a></td>-->
<td class="vbmenu_control"><a href="radio.php?">YLP</br>JukeBox</a></td>
<td id="navbar_activetopics" class="vbmenu_control">
<a href="search.php?&do=getdaily&days=1">Active &nbsp;&nbsp;&nbsp;<br/>Topics</a>
<script type="text/javascript">
vbmenu_register("navbar_activetopics");
</script>
</td>

<td class="vbmenu_control"><a href="shop.php?" accesskey="5">YLP</br> Store</a></td>

<td class="vbmenu_control"><a href="arcade.php?">Arcade</a></td>
<td class="vbmenu_control"><a href="http://www.yourlincolnpark.com/lpsforum/lpsforum.php">Go to<br/> Forums</a></td>
<td class="vbmenu_control"><a href="usercp.php?">Profile</a></td>
<td class="vbmenu_control"><a href="register.php?">Register</a></td>
<td class="vbmenu_control"><a href="faq.php?" accesskey="5">FAQ</a></td>
<td class="vbmenu_control"><a href="search.php?do=getnew" accesskey="2">Newest<br/> Posts</a></td>
<td id="navbar_search" class="vbmenu_control"><a href="search.php?" accesskey="4">Search</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
<td id="usercptools" class="vbmenu_control"><a href="#usercptools">Quick&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>Links</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
<td class="vbmenu_control"><a href="login.php?do=logout&amp;u=1" onclick="return log_out()">Log<br/>Out</a></td>
</tr></table>
</div>
<!-- / nav buttons bar --><br /><br />
<!-- NAVBAR POPUP MENUS --><div class="vbmenu_popup" id="navbar_activetopics_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr> <td class="thead">Active<br/> Topics</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?&do=getdaily&days=1">Today</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?&do=getdaily&days=2">Last 2 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?&do=getdaily&days=3">Last 3 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?&do=getdaily&days=4">Last 4 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?&do=getdaily&days=5">Last 5 Days</a></td>
</tr>
</table>
</div>

<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Search YLP Forums</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="text" class="bginput" name="query" size="20" /><!-- go button -->
<input type="submit" class="button" value="Go" /><br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?" accesskey="4">Advanced Search</a></td>
</tr><tr>
<td class="vbmenu_option"><a href="post_thanks.php?do=findallthanks">Find All Thanked Posts</a></td>
</tr>
<tr>
<td class="thead">Arcade Game Search</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="arcade.php" method="post">
<input type="text" class="bginput" name="search" size="20" /><!-- go button -->
<input type="submit" class="button" value="Go" /><br />
</form>
</td>
</tr>


</table>
</div>
<!-- / header quick search form -->



<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">Quick&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>Links</td></tr> <tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/lpsforum/lpforum.php">Go to<br/> Forums</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://yourlincolnpark.com/lpsforum/index.php">Forum Directory</a></td></tr>

<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com">YLP<br/> Home</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/product_1.asp">What's New?</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://yourlincolnpark.com/cgi-bin/citycal/calendar.cgi">City Events</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/city_dept_contact_numbers.asp">City Dept Directory</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/council_minutes_download.asp">Council Minutes</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.amlegal.com/Lincoln_Park_mi">City Ordinances</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/lincoln_park_polls.asp">Community Polls</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/lp_picture_gallery.asp">Photo Gallery</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/lp_sponsors.asp">Sponsors & Volunteers</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/classifieds/classifieds.cgi">Free Ads</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/reference.asp">Reference Section</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://cityoflincolnparkmi.com/YellowPages1">Yellow Pages</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yourlincolnpark.com/html/joseph_lyson_jr.asp">In Memory Of</a></td></tr>

<tr><td class="vbmenu_option"><a href="search.php?do=getnew">Newest<br/> Posts</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?do=markread">Mark Forums Read</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?do=buddylist&amp;focus=1','buddy list','statusbar=no,menubar=no,toolbar=no,scrollba rs=yes,resizable=yes,width=250,height=300'); return false;">Open Buddy List</a></td></tr>
<tr><td class="thead"><a href="usercp.php?">User Control Panel</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?do=editsignature">Edit Signature</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?do=editavatar">Edit Avatar</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?do=editprofile">Edit Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?do=editoptions">Edit Options</a></td></tr>
<tr><td class="thead">Miscellaneous</td></tr>
<tr><td class="vbmenu_option"><a href="private.php?">Private Messages</a></td></tr>
<tr><td class="vbmenu_option"><a href="subscription.php?">Subscribed Topics</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?u=1">My Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="online.php?">Who's Online</a></td></tr>
<tr><td class="vbmenu_option"><a href="composeexternal.php?">Generate JS</a></td></tr> </table> </div> <!-- / user cp tools menu -->
<!-- / NAVBAR POPUP MENUS --><table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<td valign="top">&nbsp;&nbsp;<div align="left"><h3>Minimum wage for teenagers</h3></div> <a name="poststop" id="poststop"></a><!-- controls above postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom"><td class="smallfont"><a href="newreply.php?do=newreply&amp;noquote=1&amp;p=46083"><img src="argon/buttons/reply.gif" alt="Reply" border="0" /></a></td><td align="right"><div class="pagenav" align="right">
<table class="tborder" cellpadding="3" cellspacing="1" border="0">
<tr> <td class="vbmenu_control" style="font-weight:normal"><!--<img src="argon/misc/multipage.gif" alt="Showing results 1 to 8 of 19 (3 pages)" /> -->Page 1 of 3</td><td class="alt2"><span class="smallfont" title="Showing results 1 to 8 of 19"><strong>1</strong></span></td>
<td class="alt1"><a class="smallfont" href="showthread.php?t=4415&amp;page=2&amp;pp=8" title="Show results 9 to 16 of 19">2</a></td>
<td class="alt1"><a class="smallfont" href="showthread.php?t=4415&amp;page=3&amp;pp=8" title="Show results 17 to 19 of 19">3</a></td>
<td class="alt1"><a class="smallfont" href="showthread.php?t=4415&amp;page=2&amp;pp=8" title="Next Page - Results 9 to 16 of 19">&gt;</a></td>
</tr></table></div></td></tr>
</table>
<!-- / controls above postbits -->

<!-- toolbar -->
<table class="tborder" cellpadding="2" cellspacing="1" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">
<div class="smallfont"><a href="#post46083"><img class="inlineimg" src="argon/buttons/firstnew.gif" alt="View First Unread" border="0" /></a> <a href="#post46083"><strong>View First Unread</strong></a>&nbsp;</div>
</td> <td class="vbmenu_control" id="threadtools"><a href="#goto_threadtools" accesskey="3">Topic Tools</a>
<script type="text/javascript"> vbmenu_register("threadtools"); </script>
</td><td class="vbmenu_control" id="threadsearch"><a href="#goto_threadsearch">Search this Topic</a>
<script type="text/javascript"> vbmenu_register("threadsearch"); </script></td><td class="vbmenu_control" id="threadrating"><a href="#goto_threadrating">Rate Topic</a>
<script type="text/javascript"> vbmenu_register("threadrating"); </script>
</td><td class="vbmenu_control" id="displaymodes">
<a href="#goto_displaymodes">Display Modes</a><script type="text/javascript"> vbmenu_register("displaymodes"); </script>
</td></tr>
</table><!-- / toolbar --><!-- end content table --> </div>
</div></div><!-- / close content container -->
<!-- / end content table --><div id="posts"><!-- post #46083 --><!-- open content container --> <div align="center"><div class="page" style="width:100%; text-align:left"><div style="padding:0px 3px 0px 3px">
<div style="padding:0px 0px 2px 0px"><!-- this is not the last post shown on the page --> <table class="tborder" id="post46083" cellpadding="2" cellspacing="1" border="0" width="100%" align="center">
<tr><td class="thead" ><div class="normal" style="float:right">&nbsp;#<a href="showpost.php?p=46083&amp;postcount=1" target="new"><strong>1</strong></a><a href="#" onclick="return reputation(46083)"><img class="inlineimg" src="argon/buttons/reputation.gif" alt="Add to Mr Magoo's Reputation" border="0" /></a> &nbsp;<a href="report.php?p=46083"><img class="inlineimg" src="argon/buttons/report.gif" alt="Report Bad Post" border="0" /></a> &nbsp;<a href="postings.php?do=getip&amp;p=46083"><img class="inlineimg" src="argon/buttons/ip.gif" alt="IP" title="207.74.195.249" border="0" /></a>
</else><input type="checkbox" id="inlinemod_46083" name="inlinemod_46083" value="1" onclick="select_item(46083, this);" /></div><div class="normal">
<!-- status icon and date --><a name="post46083"><img class="inlineimg" src="argon/statusicon/post_new.gif" alt="Unread" border="0" /></a>03-09-05, 4:12 pm<a name="newpost"></a><!-- / status icon and date --></div>
</td>
</tr>
<tr><td class="alt2" style="padding:0px">
<!-- user info --><table cellpadding="0" cellspacing="2" border="0" width="100%">
<tr><td class="alt2"><a href="member.php?u=13"><img src="customavatars/avatar13_1.gif" alt="Mr Magoo's Avatar" border="0" /></a></td><br /><td nowrap="nowrap"><div id="postmenu_46083"><a class="bigusername" href="member.php?u=13"><B>Mr Magoo</b></a><img class="inlineimg" src="argon/statusicon/user_offline.gif" alt="Mr Magoo is offline" border="0" />
<script type="text/javascript"> vbmenu_register("postmenu_46083", true); </script>
</div><div class="smallfont">Taxpayer Friend</div>
<div id="postmenu_arcade_46083"><script type="text/javascript"> vbmenu_register("postmenu_arcade_46083", true); </script>
<u><b>Arcade Info</b></u></div>
</td><td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap"><div class="smallfont">
<div>Join Date: Jan 2004</div><div>Posts/Thanks: 757/0
<br>Thanked 18 Times in 14 Posts </div><div><img class="inlineimg" src="argon/reputation/reputation_pos.gif" alt="Mr Magoo is making fast friends" border="0" /><img class="inlineimg" src="argon/reputation/reputation_pos.gif" alt="Mr Magoo is making fast friends" border="0" /></div><div> </div></div></td></tr></table>
<!-- / user info --></td>
</tr>
<tr><td class="alt1"><br /><!-- message, attachments, sig --><!-- icon and title --><div class="smallfont"><strong>Minimum wage for teenagers</strong>
</div><hr size="1" style="color:#D3C3A6" /><!-- / icon and title -->
<!-- message --><div>There has been a lot of discussion recently about raising the minimum wage (which I am entirely against)<br />
<br />But a few years ago, many business owners, (fast food and such) were asking for a minimum wage for teenagers. They pointed out the work ethic just wasn't there yet and these kids didn't quite deserve minimum wage. They were asking for a special minimum wage for teens.<br />
<br />
I think this is a Cracker Jack idea. I know the teen members of this forum will be jumping on me, but that is fine. I think with my head, not my emotions.<br /><br />
Take for example the cashiers at the fast food places. How many times have they charged me for a regular coffee rather than a senior coffee. They then have to figure out in their head how much to reimburse me. You would think they were trying to figure out how to send a man to the moon.<br />
<br />By being able to pay less to their teenage employees, the employers would be able to hire more teens. Rather than one person trying to do so much, they could have a bigger crew. By having a job, we have less kids on the street letting air out of tires and knocking my mailbox off its stand.<br />
I thank you.</div>
<!-- / message -->
<!-- sig -->
<div>__________________<br /><b><font size="3">Councilman Mario DiSanto in 05, Unbought and Unbossed. VOTE!!</font></b></div><!-- / sig -->
<br />
<div align="right">
<!-- controls -->
<!-- post thank you hack -->
<a href="post_thanks.php?do=post_thanks&p=46083"><img src="argon/buttons/post_thanks.gif" alt="Thanks" border="0" ></a>
<!-- end post thank you hack --><a href="editpost.php?do=editpost&amp;p=46083"><img src="argon/buttons/edit.gif" alt="Edit/Delete Message" border="0" /></a> <a href="newreply.php?do=newreply&amp;p=46083"><img src="argon/buttons/quote.gif" alt="Reply With Quote" border="0" /></a><a href="newreply.php?do=newreply&amp;p=46083" onclick="return qr(46083);"><img src="argon/buttons/quickreply.gif" alt="Quick reply to this message" border="0" /></a><!-- / controls --></div>

<!-- message, attachments, sig -->
</td></tr></table>
</td>
</tr>

</tbody>
</table>

I'm not sure if the above is what you wanted....I cut out all but a few of the actual posts on the page.

Thanks again for your help.

rob_daemon
03-10-2005, 01:51 AM
I need the code from the whole page, from <html> to </html> to troubleshoot the problem completely. Also if you can use the BBCode tags, that'd be helpful, too :).

YLP1
03-10-2005, 03:00 AM
Here is the whole code and thank you for all your help on this.

The file size is to big to post html to /html ......I'm not sure how to get this source code to you except that one can view the source of the actual page from the link http://www.yourlincolnpark.com/LPSF...read.php?t=4415.

Let me know how I can send you the source code.

Thanks again for all your help.

rob_daemon
03-10-2005, 03:07 AM
I need to be able to see what a moderator sees to analyze the page. Can you copy the source code and just stick it in a .TXT and attach it?

YLP1
03-10-2005, 03:52 AM
Ok dokey.....here ya go....doh, why didn't I think of putting it in a txt and attaching! LOL

Told ya I was going nuts over this LOL LOL

rob_daemon
03-10-2005, 04:38 AM
Exactly what I needed :).

It appears that the SHOWTHREAD template has not been modified. The <body> onload attribute is not present for inline_init() and there is no JavaScript link to the inline moderation functions. Try redownloading the install instructions and following the ones for the SHOWTHREAD template.

YLP1
03-10-2005, 12:39 PM
Exactly what I needed :).

It appears that the SHOWTHREAD template has not been modified. The <body> onload attribute is not present for inline_init() and there is no JavaScript link to the inline moderation functions. Try redownloading the install instructions and following the ones for the SHOWTHREAD template.


Is this the code that is missing from the showthread template?
<body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if>$onload">

I went through all the styles and reapplied the showthread modifications and had the same results.

I then completely removed this inline from all styles, etc. and then reapplied ..... and I have the same results...the inline doesn't work for the posts but it works for the topics.

Any ideas?

rob_daemon
03-11-2005, 04:06 AM
Yes, that is missing. But you're also missing:

<script type="text/javascript" src="clientscript/inline_moderation.js"></script>

Try creating a fresh new style and reapplying all the template modifications to see if that works.

YLP1
03-12-2005, 06:10 PM
I am reinstalling the mod because I couldn't get it to work.

I am using the Inline Moderation vers 1.2.1 on vB3.0.7.

I am on the part of adding code to the threadbit in my templates:

<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>

Each time I try to add it I get this template error:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected '"', expecting ']' in c:\myISP\LPSForum\includes\adminfunctions_template .php(3096) : eval()'d code on line 66

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

This is what the last few lines of code that my template shows:

<if condition="$show['forumlink']">
<td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
</if>
</if>
</if>
</if><if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
</if>
</tr>

Can someone tell me what I need to change to fix this?

honestjohn
03-15-2005, 12:39 AM
I've got what seems like a simple error, but I'm trying to tag where it's coming from.

If I try to moderate a thread, I get a "you do not have permission" page - but when performing a close, it actually soft deletes every post in the thread.

If I try to moderate posts, I get a "No Thread specified" message, but it soft deletes the posts.

Any idea what's going on?
Otherwise excellent mod idea, probably the one thing I missed the MOST moving from phpbb.

honestjohn
03-15-2005, 07:25 PM
Re: Above

It's basically throwing permissions errors for every action, although it also has odd consequences.
I'm going through the thread, and I see a few people with the same problem. Any idea what might be causing it? Possibly custom permissions that are a bit too far off from the stock setup?

I'll try to install it on a stock board, and see if perhaps it was that, but I don't see why permissions should be a problem, as other mods use them without a hitch...

I've tested all permutations of permissions, nothing happening.
I suppose I will go through the code and try to figure out why it's throwing all these errors (but performing the action, sometimes).

rob_daemon
03-16-2005, 12:00 AM
I have no idea what would be causing random things to happen. What version of PHP do you have and do you have register_globals on?

honestjohn
03-16-2005, 12:57 AM
4.3.10 GLOBALS on 3.0.7 vb install - a few mods, but nothing drastic and nothing I beleive yould be interefering.

It looks fundamentally like some of the permission checks are going wrong... because it executes some of the instructions, but always tosses a "no thread specified" or "no permissions", regardless of whather the action fails or not.

I have a funny feeling it's more work correcting this than it's worth?

honestjohn
03-16-2005, 05:43 PM
It was related to another javascript applet running on the site - all fixed!

rob_daemon
03-17-2005, 04:28 AM
Glad you go this fixed :). Interesting problem, I'm not sure why exactly it'd happen, though.

YLP1
03-19-2005, 08:25 PM
I still can't get this mod to work for invidivual posts...works for for topics.....this is going to drive me to drink! LOL

I did as you asked and created a new style with no parent, but still have the problem.

Any other ideas?

psico
03-21-2005, 05:29 PM
It was related to another javascript applet running on the site - all fixed!

What Javascript? Because I?m having the same problem.

Tnx in advance.

Kei Kurono
03-23-2005, 08:33 PM
One thing i felt that can be improved is the inline deletion.

It does soft deletion.

But i want to physically delete a mass of thread, which i cannot do with the inline moderation tool.

maybe you should make so when you tick the forum threads, and select inline option delete, it then prompts, soft ot physical deletion.

just an opinion.

EscortCossie
03-25-2005, 02:37 PM
I have the same problem with moving threads.

Does someone have a fix for this?

Edit:

I tired using Firefox insted of IE.. haven't got any problems yet (after moving approx 1000 threads :))

msimplay
03-28-2005, 07:24 PM
I have one problem i merged two posts and one of them had attachments and those seemed to disappear when the posts were merged

Neutral Singh
03-29-2005, 01:11 AM
Exellent Hack !! I remember the first time i installed this hack, it created a real mess on my forum but this time around it installed like a charm... thanks for this gr8 handy tool !!

Regards

sv1cec
03-29-2005, 10:47 AM
I didn't went through the whole thread again, this hack works wonders, since it was installed, but I have a question/suggestion.

In our forums, the moderator are instructed never to delete a post/thread before creating a copy in a specific forum. In that way, if the user who posted the post/thread complains, we have the initial text for resolution.

In some cases, the mods want to copy a single post (or multiples, that's irrelevant) to the specified forum, but also edit the existing post in its original location. Would it be possible to have something similar to split, but which will copy the selected posts in a new thread in a selected forum, while still leaving the original one in its original position, for further action (like editing)? This would be extremely helpful, this hack covers all our moderator needs, but that.

Needless to say, I am at the authors disposal, if I need to elaborate.

UPDATE: I tried to do this myself, but I just do not have the coding expertise and the time to do it. It's pretty similar to splitting, the difference being that new posts have to be created, in addition to a new thread. And that's when I had to go pick up the twins from the nursery. With the twins at home, every coding effort is ... canceled.

Rgds

sv1cec
03-30-2005, 01:03 PM
One thing i felt that can be improved is the inline deletion.

It does soft deletion.

But i want to physically delete a mass of thread, which i cannot do with the inline moderation tool.

maybe you should make so when you tick the forum threads, and select inline option delete, it then prompts, soft ot physical deletion.

just an opinion.
This is the part of code you should use to permanently delete threads. Go in your inlinemod.php and find:


// -------------------------------------------------------------------

default:
print_no_permission();
break;
}
}

// ################################################## #################
// Handle output

if (defined('PRINT_TPL'))
{
$navbits = construct_navbits(array('' => 'Inline Moderation Options'));
eval('$navbar = "'. fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template(PRINT_TPL) . '";');
eval('print_output("' . fetch_template('THREADADMIN') . '");');
}
?>


Right above that, add:


// -------------------------------------------------------------------

case 'remove':
if (!can_moderate($vars['forumid'], 'caneditthreads'))
{
print_no_permission();
}
if (!is_array($vars['threads']))
{
eval(print_standard_error('error_invalidid'));
}
if (empty($_POST['do']))
{
define('PRINT_TPL', 'inline_remove_thread');
}
else
{
if ($_POST['confirm'] == 'Yes')
{
foreach ($vars['threads'] AS $threadid)
{
delete_thread($threadid, $vars['forum']['countposts'], 1, array('userid' => $bbuserinfo['userid'], 'username' => $bbuserinfo['username'], 'reason' => '', 'keepattachments' => 1));
}
build_forum_counters($vars['forumid']);
}
if ($vars['forumid'])
{
$url = "forumdisplay.php?$session[sessionurl]f=$vars[forumid]&mod=1";
}
eval(print_standard_redirect('redirect_deletethrea d'));
}

break;



You will also need a template, called inline_remove_thread, which should contain the followings:


<form action="inlinemod.php" method="post" name="vbform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="doproces" />
<input type="hidden" name="type" value="thread" />
<input type="hidden" name="inlinemodact" value="remove" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">Physically Remove Threads</td>
</tr>
<tr>
<td class="thead">Forum $vbphrase[title]: <span style="font-weight:normal">{$vars['forum']['title']}</span></td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">

<fieldset class="fieldset">
<legend>Confirmation</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>You have selected to physically remove some threads from this forum. <b>This cannot be undone.</b><P>Are you sure you want to proceed?</td>
</tr>
<tr>
<td>
Confirm removal:
<select name="confirm"><option value='No' selected>No</option><option value='Yes'>Yes</option></select>
</td>
</tr>
</table>
</fieldset>

</div>
</div>

<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="Proceed" accesskey="s" />
<input type="button" class="button" value="$vbphrase[cancel]" accesskey="c" onclick="history.back(1)" />
</div>
</td>
</tr>
</table>

</form>


Then go to your FORUMDISPLAY template and find:


<option value="undelete">Undelete Threads</option>


Below that, add:


<if condition="$bbuserinfo['userid']==1">
<option value="remove">Physically Remove Threads</option>
</if>


As you understand, I like to reserve the rights for permanent deletion, only for myself. If you want your mods to be able to use it too, just remove the if and the /if things.

Rgds

Kei Kurono
03-31-2005, 04:11 AM
Thx buddy *muaks

Kudos =^_^=;

sv1cec
03-31-2005, 02:55 PM
As I said before, one thing my mods were asking from this tool, was the ability to copy selected posts to a new thread in a specified forum. Some times, they want to edit a post, but their instructions is always to keep evidence of the original post, for dispute resolution. They usually do that, by making a copy of the thread in a specific forum. But this gets stupid, if you want to edit one post in a 200 posts thread.

So I came up with an addition to this hack, which is similar to split, but doesn't remove the original posts from the original thread, it just creates a new thread with the selected posts, in a selected forum, without touching the originals. In addition, you can select if you want to end up in the new thread's forum, or return to where you were originally (so that you can edit the original post).

For those interested, here is what you need to do, to add this functionality to this hack:

1. Open inlinemod.php and find:


// -------------------------------------------------------------------

default:
print_no_permission();
break;
}
}

// ################################################## #################
// Thread moderation


Right above that, add:


// -------------------------------------------------------------------

case 'copy':
if (!$vars['thread']['visible'] OR !$vars['thread']['visible'])
{
eval(print_standard_error('error_invalidid'));
}
if (!is_array($vars['posts']))
{
eval(print_standard_error('error_nosplitposts'));
}
if (!can_moderate($vars['thread']['forumid'], 'canmanagethreads'))
{
print_no_permission();
}

// Make sure that we've specified the split options
if (empty($_POST['do']))
{
$curforumid = $vars['thread']['forumid'];
$moveforumbits = construct_move_forums_options();
define('PRINT_TPL', 'inline_copy');
}
else
{

// Get the scoop on this new forum
$vars['newforum'] = verify_id('forum', intval($_POST['newforumid']));
$vars['newforuminfo'] = fetch_foruminfo($vars['newforum']);
if (!$vars['newforuminfo']['cancontainthreads'] OR $vars['newforuminfo']['link'])
{
eval(print_standard_error('error_moveillegalforum' ));
}

// Construct notes
$vars['newnotes'] = sprintf('Thread split from threadid %1$s by %2$s on %3$s at %4$s via Moderation Tool.', $vars['threadid'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$vars['newnotes'] .= ' ' . $vars['thread']['notes'];

// Create the new thread
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread
(
title,
lastpost,
forumid,
open,
replycount,
postusername,
postuserid,
lastposter,
dateline,
views,
iconid,
notes,
visible
)
VALUES
(
'" . addslashes(htmlspecialchars_uni($_POST['title'])) . "',
" . intval($vars['thread']['lastpost']) . ",
" . intval($vars['newforum']) . ",
" . intval($vars['thread']['open']) . ",
" . intval($vars['thread']['replycount']) . ",
'" . addslashes($vars['thread']['postusername']) . "',
" . intval($vars['thread']['postuserid']) . ",
'" . addslashes($vars['thread']['lastposter']) . "',
" . intval($vars['thread']['dateline']) . ",
0,
" . intval($vars['thread']['iconid']) . ",
'" . addslashes($vars['newnotes']) . "',
" . intval($vars['thread']['visible']) . "
)"
);
$vars['newthreadid'] = $DB_site->insert_id();

foreach($vars['posts'] as $postnumber)
{
$posts=$DB_site->query("SELECT * FROM " . TABLE_PREFIX . "post WHERE postid=$postnumber");
$pst=$DB_site->fetch_array($posts);


$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(
threadid,
parentid,
username,
userid,
title,
dateline,
pagetext,
allowsmilie,
showsignature,
ipaddress,
iconid,
visible,
attach,
warn_flag
)
VALUES
(
" . intval($vars[newthreadid]) . ",
" . intval($pst['parentid']) . ",
'" . addslashes($pst['username']) . "',
" . intval($pst['userid']) . ",
'" . addslashes($pst['title']) . "',
" . intval($pst['dateline']) . ",
'" . addslashes($pst['pagetext']) . "',
" . intval($pst['allowsmilie']) . ",
" . intval($pst['showsignature']) . ",
'" . addslashes($pst['ipaddress']) . "',
" . intval($pst['iconid']) . ",
" . intval($pst['visible']) . ",
" . intval($pst['attach']) . ",
" . intval($pst['warn_flag']) . "
)"
);
}


// Update counters
// #*# things like rebuild search index can go here (maybe, depeneds on MySQL fulltext imp), post count problems from switching post-counted to not (vv) forum(?)
build_thread_counters($vars['threadid']);
build_thread_counters($vars['newthreadid']);
build_forum_counters($vars['thread']['forumid']);
if ($vars['thread']['forumid'] != $vars['newforum'])
{
build_forum_counters($vars['newforum']);
}

log_moderator_action($vars['thread'], sprintf('thread copied to %1$s (inline copy)', $vars['newthreadid']));

// Done! w00t!
toss_cookies();
if ($_POST['destination']=='old')
{
$url = "showthread.php?$session[sessionurl]t=$vars[threadid]&mod=1";

}
else
{
$url = "showthread.php?$session[sessionurl]t=$vars[newthreadid]&mod=1";
}
eval(print_standard_redirect('redirect_copyposts') );
}
break;


Then create a new template called inline_copy, which shall contain the followings:


<form action="inlinemod.php" method="post" name="vbform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="doproces" />
<input type="hidden" name="type" value="post" />
<input type="hidden" name="inlinemodact" value="copy" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[copy_thread]</td>
</tr>
<!--
<tr>
<td class="thead">$vbphrase[title]: <span style="font-weight:normal">{$vars['thread']['title']}</span></td>
</tr>
-->
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">

<fieldset class="fieldset">
<legend>Specify new copy thread details</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>The selected post(s) will be copied into a new thread in the forum you will specify.<br>You may select the new thread title and in which forum it will be created.<p>
New thread $vbphrase[title] (old thread title shown):<br />
<input type="text" class="bginput" name="title" size="50" value="{$vars['thread']['title']}"/>
</td>
</tr>
<tr>
<td>
New thread $vbphrase[forum]:<br />
<select name="newforumid">$moveforumbits</select>
</td>
</tr>
<tr>
<td>
Where you want to go after the copy:<br />
<select name="destination"><option value="old">Where I was before</option><option value="new">Where the new thread will be created</option></select>
</td>
</tr>
</table>
</fieldset>

</div>
</div>

<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="$vbphrase[copy_thread]" accesskey="s" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
<input type="button" class="button" value="$vbphrase[cancel]" accesskey="c" onclick="history.back(1)" />
</div>
</td>
</tr>
</table>

</form>



Then open your SHOWTHREAD template and find:


<select name="inlinemodact">
<option value="merge" selected="selected">Merge Posts</option>
<option value="delete">Soft Delete Posts</option>
<option value="split">Split Posts</option>


Right below that, add :


<option value="copy">Copy Posts</option>


Finally add a phrase:

Type : Front-end redirect messages
Name: copyposts
Contents: The selected posts have been copied to a new thread, in the forum you specified.

You may want to run this query, to change an existing phrase, so that it can be used in copying as well as in splitting:

update phrase set text='You must specify some posts to split/copy from this thread.' where varname='nosplitposts'


I think this is it, I hope I am not forgetting anything.

YLP1
04-04-2005, 05:00 PM
You may want to run this query, to change an existing phrase, so that it can be used in copying as well as in splitting:

update phrase set text='You must specify some posts to split/copy from this thread.' where varname='nosplitposts'


I'm confused with this part of this code. How do I do this?

Thanks in advance.

Delphiprogrammi
04-04-2005, 09:12 PM
I'm confused with this part of this code. How do I do this?

Thanks in advance.

that's a database query phpMyAdmin will help you ...


UPDATE phrase SET text='You must specify some posts to split/copy from this thread.' WHERE varname='nosplitposts'

Nordinho
04-05-2005, 10:32 PM
Heya,

My body onload tag was allready modified by the image resize hack.
Currently I changed it to:

<body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if>$onload ; fiImageResize()">

but this is not working, any idea's what I need to change here??

previously it was:

<body onload="$onload; fiImageResize()">

rob_daemon
04-07-2005, 02:58 AM
Try this:

<body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if> fiImageResize(); $onload">

rob_daemon
04-07-2005, 03:05 AM
Just an update on things:

I'm working on abstracting a lot of the functions to make it easier to keep things organized and working right. This weekend I'm going to be swamped with work, so I probably won't get anything done. Next weekend I have to finish off a few of my own coding projects. Then in three weeks, I should have time to put the final touches on it. My goal is to have it out by the end of the month.

MentaL
04-10-2005, 12:28 AM
hi, my mods say they get a no permission error when using this.. any idea?

rob_daemon
04-10-2005, 10:58 PM
Do they have JavaScript enabled? When they click the "Go" button does it have a number in parenthesis or not? What browsers are they using?

MentaL
04-11-2005, 12:16 AM
they areable to use it but they get permission denied error.. like as if they where not allowed to use script.. IE (Not mods..)

rob_daemon
04-12-2005, 05:34 AM
When they're using the tool, at the bottom of the page there's a "Go" button; when they click it is there a number in parenthesis or not?

sv1cec
04-12-2005, 08:33 AM
Folks,

For those of you who decided to use my modification posted above, for copying posts to a new thread, please note that there were .... a few bugs in the way the database was updated. Don't panick nothing serious, it's just that in my hurry to provide you with this, I haven't taken care of all possible issues, and haven't added the required addslashes or intvals. If you haven't had an error when trying to use the copy function, you wouldn't be aware of it. If you had an error, I am sure you would have posted it here.

So, if you want to be 100% correct, please edit your inlinemod.php and find:


$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(
threadid,
parentid,
username,
userid,
title,
dateline,
pagetext,
allowsmilie,
showsignature,
ipaddress,
iconid,
visible,
attach,
warn_flag
)
VALUES
(
'{$vars[newthreadid]}',
'{$pst['parentid']}',
'{$pst['username']}',
'{$pst['userid']}',
'{$pst['title']}',
'{$pst['dateline']}',
'{$pst['pagetext']}',
'{$pst['allowsmilie']}',
'{$pst['showsignature']}',
'{$pst['ipaddress']}',
'{$pst['iconid']}',
'{$pst['visible']}',
'{$pst['attach']}',
'{$pst['warn_flag']}'
)"
);


Replace that, with:


$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(
threadid,
parentid,
username,
userid,
title,
dateline,
pagetext,
allowsmilie,
showsignature,
ipaddress,
iconid,
visible,
attach,
warn_flag
)
VALUES
(
" . intval($vars[newthreadid]) . ",
" . intval($pst['parentid']) . ",
'" . addslashes($pst['username']) . "',
" . intval($pst['userid']) . ",
'" . addslashes($pst['title']) . "',
" . intval($pst['dateline']) . ",
'" . addslashes($pst['pagetext']) . "',
" . intval($pst['allowsmilie']) . ",
" . intval($pst['showsignature']) . ",
'" . addslashes($pst['ipaddress']) . "',
" . intval($pst['iconid']) . ",
" . intval($pst['visible']) . ",
" . intval($pst['attach']) . ",
" . intval($pst['warn_flag']) . "
)"
);


The code in the above post has been edited with the new ... version.

Apologies for any inconvenience.

Rgds

msimplay
04-12-2005, 02:05 PM
i had a recent problem where when i tried to prune a users posts completely the merged posts remained and changed the merged posts status to a guest post, when what i wanted was it to be deleted as the pruning command is supposed to

Lyricsmama
04-16-2005, 05:09 PM
When they're using the tool, at the bottom of the page there's a "Go" button; when they click it is there a number in parenthesis or not?
Hi, I'm having the same problem, both admins and mods have got a no permission message.
Yes there is a parenthesis with a number next to the go number, the number equals the number of checkboxes they've selected...

Nordinho
04-17-2005, 02:49 PM
One thing i felt that can be improved is the inline deletion.

It does soft deletion.

But i want to physically delete a mass of thread, which i cannot do with the inline moderation tool.

maybe you should make so when you tick the forum threads, and select inline option delete, it then prompts, soft ot physical deletion.

just an opinion.

The mod for 'physically remove threads' work like a charm, but would would it be possible to do this for posts as well. I know it's in 'thread tools' but I want to make it available to some mods as well...

Renada
04-29-2005, 01:04 AM
Hi,

I've installed this today on vB 3.07 but no matter what group tries to use it (Mods, Super Mods, even Admins) they're told they don't have permission to view the page when trying to move/delete/stick etc. (in the address bar the page it's looking at is inlinemod.php)

The go button is there, it contains the correct number for the amount of boxes checked.

When trying to merge two messages I get as far as the editing screen - enter the title - am told all selected messages will be merged into one and I push "Merge Posts" only to get the error "Invalid Post specified. If you followed a valid link, please notify the webmaster"

Does anyone have the answer?

Thanks,
Renada

obsidian
05-02-2005, 11:48 PM
I just installed and had the same issue with permissions the first time I tried it. I hit the back button and tried again and it worked without issue. I cant seem to break it now so playing with it might fix it.

Great hack BTW..... great time saver.

rob_daemon
05-03-2005, 12:49 AM
Alright sorry for not being able to reply for a while, I've managed to keep myself quite busy. I cannot reproduce the no permission error at all. I have tried it with Opera, Safari, IE6, and Firefox; all of these work fine.

Nordinho
05-03-2005, 03:15 PM
hmmm...mine stopped working...each time I get the message 'Invalid inline moderation items specified. If you followed a valid link, please notify the webmaster' except when I try to split/copy posts it says 'You must specify some posts to split/copy from this thread.' The post selected are checked and the 'go-button' shows the right amount of threads...any idea's??

edit: never mind, got it fixed ;)

Amavisca
05-05-2005, 06:00 AM
hmmm...mine stopped working...each time I get the message 'Invalid inline moderation items specified. If you followed a valid link, please notify the webmaster' except when I try to split/copy posts it says 'You must specify some posts to split/copy from this thread.' The post selected are checked and the 'go-button' shows the right amount of threads...any idea's??

edit: never mind, got it fixed ;)


I got the same problem as u , how do u fix it?

Nordinho
05-06-2005, 01:20 PM
I got the same problem as u , how do u fix it?
In my case I thought it was a template error...since I came aware it worked on one of the styles, and I copied the templates from that one to all styles (using Zero Tolerances hack)...and it worked for a day. Next day I got up and all of a sudden it stopped working again (while there were no filechanges etc.), so I'm puzzled again...sorry can't help you more...

kermit_criminal
05-13-2005, 08:21 PM
this hack seems redundant on vb 3.0.7

Paul M
05-13-2005, 11:25 PM
this hack seems redundant on vb 3.0.7Erm, why ??

kermit_criminal
05-14-2005, 10:16 AM
isnt there already the "forum tools". not sure, but isnt this the same thing?

Paul M
05-14-2005, 11:05 AM
Not even close to being the same thing .....


It may become redundant in vB 3.5.0 though .....

Mith
05-14-2005, 11:11 AM
I have a problem with the tick-boxes it shows as in the attached screenshot.


What I'd like is for the tick boxes to show beside the threads, to the right, but seem to have done something wrong.

Any help appreciated

Screenshot (http://mith.pwp.blueyonder.co.uk/images/errors/tickbox.JPG)


(http://mith.pwp.blueyonder.co.uk/images/errors/tickbox.JPG)

rob_daemon
05-14-2005, 06:11 PM
I have a problem with the tick-boxes it shows as in the attached screenshot.


What I'd like is for the tick boxes to show beside the threads, to the right, but seem to have done something wrong.

Any help appreciated

Screenshot (http://mith.pwp.blueyonder.co.uk/images/errors/tickbox.JPG)


(http://mith.pwp.blueyonder.co.uk/images/errors/tickbox.JPG)
Make sure you made the FORUMDISPLAY modifications correctly and the threadbit modifications correctly. These two modifications--if not done correctly--would create that effect.

kermit_criminal
05-14-2005, 09:00 PM
Not even close to being the same thing .....


It may become redundant in vB 3.5.0 though .....


can you enlighten on this, i honestly dont know. Arent all the functions in inline moderator tools also in forum/thread tools which come default? I hope to be proven wrong as i already have inline moderator tools installed and hope it wasnt a redundancy

rob_daemon
05-15-2005, 06:52 PM
Yes, all the tools are there -- that's the point. This hack allows you to perform those actions while viewing the forum or the thread without having to go to a separate page. It allows for inline editing.

WEForums
05-17-2005, 07:24 PM
Well...

What about making it so when a mod moves multiple threads, it's located in the mod log? I don't even think move/closing one thread through Inline moderation is logged (I could be wrong, but I believe that's what I found out).

Not sure if that was suggested or not...16 pages is too many to scan through.

Crazy Serb
05-20-2005, 04:48 AM
i just realized what the problem in my case is... after changing FORUMDISPLAY and SHOWFORUM templates' <body> tags, and not getting any of those changes to appear in the actual pages, I looked at the code and realized that the latest version of VBAdvanced CMPS had a lot to do with that. First of all, the pages use adv_portal template to display all the pages, making showthread and forumdisplay pages sort of useless... I'll try adding the code into adv_portal template instead and see what happens.

Crazy Serb
05-24-2005, 04:16 AM
ok, after asking a few questions on vbadvanced.com forum, here's what i came up with... I've added the following code to the adv_portal template since it replaces all the code between the <html>... and <body> tags from the templates:


<if condition="THIS_SCRIPT == 'forumdisplay'">
<body<if condition="can_moderate($foruminfo['forumid']) AND $show['inlinemod']"> onload="inline_init($foruminfo[forumid], 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>"</if>>
<else />
<if condition="THIS_SCRIPT == 'showthread'"><body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if>$onload">
<else /><body></if></if>


Now, I get the permission to delete the posts, I get the checkboxes, I get the number of checked off topics in the bracket, but when I hit GO (to move topics, for example) I still get the no permission error. I've tried adding myself as a moderator to the specific forum in question as well, and nothing.

Btw, is my <body> tag supposed to look like this on the page load:


<body onload="inline_init(, 'thread'); ">

rob_daemon
05-24-2005, 04:21 AM
ok, after asking a few questions on vbadvanced.com forum, here's what i came up with... I've added the following code to the adv_portal template since it replaces all the code between the <html>... and <body> tags from the templates:


<if condition="THIS_SCRIPT == 'forumdisplay'">
<body<if condition="can_moderate($foruminfo['forumid']) AND $show['inlinemod']"> onload="inline_init($foruminfo[forumid], 'thread'); <if condition="$_REQUEST['mod'] == 1">inline_reset();</if>"</if>>
<else />
<if condition="THIS_SCRIPT == 'showthread'"><body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if>$onload">
<else /><body></if></if>


Now, I get the permission to delete the posts, I get the checkboxes, I get the number of checked off topics in the bracket, but when I hit GO (to move topics, for example) I still get the no permission error. I've tried adding myself as a moderator to the specific forum in question as well, and nothing.

Btw, is my <body> tag supposed to look like this on the page load:


<body onload="inline_init(, 'thread'); ">

Glad you found out what the problem was. And no the body tag is not supposed to look like that. The first argument in the inline_init() function is supposed to be the thread or forum ID that you're currently viewing. Missing this would cause that no permissions page to be thrown. I'm not sure how to resolve this, though.

d2sector
05-24-2005, 09:37 AM
Is it possible to add the inline mod tools to search results? As i need to move alot of specific threads and being able to mass move searched threads would be nice ^.^

Mickey19781978
05-28-2005, 04:24 PM
cheers m8

this an excellent hack
i assume we all have good use with this

d2sector
05-29-2005, 02:09 AM
Im pretty sure vb 3.5.0 is going to have inline mod tools when it comes out next month isnt it?

rob_daemon
05-29-2005, 06:36 AM
Yes it is; ergo this hack will be made obsolete.

FD929
05-31-2005, 02:30 PM
A question was asked about attachments here: https://vborg.vbsupport.ru/showpost.php?p=632597&postcount=206 but never answered. Most of my use of this tool is with merging posts that deal a lot with attachments. I do not want to delete the attachments, merely merge all text and attachments into one post, however the attachments from all except the first post are lost. How can this be remedied? A solution would be very much appreciated.

PS - thank you to all involved in making this wonderful tool. Outstanding work.

rob_daemon
06-01-2005, 11:37 PM
A question was asked about attachments here: https://vborg.vbsupport.ru/showpost.php?p=632597&postcount=206 but never answered. Most of my use of this tool is with merging posts that deal a lot with attachments. I do not want to delete the attachments, merely merge all text and attachments into one post, however the attachments from all except the first post are lost. How can this be remedied? A solution would be very much appreciated.

PS - thank you to all involved in making this wonderful tool. Outstanding work.
Sorry, I must have missed that post. Use this for a solution.

Open inlinemod.php and find:

// Remove the others

Add before that:

// save attachments to new post
$DB_site->query("UPDATE " . TABLE_PREFIX . "attachment SET postid = {$vars['newpost']['postid']} WHERE postid IN (" . implode(', ', $vars['posts']) . ")");

I have no way of fixing any previous attachments that were left missing. However, they were not removed from the database so you could manually relink them if you need to.

And I'm glad you like the hack.

bryan09
06-11-2005, 02:02 AM
Two questions:

1. I added that above coding for Merging and keep attachments, but it does not seem to be working. Anything else I should have done to inlinemod.php or others?

2. Anyway to have the option of Physically Deleting the Posts/Threads instead of Soft delete?

Mr. Brian
06-20-2005, 07:24 PM
It seem don't work on some skin..