Need Plusses To Visit A Page

Started on the old forum in July 2007 · view the original in the archive · old links redirect here

28 replies · 1,808 views · started 19 years ago · 1 min read

TL;DR · summary of 28 replies
  • The code to check if users need more plusses to play games needs to be added.
  • A solution was provided with the function points(getuid_sid($sid)) and checking against a threshold of 15 points.
  • The user futurewap successfully implemented this by adding the conditional statement at the top of their page: if(points(getuid_sid($sid)) < 15) { $need=15-points(getuid_sid($sid)); echo "You need $need more points to sh...
  • Another solution was provided for a different context (funmobile version), but it did not work as intended.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

5 participants
metulj Super moderator Principal · 1,726 posts #2

who has the little code to stop people from visiting a page if they dont have enough plusses and it says you need 10 plusses to play games or something

it was mentioned before.. but ok...

you could take the code from shoutbox External image (may be gone) External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

linkrx7 #3

it was mentioned before.. but ok...

you could take the code from shoutbox External image (may be gone) External image (may be gone)

thats mean lol heres what to do and it will display how many more plusses needed

if(points(getuid_sid($sid))<15)
{
$need=15-points(getuid_sid($sid));
echo "
You need $need more points to shout!";
}

and the points function

function points($uid)
{
$plus=mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
return $plus[0];
}
Guest #4

wtf???? you cant write simply script to check plusses.how unfortunate.

Guest #6

man you dont understand function IF

Guest #7

if(points(getuid_sid($sid))<15) { $need=15-points(getuid_sid($sid)); echo " You need $need more points to shout!"; }

this code check or user have 15 points.Insert in that page where you want check.

futurewap Developer · 229 posts #9

where do i put the code i tried but gave me errors

else if ($action=="funm") { addonline(getuid_sid($sid),"Fun Menu",""); echo "<card id="viewforum" title="Games Menu">"; echo " "; echo "<img src="images/roll.gif" alt="*"/> "; echo "Hello, so you want to have some creative fun? well you came into the right place"; echo " "; echo "

"; echo "<a href="ravebabe.php?sid=$sid">»lavagirl</a> "; echo "<a href="games.php?action=guessgm&sid=$sid">»Guess The Number</a> "; echo "<a href="xogame.php?sid=$sid">»Tic tac toe(2

players)</a> "; //echo "»Hangman "; //echo "»Dares Box "; echo " "; echo " "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif"

alt="*"/>Home</a>"; echo " "; echo "</card>"; }

FlareX #10

dude u dumb

FlareX #12

lol by nxt wek u gna b cryin

hellspawn #13

omf.... Futurewap? may I suggest actually going and learning PHP before even going near a script? cause thats a scary thought lol.

ok... you were given 2 functions in the beggining of this topic. 1.the first function you place into the page you want it (i will post a proper snippit in a sec). 2.the second function you place into your core.php where all the other funtions that look almost like that are -nod-

hellspawn #14

Put this function into your core.php

function points($uid)
{
$plus=mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
return $plus[0];
}

and here is your funm with it in!

else if ($action=="funm") {
addonline(getuid_sid($sid),"Fun Menu","");
echo "<card id=\"viewforum\" title=\"Games Menu\">";
echo "<p align=\"center\">";
echo "<img src=\"images/roll.gif\" alt=\"*\"/>
";
if(points(getuid_sid($sid))<15)
{
$need=15-points(getuid_sid($sid));
echo "
You need $need more points to shout!
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
echo "Hello, so you want to have some creative fun? well you came into the right place";
echo "</p>";
echo "

";
echo "<a href=\"ravebabe.php?sid=$sid\">»lavagirl</a>
";
echo "<a href=\"games.php?action=guessgm&sid=$sid\">»Guess The Number</a>
";
echo "<a href=\"xogame.php?sid=$sid\">»Tic tac toe[size="1"](2 

players)[/size]</a>
";
//echo "»Hangman
";
//echo "»Dares Box
";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" 

alt=\"*\"/>Home</a>";
echo "</p>";
echo "</card>";
}
WhiteWarrior Principal · 1,419 posts #18

hes only trying man, help him out lol!!!

add the if(points(getuid_sid($sid))<15) { $need=15-points(getuid_sid($sid)); echo " You need $need more points to shout!"; } at the top of the page so....

if(points(getuid_sid($sid))<15) { $need=15-points(getuid_sid($sid)); echo " You need $need more points to shout!"; }else if ($action=="funm") { addonline(getuid_sid($sid),"Fun Menu",""); echo "<card id="viewforum" title="Games Menu">"; echo " "; echo "<img src="images/roll.gif" alt="*"/> "; echo "Hello, so you want to have some creative fun? well you came into the right place"; echo " "; echo "

"; echo "<a href="ravebabe.php?sid=$sid">»lavagirl</a> "; echo "<a href="games.php?action=guessgm&sid=$sid">»Guess The Number</a> "; echo "<a href="xogame.php?sid=$sid">»Tic tac toe(2

players)</a> "; //echo "»Hangman "; //echo "»Dares Box "; echo " "; echo " "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif"

alt="*"/>Home</a>"; echo " "; echo "</card>"; }

that should work fine

hellspawn #19

bugsbunny, i already posting a working version above lol yours works alright...except for the fact that it inconveniences the user as it does not provide a link back -tea-

Guest #20

bugsbunny, i already posting a working version above lol yours works alright...except for the fact that it inconveniences the user as it does not provide a link back -tea-

hmm thats dosent work in the funmobile xhtml and wml in one script

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close