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)

squawell 04-30-2003 04:35 PM

rake i redownload the zip file and redo the editpost.php adn i got this error

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

and in ur txt file u say
PHP Code:

================
Find This works with the "add attachment on edit post" hack
================

    eval(
"\$editattachment = \"".gettemplate("newpost_attachment")."\";");


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

    
$maxattachsize_temp getmaxattachsize ();
    
mt_srand ((double) microtime() * 1000000);
    
$posthash md5(mt_rand());
    
$poststarttime time();
    
$forumid $threadinfo[forumid];
    eval(
"\$editattachment = \"".gettemplate("newpost_attachment")."\";"); 

above this

eval("\$editattachment = \"".gettemplate("newpost_attachment")."\";");

already have this

$maxattachsize_temp = getmaxattachsize ();

so i think it should be
PHP Code:

 $maxattachsize_temp getmaxattachsize ();
eval(
"\$editattachment = \"".gettemplate("newpost_attachment")."\";");

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

 
$maxattachsize_temp getmaxattachsize ();
    
mt_srand ((double) microtime() * 1000000);
    
$posthash md5(mt_rand());
    
$poststarttime time();
    
$forumid $threadinfo[forumid];
    eval(
"\$editattachment = \"".gettemplate("newpost_attachment")."\";"); 

and i have install custom prefix hack i dont know if that will effect this hack...

rake 04-30-2003 06:42 PM

iggy: You must have have done the hacking incorrectly.

squawell:

PHP Code:

=============
Still in editpost.phpfind:
      
$attids implode(","$attid);
      
$attids iif($attids=="",0,$attids);
      
$attachmentsql=",attachmentid='$attids'";
            }
And 
replace with:
      
$attids implode(","$attid);
      
$attids iif($attids=="",0,$attids);
      
$attachmentsql=",attachmentid='$attids'"

This part deals with that error.

iggy123 04-30-2003 06:55 PM

Ok i have gone through the code and found an extra } in the code, when i deleted that everything worked fine (ish)

Now the dreeded "you don't have permission to access this page" is back LOL

ok found the fix for the permissions problem....


https://vborg.vbsupport.ru/showthrea...160#post389160

if you apply the changes in that post it works fine Until you try to edit the posts and then i get the following error message:

PHP Code:

Database error in vBulletin 2.3.0:

Invalid SQLSELECT filename,attachmentid FROM attachment WHERE 
mysql error
You have an error in your SQL syntax near '' at line 1

mysql error number
1064

Date
Wednesday 30th of April 2003 03:10:42 PM
Script
: [url]http://xxxxx/forums/forums/editpost.php?action=editpost&postid=3361[/url]
Referer: [url]http://xxxxxx/forums/showthread.php?threadid=459[/url]
Repair ReportThis type of error cannot be automatically repaired


squawell 04-30-2003 06:58 PM

Quote:

Today at 03:42 AM rake said this in Post #92
iggy: You must have have done the hacking incorrectly.

squawell:

PHP Code:

=============
Still in editpost.phpfind:
      
$attids implode(","$attid);
      
$attids iif($attids=="",0,$attids);
      
$attachmentsql=",attachmentid='$attids'";
            }
And 
replace with:
      
$attids implode(","$attid);
      
$attids iif($attids=="",0,$attids);
      
$attachmentsql=",attachmentid='$attids'"

This part deals with that error.

ok i got that work~~~but when i click the post where have multiple attachment files and i got this error

Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql error number: 1064

rake 04-30-2003 07:17 PM

Well, i've removed every instance of that in the updated zip. What file does that appear in?

rake 04-30-2003 07:19 PM

Quote:

Today at 08:55 PM iggy123 said this in Post #93
Ok i have gone through the code and found an extra } in the code, when i deleted that everything worked fine (ish)

Now the dreeded "you don't have permission to access this page" is back LOL

ok found the fix for the permissions problem....


https://vborg.vbsupport.ru/showthrea...160#post389160

if you apply the changes in that post it works fine Until you try to edit the posts and then i get the following error message:

PHP Code:

Database error in vBulletin 2.3.0:

Invalid SQLSELECT filename,attachmentid FROM attachment WHERE 
mysql error
You have an error in your SQL syntax near '' at line 1

mysql error number
1064

Date
Wednesday 30th of April 2003 03:10:42 PM
Script
: [url]http://xxxxx/forums/forums/editpost.php?action=editpost&postid=3361[/url]
Referer: [url]http://xxxxxx/forums/showthread.php?threadid=459[/url]
Repair ReportThis type of error cannot be automatically repaired



first post. :speechless:

squawell 04-30-2003 07:20 PM

Quote:

Today at 04:17 AM rake said this in Post #95
Well, i've removed every instance of that in the updated zip. What file does that appear in?
rake in my case

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql error number: 1064

Date: Thursday 01st of May 2003 04:16:28 AM
Script: http://xxxx/forum/forum/attachment.p...tachmentid=234
Referer: http://xxxx/forum/showthread.php?s=&...=1382#post1382

iggy123 04-30-2003 07:22 PM

If i delete the attatchment.php it works fine - kind of, I can edit the post , add new files but can't view them.
If i keep the attachment.php i get the sql error so I assume its something in there that is causing the errors..

GaleForce 04-30-2003 07:23 PM

Good job! I may install this later if I have some time :D

rake 04-30-2003 07:24 PM

Quote:

Today at 09:20 PM squawell said this in Post #97
rake in my case

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT licensedviewforum,licensedattach FROM forum WHERE forumid=
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

mysql error number: 1064

Date: Thursday 01st of May 2003 04:16:28 AM
Script: http://xxxx/forum/forum/attachment.p...tachmentid=234
Referer: http://xxxx/forum/showthread.php?s=&...=1382#post1382

Not in my hack. ;)



NOTE TO EVERYONE WHO USED THE ATTACHMENT.PHP FROM THE OLD ZIP:
Replace it with your original one.


All times are GMT. The time now is 04:51 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.01324 seconds
  • Memory Usage 1,781KB
  • 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
  • (6)bbcode_php_printable
  • (4)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