vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBSupport v2.0.0 Beta 2 (https://vborg.vbsupport.ru/showthread.php?t=94023)

Delphiprogrammi 10-28-2007 12:02 PM

Quote:

Originally Posted by Lionel (Post 1364957)
I managed to get attachments to display, but I am having a hard time with editpost (when greater than post id#1)

I am also having a hard time with permissions. I thought of disabling editpost but it goes thru

look at newattachment.php and attachment.php if the editpost method is used vBulletin wants a postid ($postid) i think you somehow need to pass that variable in the newattachment template there's a hidden variable called edittpost (coming from a form) so i guess something like

PHP Code:

$vbulletin->input->clean_gpc('p','editpost',TYPE_BOOL); 

would be needed.Also in the editpost method you need to pass this to newattachment.php?$session[sessionurl]&p=$postinfo[postid]&editpost=1&postsstarttime=$poststarttime&posthash =$posthash

in the admincp file (vbsupport.php) are to manny security holes $_REQUEST values being used directly(they must be cleaned).The database being queried directly etc etc
this needs a start from scratch otherwise some holes will manage to slip in

Lionel 10-28-2007 12:15 PM

@delphiprogram Agreed! I gave up on this. The more I am fixing, the more other problems pop up.

Lionel 10-30-2007 09:40 PM

For those who are having problems with deleting a post, this seems to do the job for me. Not the most elegant, but hey it seems to work.

in plugins/vbsupport_inlinemod.php replace the foreach loop with

PHP Code:

        $post['firstpostid'] = false;
        
$gotothread true;
        foreach (
$postarray AS $postid => $post)
        {
            if(
$post['firstpostid'] == $post['postid'])
            {
            
$postman =& datamanager_init('Ticket_Thread'$vbulletinERRTYPE_SILENT'ticketpost');
            }else{
            
$postman =& datamanager_init('Ticket_Post'$vbulletinERRTYPE_SILENT'ticketpost');
            }
            
$postman->set_existing($post);
            
$postman->delete($post['postid'], $post['firstpostid'], array(
                
'userid' => $vbulletin->userinfo['userid'],
                
'username' => $vbulletin->userinfo['username'],
                
'reason' => $vbulletin->GPC['deletereason'],
                
'keepattachments' => $vbulletin->GPC['keepattachments']
            ));


            unset(
$postman); 


Delphiprogrammi 10-30-2007 10:44 PM

ey....

PHP Code:

$show['attachments'] = (vbsupport_can_moderate('canviewattachments')) ? true false

but still they won't display and you get the "no permissions" screen when clicking any attachment.While attachments do work fine in 1.1a

Lionel 10-30-2007 10:54 PM

Attachments display for me ... I don't remember what I did but they display just fine

Lionel 10-31-2007 01:10 AM

I did a beyond compare to view my changes. I am very busy, so I am putting this up like that.

Here is what I found in the main file.

1-Replace below with $threadid

Quote:

$getpost = $vbulletin->db->query_first("
SELECT postid
FROM " . TABLE_PREFIX . "vbs_ticket_post
WHERE threadid = $threadinfo[threadid]
ORDER BY dateline LIMIT 1
replace below with

$attachurl = "p=$postinfo[postid]";

Quote:

$attachurl = "t=1";
$newpost_attachmentbit = prepare_newpost_attachmentbit();
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');

$attach_editor['hash'] = $postinfo['postid'];
$attach_editor['url'] = "newattachment.php?$session[sessionurl]p=$postinfo[postid]&editpost=1&poststarttime=$poststarttime&a mp;posthash=$posthash";
}
else
{
$attachmentoption = '';
}
replace below with

$newpost['message']


Quote:

$editorid = construct_edit_toolbar(
$postinfo['message'],
0,
'',
true,
replace below with (twice)


$attachurl = "f=2";



Quote:

$attachurl = "t=1";
$newpost_attachmentbit = prepare_newpost_attachmentbit();
eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');

$attach_editor['hash'] = $foruminfo['forumid'];
$attach_editor['url'] = "newattachment.php?$session[sessionurl]f=$foruminfo[forumid]&poststarttime=$poststarttime&posthash=$po sthash";
And if you do my change above, all the bugs are done as far as I could tell. If someone finds more, then let me know.

DarkLord7854 11-08-2007 04:52 AM

Hey,

Was wondering if there's a simple way I can add another drop-down menu category selection, or add a small input box which would add whatever text was put into it and make it the topic/ticket description, or add the text after the title seperated by a hyphen?

Ninja Edit:
Can't download attachments, says permissions ain't set right even though they are >.<

Takamine334 12-07-2007 04:38 PM

So, users can create a ticket. However, when submitting, it says they are not authorized to view the page. If they go to their ticket listings, it shows 1, but they cannot see the ticket.

Takamine334 12-07-2007 07:00 PM

the Quick Reply is very small. How do I make it the size of a normal quick reply?

Solja-Mike 01-04-2008 08:15 PM

Is there any type of reporting feature for this addon?


All times are GMT. The time now is 06:04 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.02300 seconds
  • Memory Usage 1,764KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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