vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Toplist (https://vborg.vbsupport.ru/showthread.php?t=98646)

derekivey 02-07-2006 09:04 PM

Wait, so you are saying you are removing .jpeg as well as .jpg? If so removing those should do the trick.

I'm kind of confused, sorry.

Derek

Guest210212002 02-07-2006 10:05 PM

I'm trying to disallow "jpeg" and allow "jpg". ;)

Quote:

Sorry, your image could not be uploaded because the format of it is not allowed. Allowed formats are GIF, JPEG, and PNG

The format of the file you uploaded is .

Please go back and select a new image or leave the image field blank.

It's odd that it's not even recognizing the file format.

From add_site:
Code:

if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png")
                                {
                                        $length = 20;
                                        $key_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
                                        $rand_max = strlen($key_chars) - 1;

Edit_site:

Code:

if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png")
                        {
                                $length = 20;
                                $key_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
                                $rand_max = strlen($key_chars) - 1;

Admin:

Code:

if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png")
                {
                        $length = 20;
                        $key_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
                        $rand_max = strlen($key_chars) - 1;

                        for ($i = 0; $i < $length; $i++)

And

Code:

if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png")
                {
                        $length = 20;
                        $key_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
                        $rand_max = strlen($key_chars) - 1;

Is it possible to just remove the check altogether?

derekivey 02-07-2006 11:18 PM

Yeah, just remove the following code in each file:
PHP Code:

        if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png")
        { 

and this part... it looks a little different in each file so you may have to search a little for it.
PHP Code:

        else
        {
            
$vbphrase['toplist_incorrect_image_format'] = str_replace('[1]'$image_type$vbphrase['toplist_incorrect_image_format']);
            
$html $vbphrase['toplist_incorrect_image_format'];
            eval(
'print_output("' fetch_template('Toplist_Add_Site') . '");');
        } 

That should remove the check, make sure to backup the files first in case anything goes wrong.

Derek

Guest210212002 02-08-2006 01:15 AM

But my code looks correct otherwise, eh? :\

I do like the check, just not sure why it isn't working.

Btw, making those edits hoses the page. It kills the if loop.

Guest210212002 02-08-2006 01:22 AM

Well, I got it half working. I added:

OR $image_ext = ".jpg" to the statement.

If I add a site, it accepts the image, but the image shows up as a red X. If I edit that same site and readd the same image, it works. I'm looking at the loop for add and edit, and they look identical.

/me scratches his head

derekivey 02-08-2006 02:14 AM

Can you paste me the if statement that you have?

Guest210212002 02-08-2006 03:53 PM

Code:

if ($image_type == "image/gif" OR $image_type == "image/pjpeg" OR $image_type == "image/jpeg" OR $image_type == "image/x-png" OR $image_ext == ".jpg" OR $image_type == "image/jpg")

derekivey 02-08-2006 06:58 PM

Try this:
PHP Code:

if ($image_type == "image/gif" OR $image_type == "image/x-png" OR $image_type == "image/jpg"

Derek

yayvb 02-08-2006 09:56 PM

Recently my users have been asking questions regarding their anonymity as far as IP addresses are concerned. I've taken several precautions against ip's being logged, but now someone wants to know what keeps track of things coming in and out if IPs aren't logged. Are they being logged somewhere? haha, if so probably can't really disable that, and wouldn't want to i guess for incoming to the site atleast. :(

My next step is to see if phpadsnew logs ip addresses, I'm sure my cpanel stat software does too.

derekivey 02-09-2006 12:39 AM

Hi,

The IP Addresses are stored in the toplist_clicks table. Thats basically the only way to keep track of who clicked in. They are only stored there for In clicks, not out clicks. I don't see why your users would care though because even your web server logs all ip addresses that go to your site...

Derek


All times are GMT. The time now is 09:19 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.02416 seconds
  • Memory Usage 1,753KB
  • 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
  • (5)bbcode_code_printable
  • (3)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
  • (4)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