The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[How-To] Create your own Inline Moderation
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.
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 |
#2
|
|||
|
|||
I'm having trouble with this guide... these are my templates:
FORM: Code:
<form action="videoajax.php" method="post" id="videoComments"> <a name="comments" /> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" width="100%"> $vbphrase[comments] </td> <if condition="$show['popups']"> <td class="vbmenu_control" id="imod" align="center" title="$vbphrase[moderation]"><script type="text/javascript"> vbmenu_register('imod'); </script></td> <else /> <td class="tcat" align="center"> <input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all()" /> </td> </if> </tr> <tr valign="top"> <td class="alt1" colspan="2"><div id="vidCommentsAll"> <ol class="list_no_decoration alt1 block_row" id="message_list">$commentbits</ol> </div></td> </tr> </table> <div id="vidPageselAll">$pagenav</div> <div align="right"> <strong>$vbphrase[moderation]</strong> <select name="do"> <optgroup label="$vbphrase[option]"> <option value="deletecomments">Delete Comments</option> </optgroup> </select> <input type="submit" class="button" id="inlinego" value="$vbphrase[go]" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script> <script type="text/javascript"> <!-- inlineMod = new vB_Inline_Mod('inlineMod', 'post', 'videoComments', '$vbphrase[go_x]', 'videocomments_inline'); //--> </script> </div> <if condition="$show['popups']"> <div class="vbmenu_popup" id="imod_menu" style="display:none" align="$stylevar[left]"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">$vbphrase[moderation]</td></tr> <tr><td class="vbmenu_option" onclick="inlineMod.check_all(true)">$vbphrase[select_all]</td></tr> <tr><td class="vbmenu_option" onclick="inlineMod.check_all(false)" id="arse">$vbphrase[deselect_all]</td></tr> <tr><td class="vbmenu_option" onclick="inlineMod.check_all('invert')">$vbphrase[invert_selection]</td></tr> </table> </div> </if> <script type="text/javascript" src="clientscript/vbulletin_ajax_videocomment.js"></script> </form> Code:
<li id="vcomment$comment[videocommentid]" class="floatcontainer"> <if condition="$comment['avatarurl']"> <div class="fixed_width_avatar"> <if condition="$comment['postuserid']"><a href="member.php?$session[sessionurl]u=$comment[postuserid]"></if><img src="$comment[avatarurl]" class="alt2 avatar"<if condition="$comment['avatarwidth']"> width="$comment[avatarwidth]"</if><if condition="$comment['avatarheight']"> height="$comment[avatarheight]"</if> border="0" alt="$comment[username]" /><if condition="$comment['postuserid']"></a></if> </div> <div class="visitor_message_avatar_margin"> </if> <div class="tborder info_bar"> <div class="alt2 smallfont"> <if condition="$show['deletionlink']"><input type="checkbox" class="inlinemod_checkbox" name="clist[$comment[videocommentid]]" id="clist_$comment[videocommentid]" /></if> <div class="visitor_message_date"><a href="$video[url]">$video[title]</a> @ $comment[date], <span class="time">$comment[time]</span></div> <if condition="$comment['postuserid']"> <a href="member.php?$session[sessionurl]u=$comment[postuserid]">$comment[musername]</a> <else /> <phrase 1="$comment[musername]">$vbphrase[guest_x]</phrase> </if> </div> </div> <div id="vcomment_text_$comment[videocommentid]" class="visitor_message_body"> $comment[message] </div> <ul class="list_no_decoration controls"> <if condition="$show['deletionlink']"> <li class="smallfont"><a href="video.php?$session[sessionurl]do=deletecomment&commentid=$comment[videocommentid]">$vbphrase[delete_video_comment]</a></li> </if> </ul> <if condition="$comment['avatarurl']"> </div> </if> </li> 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. |
#3
|
|||
|
|||
Found another issue... the drop-down menu doesn't work. If I hit "select all", it doesn't select anything.
--------------- Added [DATE]1254172453[/DATE] at [TIME]1254172453[/TIME] --------------- Figured It Out! Code:
<script type="text/javascript"> <!-- inlineMod = new vB_Inline_Mod('inlineMod', 'post', 'banmanageform', '$vbphrase[go_x]', 'productname_inline'); //--> </script> --------------- Added [DATE]1254173076[/DATE] at [TIME]1254173076[/TIME] --------------- Wait... actually, there is still an error... Selections are not saved on page-switch; or added to the "GO" count" |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|