vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Image/File Uploader (https://vborg.vbsupport.ru/showthread.php?t=69088)

TCB 09-07-2004 03:27 PM

Thanks, I will try :D


While editing the showthread_quickreply template, I kinda lost it after this:
Quote:

<!--######## Scroll down about 3/4 of the page, look for: ######## -->

Look for your signature fieldset, and ABOVE IT, ADD:
What is the exact line that I need to look for, so that I can put the next thing above it? Because after 'look for' there's nothing to look for :surprised:

tnguy3n 09-07-2004 10:29 PM

Quote:

Originally Posted by TCB
Thanks, I will try :D


While editing the showthread_quickreply template, I kinda lost it after this:


What is the exact line that I need to look for, so that I can put the next thing above it? Because after 'look for' there's nothing to look for :surprised:


in showthread_quickreply, find:
HTML Code:

                        <tr>
                                <td align="$stylevar[left]">
                               
                                        <fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
                                                <legend>$vbphrase[options]</legend>
                                                <div>
                                                        <if condition="$bbuserinfo['signature']">
                                                                <div style="float:$stylevar[right]">
                                                                        <label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label>
                                                                </div>
                                                        </if>
                                                        <label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
                                                </div>
                                        </fieldset>
                               
                                </td>
                        </tr>

Above it, add:

HTML Code:

                        <tr>
                                <td align="$stylevar[left]">
                               
                                        <fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
                                                <legend>Smilies & Image Uploader Option</legend>                                                       
        <if condition="(is_member_of($bbuserinfo, 5)) OR (is_member_of($bbuserinfo, 6)) OR (is_member_of($bbuserinfo, 7)) OR (is_member_of($bbuserinfo, 8)) OR (is_member_of($bbuserinfo, 9)) OR (is_member_of($bbuserinfo, 11))">
        <div style="float:$stylevar[right]"><lable>[<a href="uploader.php?$session[sessionurl]" onClick="return popup(this, 'notes');">Image Uploader</a>]</lable></div></if>
                                        </fieldset>
                               
                                </td>
                        </tr>


Milorad 09-14-2004 03:52 PM

what happens if a file already exists?

if its overwritten is there a way to make it generate an error instead?

tnguy3n 09-14-2004 09:26 PM

Quote:

Originally Posted by Milorad
what happens if a file already exists?

if its overwritten is there a way to make it generate an error instead?

It won't overwrite, but to print an error message instead.

Natch 09-15-2004 12:26 AM

What about security issues - will it test to see if the file is an image ?

Reason I ask, is that with a tool like this, someone could upload a FTP php script and then access your whole server with web-server privileges...

tnguy3n 09-15-2004 03:47 PM

Quote:

Originally Posted by Natch
What about security issues - will it test to see if the file is an image ?

Reason I ask, is that with a tool like this, someone could upload a FTP php script and then access your whole server with web-server privileges...

You can set certain file extensions to be uploaded. Default set: jpg, jpeg, gif, png

Natch 09-15-2004 05:57 PM

Just checking that it will reject evilscript.jpg.php ?

tnguy3n 09-18-2004 10:29 PM

Quote:

Originally Posted by Natch
Just checking that it will reject evilscript.jpg.php ?

I used strrchr() function which searches from the end of the filename; therefore, .php will match as in evilscript.jpg.php.

Natch 09-20-2004 12:06 AM

I'll shaddup now then ;)

Ber|Art 10-18-2004 02:11 PM

Thank, very nice addition :)


All times are GMT. The time now is 12:08 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.01065 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
  • (2)bbcode_html_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