vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Vbjokes (https://vborg.vbsupport.ru/showthread.php?t=98248)

micheal332001 03-19-2006 03:08 PM

Quote:

Originally Posted by bashy
Hi Micheal

Just installed and got this error when i went to vbjokes.php
Any ideas please

Code:

Database error in vBulletin 3.5.3:
 
Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;
 
MySQL Error  : Unknown column 'rating' in 'order clause'
Error Number : 1054
Date        : Sunday, March 19th 2006 @ 02:16:58 PM
Script      : http://www.bashys-place.com/forums/vbjokes.php
Referrer    :

Yes i have followed the instructions
When the product imported i saw it modify the DB on 3 occasions, is this correct?

I know what the problem is and here is what you can do.

Goto your sql in cpanel and look for your TABLE_PREFIX I.E.( vb3_ )vbjokes_jokes

And see if you have these 2 sql feilds there

rating and numberOfVotes

If these are not there you can run this in your sql to add them

PHP Code:

ALTER TABLE `vbjokes_jokesADD `ratingFLOAT10) DEFAULT '0.00' NOT NULL ;
ALTER TABLE `vbjokes_jokesADD `numberOfVotesINT20 ) DEFAULT '0' NOT NULL 

And this will fix your problem

But dont forget to put your sql's table prefix before vbjokes_jokes

bashy 03-19-2006 04:21 PM

Cheers m8...this appeared to sort it :)

Can you remember me asking you if you can sort it so that my mods/smods
can have the control panel for your vBCheats?
Well i dont think ya got round to doing it yet ;)

When you do can you do the same for this one as well please?

Drago912 03-25-2006 07:37 PM

any way to turn the approval off so peeps can upload jokes without waiting?

micheal332001 03-26-2006 06:39 AM

Quote:

Originally Posted by Drago912
any way to turn the approval off so peeps can upload jokes without waiting?

Hi there

This has been answered in these posts

xspazx 04-07-2006 01:27 PM

looks like an all around great hack! i love hacks where members can give content.

xspazx 04-07-2006 07:41 PM

any idea why when i click a joke i get a popup of my index? :(

bashy 04-07-2006 08:00 PM

Hi...

How can i set this so that we dont have to approve the jokes and they go straight through the system please?

fosman 04-17-2006 02:39 PM

Does this work with vbulletin 3.5.4 ?

xspazx 04-20-2006 04:49 PM

http://chewonthat.net/vbjokes.php?do=category

is there a way I can fix this so it doesn't stretch the entire page like shown ^

great hack by the way keep up the good work man! :D

micheal332001 04-20-2006 05:42 PM

Quote:

Originally Posted by bashy
Hi...

How can i set this so that we dont have to approve the jokes and they go straight through the system please?

This has been answered in a few threads back

micheal332001 04-20-2006 05:43 PM

Quote:

Originally Posted by fosman
Does this work with vbulletin 3.5.4 ?

Yes this does work with 3.5.4

micheal332001 04-20-2006 05:44 PM

Quote:

Originally Posted by xspazx
http://chewonthat.net/vbjokes.php?do=category

is there a way I can fix this so it doesn't stretch the entire page like shown ^

great hack by the way keep up the good work man! :D

Im working on this within the next few days so it will not be like that.
When i have sorted it i will post it here the template fix.

xspazx 04-20-2006 05:44 PM

oh okay thanks man great job

xspazx 04-26-2006 06:37 PM

Hey, it's been 6 days..do you have a fix yet

micheal332001 05-05-2006 07:59 PM

Sorry i have not been back on about this i have just moved to a new house.
And have been very buzy working on the pro league system and other things that have not been finished yet.
I will have a fix for this as soon as i can as its only one themplate that needs changing as far as i can see.

xspazx 07-11-2006 01:08 AM

2 months and a few days later..

micheal332001 07-11-2006 06:00 AM

Quote:

Originally Posted by xspazx
2 months and a few days later..

Sorry for the wait i had a big op on my arm and could not use it for some time.
Iv been trying to catch up on all the questions people have been asking on all my hacks and have just got to this one.

Right look in the template

JOKES

find this

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
  <
tr>
   <
td class="tcat">
    <
span class="smallfont">$vbphrase[vbjokes_newest_jokes]</span

and change the table with from 100% to 80% or till you have got it to the right size for your site.

Sorry again for the long wait

Distance 07-24-2006 11:49 AM

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;

MySQL Error : Unknown column 'rating' in 'order clause'
Error Number : 1054
Date : Monday, July 24th 2006 @ 07:48:30 AM
Script : http://www.hullchat.co.uk/vbjokes.php
Referrer : http://www.hullchat.co.uk/index.php?
IP Address : **
Username : **
Classname : vb_database

micheal332001 07-25-2006 06:04 AM

Quote:

Originally Posted by Distance
Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;

MySQL Error : Unknown column 'rating' in 'order clause'
Error Number : 1054
Date : Monday, July 24th 2006 @ 07:48:30 AM
Script : http://www.hullchat.co.uk/vbjokes.php
Referrer : http://www.hullchat.co.uk/index.php?
IP Address : **
Username : **
Classname : vb_database


You have not done this step thats why.



6. login to admincp
goto Plugin System
Manage Products
[Add/Import Product]
EITHER upload the XML file from your computer product-vbjokes-upgrade.xml
Allow Overwrite yes
click inport

7. All done enjoy your vbjokes hack.

xspazx 07-30-2006 10:26 PM

Still messed up severely.

http://chewonthat.net/vbjokes.php?do=category

i give up

micheal332001 07-31-2006 10:40 AM

Quote:

Originally Posted by xspazx
Still messed up severely.

http://chewonthat.net/vbjokes.php?do=category

i give up

I will be sorting this out today and will post the templat edit here.
Sorry for the wait been very buzy.

Hiro 07-31-2006 11:41 AM

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;

MySQL Error : Unknown column 'numberOfVotes' in 'order clause'
Error Number : 1054
Date : Monday, July 31st 2006 @ 10:40:05 PM
Script : http://www.eliteneo.com/vbjokes.php
Referrer : http://www.eliteneo.com/
IP Address :
Username : Zeus
Classname : vb_database

Hiro 07-31-2006 11:55 PM

and yes I did install the xml file.

micheal332001 08-01-2006 04:40 AM

Quote:

Originally Posted by Hiro
Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;

MySQL Error : Unknown column 'numberOfVotes' in 'order clause'
Error Number : 1054
Date : Monday, July 31st 2006 @ 10:40:05 PM
Script : http://www.eliteneo.com/vbjokes.php
Referrer : http://www.eliteneo.com/
IP Address :
Username : Zeus
Classname : vb_database

But did you do this last bit


6. login to admincp
goto Plugin System
Manage Products
[Add/Import Product]
EITHER upload the XML file from your computer product-vbjokes-upgrade.xml
Allow Overwrite yes
click inport


As this installs them sql tables

micheal332001 08-06-2006 09:55 AM

I have not tested this on 3.6 yet but i will be very soon.
If there is a problem with this being installed on 3.6 i will make a fix and re-release it in the 3.6 add-ons

Harley D 10-16-2006 10:44 PM

Quote:

Originally Posted by micheal332001
But did you do this last bit


6. login to admincp
goto Plugin System
Manage Products
[Add/Import Product]
EITHER upload the XML file from your computer product-vbjokes-upgrade.xml
Allow Overwrite yes
click inport


As this installs them sql tables

Same database error as the others on 3.54, and yes l followed the instructions to the "T" I would really like to use this, if you need to see my database, Admincp or anything else to figure out the problem, Please just let me know.

010081 01-04-2007 07:17 AM

Database error in vBulletin 3.6.4:

Invalid SQL:
SELECT * FROM vbjokes_jokes WHERE aprove=1 ORDER BY rating/numberOfVotes DESC LIMIT 0 , 3;

MySQL Error : Unknown column 'rating' in 'order clause'
Error Number : 1054
Date : Thursday, January 4th 2007 @ 03:15:30 AM
Script : http://www.zonemedicine.com/forums/vbjokes.php
Username : zonemedicine
Classname : vb_database

anything i can do to getr working for 6.4

Logician 02-09-2007 08:03 AM

I'm sorry to say this but you should really stop using $_GET variables in the SQL queries without properly cleaning them up in the code.

In your code, you have many SQL queries like:

PHP Code:

SELECT COUNT(*) AS jokecatid
  FROM 
" . TABLE_PREFIX . "vbjokes_jokes AS vbjokes_jokes
  WHERE jokecatid
='{$_GET['cid']}' 

and I couldn't find any attempt to clean incoming $_GET['cid'] variable before directly using in the query. I don't want to mention the problems it can cause, I'm sure you are well aware of them.

Please clean them up like
PHP Code:

 $vbulletin->input->clean_array_gpc('r', array(
  
'cid' =>TYPE_INT
 
));
 
SELECT COUNT(*) AS jokecatid
  FROM 
" . TABLE_PREFIX . "vbjokes_jokes AS vbjokes_jokes
  WHERE jokecatid
='$vbulletin->GPC[cid]' 

in your to avoid some unwanted results..

Marco van Herwaarden 02-09-2007 08:21 AM

Serious vulnerabilities have been found in this modification. Files have been removed according to Official Policy: When Security Vulnerabilities in Hacks are Found

Author will be contacted to address these vulnerabilities. Thread closed until update provided by author.


All times are GMT. The time now is 12:25 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.01383 seconds
  • Memory Usage 1,821KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)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