PDA

View Full Version : [bug] create issue


baghdad4ever
13 Jun 2010, 20:09
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
13 Jun 2010, 22:23
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
14 Jun 2010, 12:43
thanks

PitchouneN64ngc
14 Jun 2010, 20:49
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'] . '&hellip;</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'] . '&hellip;</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
15 Jun 2010, 21:27
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'] . '&hellip;</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'] . '&hellip;</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
15 Jun 2010, 21:30
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'] . '&hellip;</label></li><li class="formsubmit">',
$vbulletin->templatecache['SHOWTHREAD']);

baghdad4ever
16 Jun 2010, 08:48
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
16 Jun 2010, 17:30
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'] . '&hellip;</label></li>', $vbulletin->templatecache['SHOWTHREAD']);
}

baghdad4ever
18 Jun 2010, 11:15
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'] . '&hellip;</label></li>', $vbulletin->templatecache['SHOWTHREAD']);
}




thanks it is fixed now:D