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 10-11-2005 10:00 PM

Vbjokes
 
Downloads for this modification have been removed according to Official Policy: When Security Vulnerabilities in Hacks are Found

VBjokes what is it.

Well vbjokes is a jokes database system for holding all your jokes in one place.

with vbjokes the user can search for a joke or just look around in the categorys.

All members of the site will be able to add a joke to the database but the admin will have to approve the joke before anyone on your site can see it.

The user has the option to view the jokes in a popup and by clicking the image if the joke has one to see the larger picture.

The users can now rate a joke out of 5 this now uses images to show the rating.

The admin can do

The admin can add new categorys edit or delete them.

View edit delete jokes.

Approve new jokes.

Turn vbjokes on or off.


Phrases Fixed

Have fixed the phrases and added a rate system for the jokes.

Fixed the upgrade xml file as you can see there is a product-vbjokes-upgrade.xml file
This is to upgrade all versions of vbjokes to 1.0.3
When you view this in the manage products it will say version 1.0.2
but if you click edit it will show that 1.0.3 has been installed.

Also fixed when viewing whos online it will say viewing vbjokes with a link to the jokes.

some template changes too where it only showed the newest jokes it now shows newest top hit and top rated jokes at the bottom of every page.

Install notes

Installation
1. Upload files as-is to board but not the product-vbjokes.xml file.

2. Log into admincp, Goto Plugin System then manage pruducts click [Add/Import Product]
then inport the product-vbjokes.xml file.

3. navigate back into admincp, (might need a refresh to get nav options)

4. click vbjokes, then vbjokes settings, activate vbjokes

5. Edit navbar in navigation / breadcrumb templates
************************************************** ************
Find
************************************************** ************
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
************************************************** ************
Add under
************************************************** ************
<td class="vbmenu_control"><a href="vbjokes.php">VBjokes</a></td>
************************************************** ************

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.

Please donate to my work Click Here


DS MrSinister 10-12-2005 08:26 PM

Just install verynice. Great job m8!..

Keeping them coming.!

:)

:banana:

micheal332001 10-12-2005 08:31 PM

your welcome m8

Gizmo5h1t3 10-12-2005 08:43 PM

getting an error when i try to activate the vb jokes in the admin cp.


"could not find phrase vbjokes_cp_redirect"

any ideas??

installed as instructed
the vbjokes show up when u click in the navbar tho???

also, it says the phrase is missing when u add a category??????

yet the category gets added??

WEIRD!!


EDIT..*YAWN*

MYSQL DB ERROR when adding a joke.....


Quote:

This hack is very simple to use but i have not added the phrases as i dont know how to do that.

So if someone is willing to update the product_vbjokes.xml file please do as this will help me.

Im a bit new to the use of xml files for installing this is why i have done the easy part.

that might explain why it aint working...:(

micheal332001 10-12-2005 08:49 PM

Quote:

Originally Posted by Gizmo5h1t3
getting an error when i try to activate the vb jokes in the admin cp.


"could not find phrase vbjokes_cp_redirect"

any ideas??

installed as instructed
the vbjokes show up when u click in the navbar tho???

also, it says the phrase is missing when u add a category??????

yet the category gets added??

WEIRD!!

I put upto the phrases are not working but the vbjokes will work just fine with out the phrases. So your install is all working and install just how the install file should install the vbjokes.
So there is nothing to worry about

Gizmo5h1t3 10-12-2005 08:51 PM

there is mate, i cant add jokes
i get a database error??

micheal332001 10-12-2005 08:54 PM

cab you post the database error and i will tell you why.

micheal332001 10-12-2005 08:59 PM

Quote:

Originally Posted by Gizmo5h1t3
getting an error when i try to activate the vb jokes in the admin cp.


"could not find phrase vbjokes_cp_redirect"

any ideas??

installed as instructed
the vbjokes show up when u click in the navbar tho???

also, it says the phrase is missing when u add a category??????

yet the category gets added??

WEIRD!!


EDIT..*YAWN*

MYSQL DB ERROR when adding a joke.....





that might explain why it aint working...:(

This is not why its not working when adding a joke to the database you have to put words in like so.

there's needs to be changed to there''s

This might be why you are getting a error
you have to put 2 of ( ' ) in

Next-Selection 10-12-2005 09:04 PM

Wow this one looks awesome !!!

Gizmo5h1t3 10-12-2005 09:04 PM

Quote:

Database error in vBulletin 3.5.0:

Invalid SQL:
INSERT INTO vbjokes_jokes ( `jokename` , `jokediscription` , `jokeimage` , `jokecatid` , `username` , `aprove` ) VALUES ('TO GOD FROM THE DOG.......','TO: GOD
FROM: THE DOG

Dear God: Why do humans smell the flowers, but seldom, if ever, smell one another?

Dear God: When we get to heaven, can we sit on your couch? Or is it still the same old story?

Dear God: Why are there cars named after the jaguar, the cougar, the mustang, the colt, the stingray, and the rabbit, but not ONE named for a dog? How often do you see a cougar riding around? We do love a nice ride! Would it be so hard to rename the "Chrysler Eagle" the "Chrysler Beagle"?

Dear God: If a dog barks his head off in the forest and no human hears him, is he still a bad dog?

Dear God: We dogs can understand human verbal instructions, hand signals, whistles, horns, clickers, beepers, scent IDs, electromagnetic energy fields, and Frisbee flight paths. What do humans understand?

Dear God: More meatballs and less spaghetti, please.

Dear God: Are there mailmen in Heaven? If there are, will I have to apologize?

Dear God: Let me give you a list of just some of the things I must remember to be a good dog.

1. I will not eat the cats food before they eat it or after they throw it up.

2. I will not roll on dead seagulls, fish, crabs, etc., just because I like the way they smell.

3. I will not munch on "leftovers" in the kitty litter box, although they are tasty.

4. The diaper pail is not a cookie jar.

5. The sofa is not a face towel. Neither are Mom and Dad's laps.

6. The garbage collector is not stealing our stuff.

7. My head does not belong in the refrigerator.

8. I will not bite the officer's hand when he reaches in for Mom's driver's license and registration.

9. I will not play tug-of-war with Dads underwear when hes on the toilet.

10. Sticking my nose into someones crotch is an unacceptable way of saying hello.

11. I dont need to suddenly stand straight up when Im under the coffee table.

12. I must shake the rainwater out of my fur before entering the house -- not after.

13. I will not throw up in the car.

14. I will not come in from outside and immediately drag my butt.

15. I will not sit in the middle of the living room and lick my crotch when we have company.

16. The cat is not a squeaky toy -- so when I play with him and he makes that noise, its usually not a good thing.

And, finally, My last two questions... Dear God: Why do humans only have 10 Commandments and dogs have 16?



P.S. Dear God: When I get to Heaven, may I have my testicles back?','','3','Gizmo','0');

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's laps.

6. The garbage collector is not stealing our stuff.
Error Number : 1064
Date : Wednesday, October 12th 2005 @ 11:02:37 PM
Script : http://www.*******.org/board/vbjokes...ddajokeconfirm
Referrer : http://www.*******.org/board/vbjokes.php?do=addjoke
IP Address : **.**.**.***
Username : Gizmo
Classname : vb_database
SO U GET THE IDEA, the DB error has the joke in it as well...lmao

TygerTyger 10-12-2005 09:05 PM

Oh, that's just excellent! There's on thing stopping me using it though....no ability to rate jokes?

DS MrSinister 10-12-2005 09:06 PM

U will get the a error when u aprove the joke when u have one of these in a joke. ' or " one of things i figure out so far.. I just removed them and NO more errror. ONly time i got a error.. the missing Phrases dont bug me too much :)!

Gizmo5h1t3 10-12-2005 09:07 PM

altho its a top hack, big up to ya for that, its a bit of a pain not having any quote marks in jokes aint it????

micheal332001 10-12-2005 09:08 PM

this is the same joke you have posted but look at it closly.

Dear God: Why do humans smell the flowers, but seldom, if ever, smell one another?

Dear God: When we get to heaven, can we sit on your couch? Or is it still the same old story?

Dear God: Why are there cars named after the jaguar, the cougar, the mustang, the colt, the stingray, and the rabbit, but not ONE named for a dog? How often do you see a cougar riding around? We do love a nice ride! Would it be so hard to rename the "Chrysler Eagle" the "Chrysler Beagle"?

Dear God: If a dog barks his head off in the forest and no human hears him, is he still a bad dog?

Dear God: We dogs can understand human verbal instructions, hand signals, whistles, horns, clickers, beepers, scent IDs, electromagnetic energy fields, and Frisbee flight paths. What do humans understand?

Dear God: More meatballs and less spaghetti, please.

Dear God: Are there mailmen in Heaven? If there are, will I have to apologize?

Dear God: Let me give you a list of just some of the things I must remember to be a good dog.

1. I will not eat the cats food before they eat it or after they throw it up.

2. I will not roll on dead seagulls, fish, crabs, etc., just because I like the way they smell.

3. I will not munch on "leftovers" in the kitty litter box, although they are tasty.

4. The diaper pail is not a cookie jar.

5. The sofa is not a face towel. Neither are Mom and Dad''s laps.

6. The garbage collector is not stealing our stuff.

7. My head does not belong in the refrigerator.

8. I will not bite the officer''s hand when he reaches in for Mom''s driver''s license and registration.

9. I will not play tug-of-war with Dads underwear when hes on the toilet.

10. Sticking my nose into someones crotch is an unacceptable way of saying hello.

11. I dont need to suddenly stand straight up when Im under the coffee table.

12. I must shake the rainwater out of my fur before entering the house -- not after.

13. I will not throw up in the car.

14. I will not come in from outside and immediately drag my butt.

15. I will not sit in the middle of the living room and lick my crotch when we have company.

16. The cat is not a squeaky toy -- so when I play with him and he makes that noise, its usually not a good thing.

And, finally, My last two questions... Dear God: Why do humans only have 10 Commandments and dogs have 16?

Try adding this joke now and it will work

micheal332001 10-12-2005 09:09 PM

Quote:

Originally Posted by Gizmo5h1t3
altho its a top hack, big up to ya for that, its a bit of a pain not having any quote marks in jokes aint it????

you can use the quote marks but you have to put 2 in not 1

you will see in the joke i have just put up

micheal332001 10-12-2005 09:12 PM

look at this

8. I will not bite the officer''s hand when he reaches in for Mom''s driver''s license and registration.

you will see its got 2 quote marks not the one you put in
When this has been added to your database it will only show one when your members view the joke

so that line will look like this to your users

8. I will not bite the officer's hand when he reaches in for Mom's driver's license and registration.

you see what i mean

micheal332001 10-12-2005 09:13 PM

Quote:

Originally Posted by TygerTyger
Oh, that's just excellent! There's on thing stopping me using it though....no ability to rate jokes?

i will be adding that in a later version

Gizmo5h1t3 10-12-2005 09:35 PM

worked fine using that method mate...

micheal332001 10-12-2005 09:40 PM

Quote:

Originally Posted by Gizmo5h1t3
worked fine using that method mate...

Cool glad to have helped you out there.

When on the add a joke screen it does tell you about that and how to put a joke in. Sorry if i did not make it clear on that screen.

Barakat 10-12-2005 10:31 PM

what a great hack for the vbulletin .... i was searching on it all the time....

thanks for sharing it ...

micheal332001 10-12-2005 10:36 PM

Quote:

Originally Posted by Barakat
what a great hack for the vbulletin .... i was searching on it all the time....

thanks for sharing it ...


Your very welcome glad it can be of use to you all.

Cyricx 10-12-2005 11:05 PM

Isn't there a way to change that to html marks like the & or whatever that the database uses for apostrophes?

Ideas for future versions -

Usergroup permissions to view jokes.

Blaine0002 10-13-2005 12:08 AM

hey you can use this i dunno how but maybe some code in the vbjokes.php file that finds all
Code:

'
and replaces it with
Code:

&acute;
which looks kinda like an apostraphe :P

TCM 10-13-2005 02:48 AM

So does this allow HTML?

I see abuse possibilities.

micheal332001 10-13-2005 07:45 AM

Quote:

Originally Posted by TCM
So does this allow HTML?

I see abuse possibilities.

This can only use limited html like <br> and other tags like that.
All jokes have to be approved be for any joke is viewable by the members.
The joke is only inputted as text to the database.
So you are limited on the tags you can use.

micheal332001 10-13-2005 07:46 AM

Quote:

Originally Posted by Blaine0002
hey you can use this i dunno how but maybe some code in the vbjokes.php file that finds all
Code:

'
and replaces it with
Code:

&acute;
which looks kinda like an apostraphe :P

I like this idea i will have alook round to see if this can be done.

micheal332001 10-13-2005 10:37 AM

Hi all i have found a fix for the inputting of a joke.


Find this in vbjokes.php
PHP Code:

$jokename $_POST['jokename'];
  
$jokediscription $_POST['jokediscription'];
  
$jokeimage $_POST['jokeimage'];
  
$jokecatid $_POST['cid'];
  
$approve 0

Add under
PHP Code:

$jokediscription ereg_replace("'","''",$jokediscription); 


I will upload the fixed files in about 10 mins

micheal332001 10-13-2005 11:01 AM

fixed files uploaded

eXtremeTim 10-13-2005 11:52 AM

I would have used the addslashes function myself.


Also what are you doing with this lol.

Code:

$areyouamember = $db->query("SELECT userid FROM " . TABLE_PREFIX . "user WHERE userid = '" . $userid . "'");
so we are grabbing into that we already have ;)

Looks to me like its some kind of reminents of the league hack.

Also this allows users to add jokes and then admin approval. Only problem is it looks to me like you let them use html which is a bad thing. I also am not seeing any data validation here.

Meaning I could easily take over any site using this hack. Please use data validation. If you need help with it please contact me. This hack has potential but it needs work. Please contact me so I can help you get this all cleaned up. ;)

Blaine0002 10-13-2005 12:37 PM

its checking to see if the user is logged in / registered :P

eXtremeTim 10-13-2005 12:57 PM

Quote:

Originally Posted by Blaine0002
its checking to see if the user is logged in / registered :P

No im afraid its not. Becuase we already have that info without a query. its called $vbulletin->userinfo['userid'] if that is set to 0 they are not a registered member.

So we could use
Code:

if(!$vbulletin->userinfo['userid'])
{
        //run some error crap here about not being registered or logged in
}


Blaine0002 10-13-2005 08:38 PM

huh well then i dunno (is a programming noob)

jimmyboy 10-14-2005 12:34 AM

dude, i really love it,,,,thx soo much

jesus likes pie 10-14-2005 12:49 AM

This looks awesome.

HOTM!

jesus likes pie 10-14-2005 12:50 AM

Oh wait....does moderation of jokes HAVE to be enabled?

Blaine0002 10-14-2005 03:48 AM

there is probably a way to bypass it, ill make it a setting tomorrow.

eXtremeTim 10-14-2005 04:05 AM

Quote:

Originally Posted by Blaine0002
huh well then i dunno (is a programming noob)

Dont worry im not. ;)


I talked with the creator.
We are planning to spend some time any redo this hack and get it all cleaned up. ;)

Fixing the html problem plus adding in security checks and cleaning it up and adding more to it. ;)

micheal332001 10-14-2005 09:12 AM

we will be adding alot more to this and like eXtremeTim said he is going to help me work on this and make it a lot better.
So watch this space for new updates.
eXtremeTim its very nice of you to help as i do need it to better understand the coding involved in vb.
With the info he will be teaching me we weill come out with better hacks for you to use.

Many thanks eXtremeTim

eXtremeTim 10-14-2005 10:53 AM

No problem. :)

MissKalunji 10-14-2005 11:47 AM

I love this hack i gotta give it up to you!

now 2 things

when i add a joke do i HAVE to put <br> for it to appear normaly? lemme show u
a screen shot

and

2. i still get a database error when i have " or ' how can i fix that?

Thanks in advance!


All times are GMT. The time now is 08:04 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.03658 seconds
  • Memory Usage 1,852KB
  • 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
  • (2)bbcode_php_printable
  • (12)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
  • (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