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)
-   -   Attachment Editor (https://vborg.vbsupport.ru/showthread.php?t=34625)

Boofo 06-06-2002 10:20 AM

Thanks, Chen, at least now I know not to look in that direction. How about CGI or HTML? In your opinion, can it be done with either one of those (before I start digging into it and finding out the same)? :)

Quote:

Originally posted by FireFly
You can't look into the browser's computer with PHP. :)

Admin 06-06-2002 11:31 AM

I don't think so, no.

Boofo 06-06-2002 12:27 PM

It was worth a shot, anyway. Thanks. :)

Quote:

Originally posted by FireFly
I don't think so, no.

Slynderdale 06-06-2002 01:29 PM

hmm, i was trying to fix the permission up becayse the way you have it, it lets any moderator, super moderator, admin and the one who posted it edit it, im trying to make it so it checks the users permission first and see if they are a moderator in the forum or have the editpost permission and if there the one that posted it, if there not, they cant see the edit link or edit the file but i cant seem to get it to work, i tried using this
PHP Code:

   if (!isset($postid)) {
          
$postinfo=$DB_site->query_first("SELECT postid FROM post WHERE attachmentid=$attachmentid");
          
$postid=$postinfo[postid];
        }
        
$postinfo=getpostinfo($postid);
        
$threadinfo=getthreadinfo($postinfo[threadid]);
        
$getperms=getpermissions($threadinfo[forumid]);
        if (!
ismoderator($threadinfo[forumid],"caneditposts")) { // check for moderator
          
if (!$threadinfo[open]) {
            eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]\");");
            exit;
          }
          if (!
$getperms[caneditpost]) {
              
show_nopermission();
          } else {
            if (
$bbuserinfo[userid]!=$postinfo[userid]) {
              
// check user owns this post
               
show_nopermission();
             } else {
              
// check for time limits
              
if ($postinfo[dateline]<(time()-($edittimelimit*60)) and $edittimelimit!=0) {
                eval(
"standarderror(\"".gettemplate("error_edittimelimit")."\");");
                exit;
              }
            }
          }
        } 


Slynderdale 06-06-2002 01:32 PM

thats the only problem im having, after i get this fix, im gonna add a field in the admin options under attachments where you can specify what attachment files can be edited with it, like txt php nfo and so on

Boofo 06-06-2002 01:35 PM

I'd be very interested in seeing it when you are done. :)

Quote:

Originally posted by Slynderdale
thats the only problem im having, after i get this fix, im gonna add a field in the admin options under attachments where you can specify what attachment files can be edited with it, like txt php nfo and so on

Slynderdale 06-06-2002 01:42 PM

Quote:

Originally posted by Boofo
I'd be very interested in seeing it when you are done. :)


when im done ill release it for every one, also a edit so it works with saving attachments as files too, for those who have that installed

Boofo 06-06-2002 01:47 PM

looking forward to it. Scott just got his Attachments as Files hack working with Chen's attachment editor, so you picked a good time to release it. :)

Slynderdale 06-06-2002 01:54 PM

Quote:

Originally posted by Boofo
looking forward to it. Scott just got his Attachments as Files hack working with Chen's attachment editor, so you picked a good time to release it. :)
wouldnt be hard to do, if its a editable file just have it open the file like they have it with avatars on other websites, read the data inside and store it as a varible

Boofo 06-06-2002 01:58 PM

You're way over my head on this one. :) I'll take your word for it. :)


All times are GMT. The time now is 05:53 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.03671 seconds
  • Memory Usage 1,752KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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