vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Project Tools (https://vborg.vbsupport.ru/forumdisplay.php?f=266)
-   -   [bug] create issue (https://vborg.vbsupport.ru/showthread.php?t=244544)

baghdad4ever 06-13-2010 06:09 PM

[bug] create issue
 
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 [DATE]1276474038[/DATE] at [TIME]1276474038[/TIME] ---------------

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:

PHP Code:

$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:

PHP Code:

$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/showt...=1#post1983704

baghdad4ever 06-15-2010 07:27 PM

Quote:

Originally Posted by PitchouneN64ngc (Post 2053640)
Plugin: Show Thread: Display moderation option if permitted

Change this line:

PHP Code:

$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:

PHP Code:

$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/showt...=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

Code:


$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 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

Quote:

Originally Posted by baghdad4ever (Post 2054355)
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).

Code:


// 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 06-18-2010 09:15 AM

Quote:

Originally Posted by we_are_borg (Post 2054557)
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).

Code:


// 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


All times are GMT. The time now is 01:54 PM.

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.01253 seconds
  • Memory Usage 1,757KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete