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)

cindyd 08-03-2003 06:34 PM

I also have a Moderator group that cannot see the picture she uploaded and when she clicks on the link, she gets a message saying she doesn't have permission to view this page.

Please, can someone work with me on this?

Oh, this was so simple, it's embarassing to even talk about.....I got it fixed. I knew it had to do with permissions somehow, but I thought it was more complicated than having the Profile set to YES to Show Images. Egads

Hobbes 08-04-2003 05:21 AM

rarg....i'm getting asn sql error when trying to delete a post with an attachment...


here is the lines....10 above and below in functions...

PHP Code:


// ###################### Start delete post #######################
function deletepost($postid,$countposts=1,$threadid=0) {
  global 
$DB_site;

  
// decrement user post count
  
if ($postinfo=getpostinfo($postid)) {
    if (
$countposts) {
      
$storeadmin $DB_site->query_first("SELECT newreply FROM storeadmin");
$storem=$storeadmin[newreply];
$DB_site->query("UPDATE user SET posts=posts-1,storep=storep-'$storem' WHERE userid='$postinfo[userid]'");

    }
    if (
$postinfo['attachmentid']) {
            
// make sure you don't remove attachments still in use $att = explode(",",$postinfo[attachmentid]);
                
foreach($att as $value) {
                   if(isset(
$qry)) {
                    
$qry .= " OR attachmentid='$value'";
                   } else {
                    
$qry "attachmentid='$value'";
                   }
                }
            
$otherattachs=$DB_site->query("SELECT attachmentid FROM post WHERE $qry AND threadid<>'$postinfo[threadid]'");
            if (
$DB_site->num_rows($otherattachs)==0) {
                
$DB_site->query("DELETE FROM attachment WHERE $qry");
        
$DB_site->query("UPDATE thread SET attach = attach - 1 WHERE threadid = '$threadid'");
            }
    }

    
$DB_site->query("DELETE FROM post WHERE postid='$postid'");
  }



any idea?

cindyd 08-16-2003 03:07 PM

Will there be a fix for editing a post? The posts disappear when they are edited.

Megadeuce 08-19-2003 08:07 PM

Also, is there a way to give a name to file right next to the attachment? for example

Attachment Hack vbattach.zip ?

lifesourcerec 08-26-2003 09:13 PM

The hack works fine, but when I try to "update counters", I get this error.

Quote:

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE thread SET lastpost=1061935004,replycount=0,postusername='all star', postuserid='39', lastposter='allstar',attach= WHERE threadid=1563
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 'WHERE threadid=1563' at line 1

mysql error number: 1064
I know it probably was my error, but the instructions were a little bit confusing considering the original hack and modification for "add attachment on edit post" were combined. Is there a way to fix this?

MaDCaT75 09-15-2003 11:24 PM

This hack made my smilies in my quick reply dissapear! I am very mad!!!!!

Mistah Roth 09-21-2003 07:42 PM

Alright I installed the vb3 Attachments hack a while back - the one that lets you post multiple attachments and such. Now I just installed this hack as well, and low and behold the two conflict with each other.

The thing is, old attachments work fine after I did that scan thing to them all, but when I try to post new attachments I get a bunch of errors:

Quote:

Warning: filesize(): Stat failed for /home/virtual/site4/fst/var/www/html/attachments/.file (errno=2 - No such file or directory) in /home/virtual/site4/fst/var/www/html/attachment.php on line 59

Warning: fopen(): Unable to access /home/virtual/site4/fst/var/www/html/attachments/.file in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fopen(/home/virtual/site4/fst/var/www/html/attachments/.file): failed to open stream: No such file or directory in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fread(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 61

Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site4/fst/var/www/html/attachment.php:59) in /home/virtual/site4/fst/var/www/html/attachment.php on line 68
Any thought as to getting the two hacks to integrate together? Or anyway to fix the problems im having?

MaDCaT75 09-22-2003 02:33 AM

Maybe un-install the old one first?

squawell 09-22-2003 04:58 AM

Quote:

Originally Posted by lifesourcerec
The hack works fine, but when I try to "update counters", I get this error.



I know it probably was my error, but the instructions were a little bit confusing considering the original hack and modification for "add attachment on edit post" were combined. Is there a way to fix this?

i think u can sovled the problem here,take look the link

http://www.vbulletin.com/forum/showt...546#post463546

Mistah Roth 09-22-2003 06:54 PM

Quote:

Originally Posted by MaDCaT75
Maybe un-install the old one first?

People have already made multiple attachments, if I took it off it would take away the multiple attachments, and probably screw some things up


All times are GMT. The time now is 07:54 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.01874 seconds
  • Memory Usage 1,759KB
  • 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
  • (1)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