Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
[How-To] Create your own Inline Moderation
Revan
Join Date: Jan 2004
Posts: 1,671

Started doing my first if...else chain in 2004, and released my first major vBulletin modification in August 2004 with the first version of the RPG Integration Hack.

Norway
by Revan Revan is offline 07 Jul 2006

This How-To will only work with the upcoming Beta 5 or RC1 or whatever they decide to name it. It will not work with Beta 4, because of this thread.

Wouldn't it be cool to have your own Inline Moderation? Of course it would. Especially if you paginate your results, you might want to mark multiple items across pages.

You don't need to understand AJAX in order to find this guide useful. Hell I don't know much AJAX, I'm just good at tinkering with code until it works

Im assuming you know how to create and submit forms, so I won't go into details on how to alter the example form in order to make it work with your hack.

Make sure your php file has the "inlinemod" phrasetype included.

  1. Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    The one thing you should know about this form is that the l2cp.php or whatever you decide to put there, is the file that will handle your inline moderation. vBulletin uses inlinemod.php for this purpose.
  2. In order to get the fancy dropdown menu, put this in the bit where you have the class="thead":

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Then a little later somewhere put this:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  3. Put this wherever you want it to appear:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    This has a ton of things to explain.
    First of all, the select is what determines what action the script should do.
    Secondly, theres the new vB_Inline_Mod(). That's used to instantiate the JS class. The first parameter is the varname, in this case inlineMod. Next you'll have whether or not this is a thread or a post, you have to leave it at post. Next is the form name like you defined above, then the vbphrase for the go (0) button, then the cookiename. You can make that anything you want, just make sure its unique.
  4. The final bit here is the checkbox that'll mark the result bit, so in your repeating template put this:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    The only thing you need to change here is the $idvar. That can be anything such as {$result[userid]} or whatever.

That should do the trick
Feel free to ask if there's anything you find unclear, I was in sort of a hurry and Im not very good at explaining
Views: 3253
Reply With Quote
Comments
  #2  
Old 24 Sep 2009, 19:28
Jaxel Jaxel is offline
 
Join Date: Sep 2005
I'm having trouble with this guide... these are my templates:

FORM:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

BIT:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Two problems...

1 - class="floatcontainer" should change to class="floatcontainer inlinemod" when a bit is checked... it doesn't here...

2 - selections are not saved on page-switch; or added to the "Go (0)" count on the submit form.

Please take a look at my code and tell me what I am missing.
Reply With Quote
  #3  
Old 28 Sep 2009, 20:53
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Found another issue... the drop-down menu doesn't work. If I hit "select all", it doesn't select anything.

--------------- Added 28 Sep 2009 at 21:14 ---------------

Figured It Out!


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I changed 'post' to 'vmessage' and now it works!

--------------- Added 28 Sep 2009 at 21:24 ---------------

Wait... actually, there is still an error...

Selections are not saved on page-switch; or added to the "GO" count"

Last edited by Jaxel; 28 Sep 2009 at 21:24. Reason: Auto-Merged DoublePost
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Inline Moderation Tools (v1.2.1) rob_daemon vBulletin 3.0 Full Releases 273 24 Nov 2007 02:27



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:05.

Layout Options | Width: Wide Color: