View Full Version : [bug] create issue
baghdad4ever
06-13-2010, 06:09 PM
hi
the radio select of create issue from thread found in
1-thread option
2-search in this thread
3- rate the thread
i hope this will be fixed
thanks
we_are_borg
06-13-2010, 08:23 PM
Will make ticket for this bug on internal tracker. Should be fixed in next version.
--------------- Added 1276474038 at 1276474038 ---------------
A developer is working on it as we speak maybe he can post a work around here for you and others.
baghdad4ever
06-14-2010, 10:43 AM
thanks
PitchouneN64ngc
06-14-2010, 06:49 PM
Plugin: Show Thread: Display moderation option if permitted
Change this line:
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<li class="formsubmit">', '<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li><li class="formsubmit">', $vbulletin->templatecache['SHOWTHREAD']);
By this line:
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<form action="postings.php" method="post">
<ul class="popupbody popuphover">', '<form action="postings.php" method="post">
<ul class="popupbody popuphover">
<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li>', $vbulletin->templatecache['SHOWTHREAD']);
PS: I know this is not a good way to add things on templates but there is no template hook in this place and it seems we will not have this one.
http://www.vbulletin.com/forum/showthread.php?327316-Hook-Location-Requests&p=1983704&viewfull=1#post1983704
baghdad4ever
06-15-2010, 07:27 PM
Plugin: Show Thread: Display moderation option if permitted
Change this line:
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<li class="formsubmit">', '<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li><li class="formsubmit">', $vbulletin->templatecache['SHOWTHREAD']);By this line:
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<form action="postings.php" method="post">
<ul class="popupbody popuphover">', '<form action="postings.php" method="post">
<ul class="popupbody popuphover">
<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li>', $vbulletin->templatecache['SHOWTHREAD']);PS: I know this is not a good way to add things on templates but there is no template hook in this place and it seems we will not have this one.
http://www.vbulletin.com/forum/showthread.php?327316-Hook-Location-Requests&p=1983704&viewfull=1#post1983704
thanks PitchouneN64ngc
i apply this but the create issue gone so i return back to the original code with bug:(
we_are_borg
06-15-2010, 07:30 PM
Did you notice that the first box contains 3 lines
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<li class="formsubmit">', '<li><label><input type="radio" name="do" value="createptissue" /> ' .
$vbphrase['pt_create_issue'] . '…</label></li><li class="formsubmit">',
$vbulletin->templatecache['SHOWTHREAD']);
baghdad4ever
06-16-2010, 06:48 AM
hi we are borg
i replace the 1st code with the PitchouneN64ng`s code
the create issue radio button disappear at all
so i return back
we_are_borg
06-16-2010, 03:30 PM
hi we are borg
i replace the 1st code with the PitchouneN64ng`s code
the create issue radio button disappear at all
so i return back
Just tested it and it removes all Create Issue. To be save and fix the problem make abackup of Plugin: Show Thread: Display moderation option if permitted and copy and paste the code below in it this should resolve the issue (it did for me on my test PT).
// TODO: this could have its own permission in moderation for future
$show['createptissue'] = can_moderate($threadinfo['forumid'], 'canmanagethreads') AND can_moderate($threadinfo['forumid'], 'canremoveposts');
$show['adminoptions'] = $show['adminoptions'] OR $show['createptissue'];
// Display the link in showthread
// I hope future vB versions will add a template_hook in this place
// as this code is not completely useful (can slow a page load)
if ($show['createptissue'])
{
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<form action="postings.php" method="post">
<ul class="popupbody popuphover">', '<form action="postings.php" method="post">
<ul class="popupbody popuphover">
<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li>', $vbulletin->templatecache['SHOWTHREAD']);
}
baghdad4ever
06-18-2010, 09:15 AM
Just tested it and it removes all Create Issue. To be save and fix the problem make abackup of Plugin: Show Thread: Display moderation option if permitted and copy and paste the code below in it this should resolve the issue (it did for me on my test PT).
// TODO: this could have its own permission in moderation for future
$show['createptissue'] = can_moderate($threadinfo['forumid'], 'canmanagethreads') AND can_moderate($threadinfo['forumid'], 'canremoveposts');
$show['adminoptions'] = $show['adminoptions'] OR $show['createptissue'];
// Display the link in showthread
// I hope future vB versions will add a template_hook in this place
// as this code is not completely useful (can slow a page load)
if ($show['createptissue'])
{
$vbulletin->templatecache['SHOWTHREAD'] = str_replace('<form action="postings.php" method="post">
<ul class="popupbody popuphover">', '<form action="postings.php" method="post">
<ul class="popupbody popuphover">
<li><label><input type="radio" name="do" value="createptissue" /> ' . $vbphrase['pt_create_issue'] . '…</label></li>', $vbulletin->templatecache['SHOWTHREAD']);
}
thanks it is fixed now:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.