No account yet?
 

Subscriptions

ImageWhen you sign up as a premium subscriber, you get more than access to a host of fantastic features. You become a member of a flourishing community that continuously improves the very projects that run your website. Why not sign up today?

Subscriber Benefits

  • Subscriber only addons and plugins!
  • Latest beta code and SVN builds!
  • Access new versions before anyone else!
  • Premium Priority Support!
  • User Manuals for our components!
Read On!
Pragmatic Utopia
Welcome, Guest
Please or Register.    Lost Password?
Preferred PUArcade Web Host:
PURPS won/lost/draw challenge shoutbox anouncement (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: PURPS won/lost/draw challenge shoutbox anouncement
#9755
ruud (User)
Gamer
Posts: 114
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 1 Month, 4 Weeks ago Karma: 3  
I know and I did this one twice...

Normaly I can follow but with this one I keep doing something wrong, realy sorry...
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.


#9803
steveometer (User)
Steve Alan Thought Of That
Modder
Posts: 465
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: St Louis, MO Birthdate: 1977-08-08
Re:PURPS won/lost/draw challenge shoutbox anouncem 1 Month, 3 Weeks ago Karma: 29  
i didn't see this till just now

here's what i did

near line 82 of purps.php
Code:

$results = purps_functions::GetResult($tipchallenger[0],$tipthisuser); switch ($results) { case 1: $result = $lang['YOULOSE']."<br /><br />"; $feed = " WON AGAINST "; break; case 2: $result = $lang['YOUWIN']."<br /><br />"; break; case 3: $result = $lang['DRAWGAME']."<br /><br />"; $feed = " TIED WITH "; break; } ////////////// // SHOUT // ////////////// $from='[iurl='.sefRelToAbs( 'index.php?option=com_comprofiler&task=userProfile&user='.$tipchallenger[1] ).']'.$name.'[/iurl]'; $to='[iurl='.sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$my->id).']'.$myname.'[/iurl]'; $query = "INSERT INTO #__liveshoutbox (time,name,text,url) VALUES ('" . time() . "','R.P.S.','". $from.$feed.$to." in a [iurl=" . sefRelToAbs('index.php?option=com_purps&Itemid='.$Itemid) . "]Rock Paper Scissors[/iurl] challenge!','')"; $database->setQuery($query); $res = $database->query();
then in purps.class.php near line 50
Code:

////////////// // SHOUT // ////////////// $query = "Select username from #__users where id LIKE '$userid'"; $database->setquery($query); $fromrow = $database->loadRow(); $from='[iurl='.sefRelToAbs( 'index.php?option=com_comprofiler&task=userProfile&user='.$userid ).']'.$fromrow[0].'[/iurl]'; $query = "Select username from #__users where id LIKE '$challenged_ID'"; $database->setquery($query); $torow = $database->loadRow(); $to='[iurl='.sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$challenged_ID).']'.$torow[0].'[/iurl]'; $feed = " Sent a Rock Paper Scissors challenge to "; $query = "INSERT INTO #__liveshoutbox (time,name,text,url) VALUES ('" . time() . "','R.P.S.','". $from." Sent a [iurl=" . sefRelToAbs('index.php?option=com_purps&Itemid='.$Itemid) . "]Rock Paper Scissors[/iurl] challenge to ".$to."','')"; $database->setQuery($query); $res = $database->query();
if any questions, ask me... thanx
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
#9977
knoxben (User)
Player
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 3 Weeks ago Karma: 1  
Thanks adroussel for the great script! works great on my site!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#10094
bulls0702 (User)
User
Posts: 32
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 2 Weeks ago Karma: 0  
hear is the pursp.php file for J1.5.7, it is tested by my and the shotutbox is the only hack!
File Attachment:
File Name: purps-f9219d7292e639ae258402af2a97fdd1.zip
File Size: 3088
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#10107
knoxben (User)
Player
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 2 Weeks ago Karma: 1  
The shout code worked for me on Joomla 1.5 with the risp shoutbox pro beta 5 rc2. However, the times were always wrong by 6 hours. Here is how to fi that if you have the same problem, see the code below:

Code:

// now we shout $entryby = "Rock Paper Scissors"; $date =& JFactory::getDate(); $thetime = $date->toUnix(); $url = "index.php?option=com_purps"; $query = "INSERT INTO #__shoutbox (time,name,text,url) VALUES ('" . $thetime . "','". $entryby ."','". $msg ."','" . $url . "')"; $database->setQuery($query); $shout = $database->query(); // end of shoutbox mode
notice the different call for time and date. You also have to make the same change where it shouts for a new challenge later down in the file. Or you can just download the hacked purps.php file. The only change is the shoutbox with the update for time.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/17 08:18 By knoxben.
  The administrator has disabled public write access.
#10108
knoxben (User)
Player
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 2 Weeks ago Karma: 1  
here's the file:
File Attachment:
File Name: purps-ad7c35217f280df5d54bd84356d8a1c7.zip
File Size: 3521
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/17 08:20 By knoxben.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

My Amazon.com Wish List