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-05-2006 02:14 AM

Ok, No problem, glad you got it working. Also do you remember what kind of errors it gave you when you tried uploading the images?

puertoblack2003 02-05-2006 03:04 PM

Quote:

Originally Posted by derekivey
Ok, No problem, glad you got it working. Also do you remember what kind of errors it gave you when you tried uploading the images?

sorry D, i think i spoke to soon..but was to tired last night and had to give this a break...as far as the error message can't find my text files because i normally save the error .some how i didn't save it ,it was just when u upload a pic file from home pc file to server it was then giving me the error message that i was unable to upload....now back to the error for the rating..on page 16 verse 234 i followed the instruction to run queries..i ran the queries but when i want to rated a site i get that same error ..i'm stuck what else do you want me to look at.
Code:

Database error in vBulletin 3.5.1:

Invalid SQL:
SELECT * FROM toplist_ratings WHERE site_id='1' && username='puertoblack2003';

MySQL Error  : Table 'puertotech.toplist_ratings' doesn't exist
Error Number : 1146
Date        : Sunday, February 5th 2006 @ 08:56:52 AM
Script      : http://www.loveforlife.com/toplist.php?do=rate&id=1
Referrer    :
IP Address  : xxxxx.xxxx.xxx
Username    : xxxxxxxxxxxxx
Classname    : vb_database

believe me i was read through the hole thread here.. :ermm:

comment: also i ran the queries and seem to be in there i double checked everything just waiting for you i'm stuck :ermm:

derekivey 02-05-2006 06:36 PM

For some reason it looks like the SQL table for the ratings didn't get created. Try executing this code in PHPMyAdmin, or vB's query page in the AdminCP.

[sql]
CREATE TABLE `toplist_ratings` (
`id` int(10) NOT NULL auto_increment,
`site_id` int(10) NOT NULL default '0',
`username` varchar(255) NOT NULL default '',
`rating` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
[/sql]

Also if you have a table prefix, be sure to add that to the table name also.

Derek

forumsoup.com 02-05-2006 06:39 PM

Just wondering, because I really don't know. Why would a site have a toplist?

puertoblack2003 02-05-2006 06:50 PM

Quote:

Originally Posted by derekivey
For some reason it looks like the SQL table for the ratings didn't get created. Try executing this code in PHPMyAdmin, or vB's query page in the AdminCP.

[sql]
CREATE TABLE `toplist_ratings` (
`id` int(10) NOT NULL auto_increment,
`site_id` int(10) NOT NULL default '0',
`username` varchar(255) NOT NULL default '',
`rating` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
[/sql]

Also if you have a table prefix, be sure to add that to the table name also.

Derek



got to love u man...lol... :rolleyes: it worked know i have to figure out how to resolve the new version....error message will keep you informed

derekivey 02-05-2006 11:24 PM

Quote:

Originally Posted by forumsoup.com
Just wondering, because I really don't know. Why would a site have a toplist?

They are mainly used to let users post their site and help get traffic to the different sites. Also at the same time they put a link on their site to your and it counts the hits in.

Quote:

Originally Posted by nievesidenshop
got to love u man...lol... :rolleyes: it worked know i have to figure out how to resolve the new version....error message will keep you informed

Ok, please let me know if you see the error again.

Thanks,
Derek

tasarimdunyasi 02-07-2006 01:52 PM

hi,

first:

when i delete a site using admin panel, i see that message:

Warning: unlink(/**************public_html/images/toplist/buttons/sites/forumbit_14): No such file or directory in /*****cp/toplist_admin.php on line 646
deleting succesfull..


second:

when I'm adding a new site, toplist looks like that althoug i don't use a picture. why it try to screen image although i use blank: http://img291.imageshack.us/img291/7020/example7px.jpg

sorry for my english. :(

thanks

Guest210212002 02-07-2006 05:26 PM

Installed and working almost perfectly. Couple of questions:

- Where do I edit/add the missing image in the attached pic?

- How do I set the allowed image types? I made the edits to the files in post 463, but it still wants "JPEG" instead of "JPG".

Thanks!

derekivey 02-07-2006 07:01 PM

Quote:

Originally Posted by tasarimdunyasi
hi,

first:

when i delete a site using admin panel, i see that message:

Warning: unlink(/**************public_html/images/toplist/buttons/sites/forumbit_14): No such file or directory in /*****cp/toplist_admin.php on line 646
deleting succesfull..


second:

when I'm adding a new site, toplist looks like that althoug i don't use a picture. why it try to screen image although i use blank: http://img291.imageshack.us/img291/7020/example7px.jpg

sorry for my english. :(

thanks

Just ignore the error, that just means the file isn't there. I will make it not show the error in the next release.

Also can you PM me the url to your forum and a test account so that I can try the 2nd thing? It shouldn't be showing anything if you leave the image field blank.

Quote:

Originally Posted by Chris-777
Installed and working almost perfectly. Couple of questions:

- Where do I edit/add the missing image in the attached pic?

- How do I set the allowed image types? I made the edits to the files in post 463, but it still wants "JPEG" instead of "JPG".

Thanks!

For the image to show, you need to edit the images/toplist/buttons/dynamic/image.png file in a text editor such as notepad. You need to change the path from what I have to your path. See this post for more info.

For your second question, did you add $image_type == "image/jpg" to the if statement?

Derek

Guest210212002 02-07-2006 08:13 PM

Thanks for the quick reply Derek. Got the broken image sorted out, thanks very much. :D

For the JPEG problem, I don't want ".jpeg" at all, so I changed all the instances listed from ' OR $image_type == "image/jpeg"' to OR $image_type == "image/jpg". I assume that should have worked as well, no?

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

ShannonRawls 02-09-2006 01:31 AM

Toplist still not working for me.

After a user adds a site (without an image), the confirmation page still has the broken image in the middle.
I did update the "image.png" file with my server path to my forum ('/home/myuser/public_html'), but it still does not work. My forum is in the root directory.
Still...the image is broken

Also...if a user tries to add a site and upload an image with it, theres an error saying it is not a correct file, even though it is.

Will there be an update to this wonderful hack soon?

- ShannonRawls.com

derekivey 02-09-2006 09:54 AM

Can you paste me the contents of your image.png file please? If you don't want to post it here, please send it to me in a PM.

Also what file type is it saying the file is when they try uploading it?

Thanks,
Derek

ShannonRawls 02-09-2006 01:56 PM

its a regular ole jpg that wont upload. I have sent you the image.png file in PM

thank you kindly for your supoort and diligence.

- ShannonRawls.com

derekivey 02-09-2006 06:46 PM

Quote:

Originally Posted by ShannonRawls
its a regular ole jpg that wont upload. I have sent you the image.png file in PM

thank you kindly for your supoort and diligence.

- ShannonRawls.com

Replied to your PM. Can you please tell me what it says the file type is on the error message? It should say something like
Quote:

The format of the file you uploaded is
Please paste me what it says.

Thanks,
Derek

Gallio 02-12-2006 08:30 AM

I seem to have a problem, I'm not sure if i'm uploading wrong but when I click the Add Site it takes me here http://www.Example.com//add_site.php It should look like this
http://www.Example.com/forum/add_site.php Is there a way to fix this? Can anyone help?

derekivey 02-12-2006 01:09 PM

Make sure you set your forums url right (vBulletin Options -> vBulletin Options -> Site Name / URL / Contact Details).

Derek

BigSoccer Tech. 02-13-2006 06:08 PM

Quote:

Originally Posted by derekivey
Make sure you set your forums url right (vBulletin Options -> vBulletin Options -> Site Name / URL / Contact Details).

Derek

the edit feature in admincp doesn't seem to work. i change cats but it doesn't record the change.

derekivey 02-13-2006 06:38 PM

I will take a look at this. Thank You for reporting it.

Derek

derekivey 02-14-2006 01:22 AM

Yup, that is indeed a bug. It looks like that feature got broken. I will release a fix shortly.

Thanks again for reporting it.

Derek

derekivey 02-14-2006 01:28 AM

Ok heres the fix:

Open admincp/toplist_admin.php.

Find:
PHP Code:

'cid' => TYPE_UINT

Replace with:
PHP Code:

'category' => TYPE_UINT

That should fix it, let me know if you still have this problem.

Thanks,
Derek

mat64 02-14-2006 02:02 PM

I'm getting this on install:

Quote:

Database error in vBulletin 3.5.3: Invalid SQL: ALTER TABLE `toplist_sites` ADD `status` VARCHAR( 20 ) DEFAULT 'active' NOT NULL AFTER `out`;;

derekivey 02-14-2006 06:39 PM

Did you modify the product file at all? It should install fine.

Derek

mat64 02-14-2006 08:13 PM

No I have even downloaded the files again and replaced and it still dosnt work.

Quote:

Invalid SQL: ALTER TABLE `toplist_sites` ADD `status` VARCHAR( 20 ) DEFAULT 'active' NOT NULL AFTER `out`;;

MySQL Error : Duplicate column name 'status'

derekivey 02-14-2006 08:39 PM

Ok, I'll take a look at it and see if I can find out whats wrong.

Derek

ConKien 02-15-2006 09:50 PM

I think when a user modify, it should also show the code to paste on their site for incoming hits. Or have it available somewhere as [Get Code] or something. Right now, there's no link to get the code if you not get it right after submission?

Beside that, it's a wonderful script. Work flawless on the first install!

Thanks Derekivey!

loonytune15 02-16-2006 12:49 AM

ok I am having probs with the buttons again.

A member has added in his site and the button shows up in the admin cp and the toplist, but not on the forumhome scrolling list of sites, it only shows up as a red x.

any ideas?

derekivey 02-16-2006 02:47 AM

Quote:

Originally Posted by ConKien
I think when a user modify, it should also show the code to paste on their site for incoming hits. Or have it available somewhere as [Get Code] or something. Right now, there's no link to get the code if you not get it right after submission?

Beside that, it's a wonderful script. Work flawless on the first install!

Thanks Derekivey!

It should show it also when they edit their site. I like you idea of adding a link they can click to also get the code. I'll see about adding this to the next version.

Quote:

Originally Posted by loonytune15
ok I am having probs with the buttons again.

A member has added in his site and the button shows up in the admin cp and the toplist, but not on the forumhome scrolling list of sites, it only shows up as a red x.

any ideas?

I'll take a look at it tomorrow, I'm going to bed now lol.

Derek

Delazar 02-16-2006 06:21 PM

Hello,

is it possible to type more than 255 signs, if yes, where can I set it up, if not, can you include this feature in your next update?

thanks

derekivey 02-16-2006 07:35 PM

255 Characters of what? If you want to accept more, you will need to edit the appropriate database field and change it's type from VARCHAR to something else such as text or something.

Derek

Delazar 02-17-2006 10:20 AM

I’m talking about the text “Site Name & Description”, where only 255 characters are allowed.
Can I change this in the ACP? If not, could you add this feature?
If you can not add it, where can I change it in the database?


All times are GMT. The time now is 05:24 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.02006 seconds
  • Memory Usage 1,860KB
  • 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_code_printable
  • (5)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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