vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vb3 Attachments - Including Multiple Attachments Option (https://vborg.vbsupport.ru/showthread.php?t=52294)

Austin Dea 04-30-2003 01:13 AM

/me waits patiently for hack to work

squawell 04-30-2003 02:06 AM

i got this error

Parse error: parse error, unexpected ',' in /XXXX/editpost.php on line 177

and the line 177 is below:
$att = ",",$postinfo[attachmentid]);

how to fix that??thankz~

Brad 04-30-2003 03:19 AM

Can someone post the new file in a reply, im hitting my cache and dont fell like clearing it ;). Im going to install this on a test board and see if I cant sort thru all the errors myself.

Hobbes 04-30-2003 04:34 AM

hey link, I'm getting that same error now....for the attachments that are below the max file.
except for me, the files are just cut off....:bunny:

Boofo 04-30-2003 04:47 AM

Quote:

Yesterday at 10:06 PM squawell said this in Post #72
i got this error

Parse error: parse error, unexpected ',' in /XXXX/editpost.php on line 177

and the line 177 is below:
$att = ",",$postinfo[attachmentid]);

how to fix that??thankz~

Try changing this:

$att = ",",$postinfo[attachmentid]);

to this:

$att = ",$postinfo[attachmentid]");

Just a guess here. ;)

iggy123 04-30-2003 05:29 AM

I get the following error when trying to edit a post with multiple attachments.

PHP Code:


Parse error
parse errorunexpected ',' in xxxxxxxxxxxxx /forums/editpost.php on line 156 

infact i get it on every post i want to edit..

rake 04-30-2003 06:33 AM

Excuse me. :dead: I'm such a blisterring idiot. I forgot to replace newattachment.php

Well, all the file modifications work on my current board. I'm going to install this on a fresh, unhacked board and see what errors come up.


Edit: Please download the update in the first post. This should fix all errors, including login, editpost.php and size errors. Thank you. :)

squawell 04-30-2003 09:45 AM

rake i have problem with instruction file the editpost.php part

if i already have this hack ""add attachment on edit post""

should i also edit this two parts??
PHP Code:

==========
Find
==========

    
$attachmentinfo=$DB_site->query_first("SELECT filename FROM attachment WHERE attachmentid=$postinfo[attachmentid]");

==================
Replace With
==================

    
$attachmentinfo=$DB_site->query("SELECT filename,attachmentid FROM attachment WHERE $qry");
    while(
$attach $DB_site->fetch_array($attachmentinfo)) {
    
$name htmlspecialchars($attach['filename']);
    
$postinfo[filename] .= "<a href=\"attachment.php?s=$session[sessionhash]&attachmentid=$attach[attachmentid]\" target=\"_blank\">$name</a> ";
    }

=========
Find
=========

      
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");

==================
Replace With
==================

    
$att explode(",",$postinfo[attachmentid]);
    foreach(
$att as $value) {
       if(isset(
$qry)) {
        
$qry .= " OR attachmentid='$value'";
       } else {
        
$qry "attachmentid='$value'";
       }
    }

      
$DB_site->query("DELETE FROM attachment WHERE $qry"); 

that confused me.....if i should than i got this error

Parse error: parse error, unexpected '}' in /forum/editpost.php on line 437

and what is the attachment.php do??in the zip file.....

rake 04-30-2003 02:57 PM

Yes.
Just delete attachment.php. It shouldn't have been included in the zip in the first place. It was really late so i misplaced a few files.

It also seems you haven't downloaded the new file in the first post yet.

Austin Dea 04-30-2003 03:00 PM

Works now?


All times are GMT. The time now is 11:38 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.01215 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)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