vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Advanced Editing Options For Mods & Admins (https://vborg.vbsupport.ru/showthread.php?t=61412)

Xenon 06-08-2004 10:21 PM

well it conflicts, that the quickedit send to editpost.php as well, but doesn't fill the admin edit fields as well, so all those are considered as empty...

sketch42 06-08-2004 11:52 PM

Quote:

Originally Posted by Xenon
well it conflicts, that the quickedit send to editpost.php as well, but doesn't fill the admin edit fields as well, so all those are considered as empty...

but if the quick edit is disabled from being used by admin... since theres no need for it with this hack.... by applying this in the postbit/postbit_legacy
Code:

<if condition="THIS_SCRIPT=='showthread' and $bbuserinfo[usergroupid]!=5 and $bbuserinfo[usergroupid]!=6 and $bbuserinfo[usergroupid]!=7">
$quickedit
</if>

than there shouldnt be a problem no?? i mean since this hack is for admins and mods than there shouldnt be any problems with the two together no??(im probably just talkin outta my a$s :lick: )

sketch42 06-09-2004 04:13 AM

this is for those that have the quick edit hack installed

ok i got it to work .... somewhat... i just need one more step

this is what i did so far....

i have this code in the showthread_quickedit
Code:

                        <span id="quickedit_$post[postid]">
                                <img src="$stylevar[imgdir_button]/quickedit_icon.gif" alt="Quick Edit" border="0" />
                                <script type="text/javascript"> vbmenu_register("quickedit_$post[postid]", true); </script>
                        </span>
<div class="vbmenu_popup" id="quickedit_$post[postid]_menu" style="display:none">
<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="updatepost" />
<input type="hidden" name="p" value="$post[postid]" />
<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />
<input type="hidden" name="emailupdate" value="9999" />
<input type="hidden" name="disablesmilies" value="0" />
<input type="hidden" name="parseurl" value="1" id="cb_parseurl" />       
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" align="left">
<strong>$vbphrase[edit_post]</strong>
</td>
</tr>
<tbody>
<tr valign="top">
<td class="panelsurround" align="center">
<div class="panel">
<div align="left">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('editpost_advanced')"><img id="collapseimg_editpost_advanced" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_editpost_advanced].gif" alt="" border="0" /></a>
                Advanced Editing Options
        </td>
</tr>
<tbody id="collapseobj_editpost_advanced" style="$vbcollapse[collapseobj_editpost_advanced]">
        <tr>
                <td class="panelsurround" align="center">
                <div class="panel">
                        <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
                       
                        <div class="fieldset">
                                <div>This Form allows you to change advanced settings of this post</div>
                        </div>
                       
                        <fieldset class="fieldset">
                                <legend>Advanced options</legend>
                                <div style="padding:$stylevar[formspacer]px">
                                        <div>
                                                <label for="sb_editable">
                                                        <select name="editable" id="sb_editable">
                                                                <option value="$editlevel[author]"<if condition="$postinfo['editlevel'] == $editlevel['author']"> selected="selected"</if>>
                                                                        Author
                                                                </option>
                                                                <option value="$editlevel[mod]"<if condition="$postinfo['editlevel'] == $editlevel['mod']"> selected="selected"</if>>
                                                                        Moderator
                                                                </option>
                                                                <if condition="$bbuserinfo['editlevel'] >= $editlevel['smod']">
                                                                        <option value="$editlevel[smod]"<if condition="$postinfo['editlevel'] == $editlevel['smod']"> selected="selected"</if>>
                                                                                Supermoderator
                                                                        </option>
                                                                </if>
                                                                <if condition="$bbuserinfo['editlevel'] >= $editlevel['admin']">
                                                                        <option value="$editlevel[admin]"<if condition="$postinfo['editlevel'] == $editlevel['admin']"> selected="selected"</if>>
                                                                                Admin
                                                                        </option>
                                                                </if>
                                                        </select>
                                                        or above can edit this post!
                                                </label>
                                        </div>
                                       
                                        <!-- Specific Section for Admin -->
                                        <if condition="$bbuserinfo['editlevel'] == $editlevel['admin']">
                                                <div>
                                                        <label for="tb_dateline">
                                                                <input type="text" name="newday" value="$posttime[mday]" size="1" maxlength="2" id="tb_dateline_day" />.
                                                                <input type="text" name="newmonth" value="$posttime[mon]" size="1" maxlength="2" id="tb_dateline_month" />.
                                                                <input type="text" name="newyear" value="$posttime[year]" size="3" maxlength="4" id="tb_dateline_year" />  -
                                                                <input type="text" name="newhour" value="$posttime[hours]" size="1" maxlength="2" id="tb_dateline_day" />:
                                                                <input type="text" name="newminute" value="$posttime[minutes]" size="1" maxlength="2"  id="tb_dateline_day" />
                                                                Date posted (d.m.Y - H:i)
                                                        </label>
                                                </div>
                                                <div>
                                                        <label for="tb_username">
                                                                <input type="text" name="newusername" value="$postinfo[username]" id="tb_username" /> Author of this post (if user doesn't exist, it will be set to a guest post)
                                                        </label>
                                                </div>
                                                <div>
                                                        <label for="tb_ipaddress">
                                                                <input type="text" name="newipaddress" value="$postinfo[ipaddress]" id="tb_ipaddress" /> IP Address
                                                        </label>
                                                </div>
                                        </if>
                                </div>
                        </fieldset>
                       
                        </div>
                </div>
               
                </td>
        </tr>
</tbody>
</table>
<br />
        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
        <div>$vbphrase[title]:</div>
        <div><input type="text" class="bginput" name="title" value="$post[title]" size="60" maxlength="85" tabindex="1" /></div>
        </div>
        <div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
        <div>$vbphrase[message]:</div>
        <div><textarea name="message" class="bginput" style="width:433px; height:125px;" wrap="virtual" tabindex="1">$edittext</textarea></div>
        </div>
</div>
</div>
<div style="margin-top:6px">
        <input type="submit" class="button" name="sbutton" value="Save Changes" accesskey="s" tabindex="1" />
        <input type="submit" class="button" name="preview" value="Preview Changes" accesskey="p" tabindex="1" />

        <if condition="$bbuserinfo['signature'] != ''"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" checked /><span class="smallfont">Signature</span></label></if>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>

and i get (see thumbnail for details) the advanced edit screen in the quick edit but the fields in the advanced edit are blank... as well as the dropdown

im not sure what i have left to add... any suggestions?

Xenon 06-09-2004 11:46 PM

well, to see the correct infos, they have to be prepared/parsed before.

so you better use a different way:

in MY hack find:
PHP Code:

if ($_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author']) 

and replace with:
PHP Code:

if ($_POST['quickedit'] != 'true' AND $_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author']) 

then in the quickedit formular add:
HTML Code:

<input type="hidden" name="quickedit" value="true" />
using that way, there shouldn't be problems anymore.
but it means the special edit options can just be used in real edit, not quick edit :)

MJM 06-27-2004 05:29 AM

This has been working great! Can't thank you enough.
Couple things....
If the day/month boxes could be a little bigger to show the 2 numbers...
They only show one number each, and when making date changes it's a bit of a pain.

Any way username changes can be made in calendar of event?

Thanks, thanks and thanks again,
Mark

Xenon 06-28-2004 09:02 PM

hmm, they show two numbers for me.
seems to be browser related, or maybe font relatad.

just change the sizevalue in the template:
Code:

<input type="text" name="newday" value="$posttime[mday]" size="1" maxlength="2" id="tb_dateline_day" />.
hmm, would be a different hack for calendar events i fear ;)

MJM 06-30-2004 03:58 PM

Using IO on a Mac, maybe thats why
...will pass this on to my partner
Thanks
Mark
No problems about the calendar/username change.

We now post calendar events under pseudonym `EventsDesk' and wanted to change our personal username entries, which we can by deleting, then re-entering info under new username, as the date of entry is irrelevant.

The only thing we can't do is change the name to another member username, but we'll just have the member re-enter the info.

ragintajin 07-07-2004 09:31 AM

Anyone try installing this on 3.0.3 yet?

Xenon 07-07-2004 02:35 PM

actually not, but it should work with 3.0.3 as well, there weren'T in deep changes in editpost.php

Slynderdale 07-08-2004 03:46 AM

Nice hack, just wanted to mention that it installed fine on vBulletin 3.0.3.
Had a little problem with another hack but I managed to fix it. I fyou have the quick edit hack installed and tried to quick edit a post, all the options get reset like IP, userid and name, the date and so on.

If anyone else has this problem heres a quick fix, in the template "showthread_quickedit" find:
HTML Code:

  <form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">
and add under it:
HTML Code:

  <input type="hidden" name="quickedit" value="true" />
Then find in editpost.php:
PHP Code:

  if ($_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author']) 

and change it to:
PHP Code:

  if ($_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author'] AND !$_POST['quickedit']) 

and that should solve that problem.

Also I notice a small problem with this hack, if you change the user of the post, the original poster count doesn't decrese and the new user post count doesn't increase so you would have to update the counters to get them accurate again. Other then that, its a good hack.


All times are GMT. The time now is 07:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01356 seconds
  • Memory Usage 1,823KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete