Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ask the 8ball Details »»
Ask the 8ball
Version: 1.00, by dymo dymo is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-29-2002 Last Update: Never Installs: 5
Is in Beta Stage  
No support by the author.

this is another one of those scriptlets i had collected that i modified to provide a bit of fun for my users but its giving me a bit of a problem, its completely functional, just the response to the question is being parsed to the top of the page rather than under the question

add a template called 8ball
and insert the following
PHP Code:
<html>

<
head>
<
SCRIPT LANGUAGE="JavaScript">

<!-- 
Begin
function checkrequired(which) {
var 
pass=true;
if (
document.images) {
for (
i=0;i<which.length;i++) {
var 
tempobj=which.elements[i];
if (
tempobj.name.substring(0,8)=="required") {
if (((
tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!
pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Error you did not post any "+shortFieldName+" , try again.");
return 
false;
}
else
return 
true;
}
//  End -->
</script>
<
title>$bbtitle Ask the 8Ball?</title>

$headinclude

</head>

<
body>

$header

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">

<
tr>

        <
td width="100%"><img src="{imagesfolder}/vb_bullet.gif" alt="" border="0" align="absmiddle">

        <
normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &gt;

       
Ask the 8Ball?</b></normalfont></td>

</
tr>

</
table>

<
br>



<
table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" {tableouterextrawidth="70%" align="center"><tr><td>



<
table cellpadding="10" cellspacing="0" border="0" width="100%"><tr>
      <
td
        <
table width="100%" border="0" cellspacing="0" cellpadding="0">
          <
tr
            <
td>
<
font size="2" face="MS Sans Serif">
<
br><br>
  <
b>Ask the magic 8ball a question!</b>
  <
br>
  <
form onSubmit="return checkrequired(this)" method=post action='8ball.php'>
  <
input type=text size=31 name="requiredquestion" value='Your Question'>
  <
br>
  <
input type=submit value='Ask the Magic 8Ball?'></form><br>
</
td>
       
          </
tr>
        </
table>
        <
table cellpadding="4" cellspacing="1" border="0" bgcolor="{tablebordercolor}" width="100%"
        <
tr>

    <
td colspan="5" bgcolor="{tableheadbgcolor}"><normalfont color="{tableheadtextcolor}"><center><b></b></center></normalfont></td>

  </
tr>



  <
tr>
<
div align="center">

 </
div>
$footer
</body
copy the attached 8ball.php into your forums directory
and then run it ie http://yoursite.com/forums/8ball.php

you can see a working demo here

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-30-2002, 05:20 AM
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

augh, need to register :\

can you post a screenshot?
Reply With Quote
  #3  
Old 04-30-2002, 05:49 AM
dymo dymo is offline
 
Join Date: Jan 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry about that forgot i added in the user check to the 8ball system
here are the screen shots

Reply With Quote
  #4  
Old 04-30-2002, 06:24 AM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That answer doesn't look too hopeful :S
Reply With Quote
  #5  
Old 04-30-2002, 06:38 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JohnWarwick
That answer doesn't look too hopeful :S
That's the whole point of 8-Ball.
Reply With Quote
  #6  
Old 04-30-2002, 07:45 AM
tweak's Avatar
tweak tweak is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kool Hack but i get these errors on your forum???

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site2/fst/var/www/html/forums/8ball.php:1) in /home/virtual/site2/fst/var/www/html/forums/admin/functions.php on line 1647

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site2/fst/var/www/html/forums/8ball.php:1) in /home/virtual/site2/fst/var/www/html/forums/admin/functions.php on line 1647

Also the answer appears in the top corner??
Reply With Quote
  #7  
Old 04-30-2002, 11:24 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does that javascript work on ie5 and ns4 and opera & mozilla ?
Reply With Quote
  #8  
Old 04-30-2002, 04:17 PM
dymo dymo is offline
 
Join Date: Jan 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tweak
Kool Hack but i get these errors on your forum???

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site2/fst/var/www/html/forums/8ball.php:1) in /home/virtual/site2/fst/var/www/html/forums/admin/functions.php on line 1647

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site2/fst/var/www/html/forums/8ball.php:1) in /home/virtual/site2/fst/var/www/html/forums/admin/functions.php on line 1647


Also the answer appears in the top corner??
the answer in the corner is a bug hence its a beta release.

the header info you get on my forums is in the process of being hacked right now to support multiple cookies, just refresh it and it goes away.

if anyone has an idea of how to get the answer to appear under the question i could really use it


Xi the js should work on anything higher than ie 4 and ns 4, if the browser cnt use it , it should ignored, the js only provides the idiot correct of someone submitting a blank question
d
Reply With Quote
  #9  
Old 05-04-2002, 07:17 PM
M.Smith M.Smith is offline
 
Join Date: Feb 2002
Location: Durham, UK
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by xiphoid
Does that javascript work on ie5 and ns4 and opera & mozilla ?
im suprised ns4 supports html never mind that js
Reply With Quote
  #10  
Old 05-08-2002, 10:57 AM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by dymo


the answer in the corner is a bug hence its a beta release.

Move
PHP Code:
 eval("dooutput(\"".gettemplate("8ball")."\");"); 
up. Place before
PHP Code:
  if (isset($requiredquestion) AND $requiredquestion!="") { 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:10 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.04243 seconds
  • Memory Usage 2,330KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete