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
#9662
adroussel (User)
Geek
Posts: 300
graphgraph
User Offline Click here to see the profile of this user
PURPS won/lost/draw challenge shoutbox anouncement 2 Months ago Karma: 6  
Hello

here is a little code mod to shout for challenge winner & looser in shoutbox

open purps.php
around line 82, look for:

switch ($results) {

and then make it as follow:
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 04:19 By adroussel.
  The administrator has disabled public write access.


#9686
adroussel (User)
Geek
Posts: 300
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won challenge shoutbox announcement 2 Months ago Karma: 6  
Code:

switch ($results) { case 1: $result = JText::_('YOULOSE')."<br /><br />"; $msg= $name." just won a RPS challenge against ".$user->username."!";// added for shoutbox break; case 2: $result = JText::_('YOUWIN')."<br /><br />"; $msg= $user->username." just won a RPS challenge against ".$name."!";// added for shoutbox break; case 3: $result = JText::_('DRAWGAME')."<br /><br />"; $msg= $name." VS ".$user->username.": Draw!";// added for shoutbox break; } // now we shout $entryby = "Rock Paper Scissors"; $thetime = time(); $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
ok hmmm This works great on my site Now, maybe Steve will share his 'send challenge notification' mod?
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 04:18 By adroussel.
  The administrator has disabled public write access.
#9709
MarcinLodz (User)
Player
Posts: 40
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won challenge shoutbox announcement 2 Months ago Karma: 0  
i paste it all into purps.php and i have errors with "JText". Shall i paste something into shoutbox module or everything shuold be in file purps.php ?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9711
VReyes (User)
Gamer
Posts: 153
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won challenge shoutbox announcement 2 Months ago Karma: 1  
first i want to thank you Adroussel for all you created Mods and of course to Pragma for this great component.

2nd - this might sound stupid but i need to know what you use to know how to read the line numbers. when i see people say add this code to line *** i do not see this on mine when i use the file manager in my cpanel. and i normally just do a find.

so when i fine this - switch ($results) {

it will be after that character or a line down to paste the code?

thanks again,

VR
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
#9714
Tinker (User)
Gamer
Posts: 88
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 2 Months ago Karma: 12  
Very Cool

Here's the changes for the j1.0x version

Code:

switch ($results) { case 1: $result = $lang['YOULOSE']."<br /><br />"; $msg= $name." just won a RPS challenge against ".$user->username."!";// added for shoutbox break; case 2: $result = $lang['YOUWIN']."<br /><br />"; $msg= $user->username." just won a RPS challenge against ".$name."!";// added for shoutbox break; case 3: $result = $lang['DRAWGAME']."<br /><br />"; $msg= $name." VS ".$user->username.": Draw!";// added for shoutbox break; } // now we shout $entryby = "Rock Paper Scissors"; $thetime = time(); $url = "index.php?option=com_purps"; $query = "INSERT INTO #__liveshoutbox (time,name,text,url) VALUES ('" . $thetime . "','". $entryby ."','". $msg ."','" . $url . "')"; $database->setQuery($query); $shout = $database->query(); // end of shoutbox mode
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9721
Tina123 (User)
Gamer
Posts: 133
graphgraph
User Online Now Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 2 Months ago Karma: 1  
oh i am glad tinker came around and got it for us into joomla 1.0

i took the code into my purps.php but then i can`t access anymore the PURPS in the Backend it just shows me a white Screen then.

i am using the SMO Ajax Shoutbox so i guess it should be compatible, right?

Grretings Tina123
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 11:38 By Tina123.
  The administrator has disabled public write access.
#9722
Tinker (User)
Gamer
Posts: 88
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 2 Months ago Karma: 12  
there seems to be an issue with displaying the name of the person that was being challenged. I'll be tied up for most of the day...so it will be a bit before I can look at it again.
EDIT:
yes, I made it so it works with SMO Shoutbox.
I'm not experiencing back end issues...
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 11:44 By Tinker.
  The administrator has disabled public write access.
#9725
Tina123 (User)
Gamer
Posts: 133
graphgraph
User Online Now Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 2 Months ago Karma: 1  
Don`t want to rush you

just wanted to let you know^^ whenever you find some Time you might could check this plz or maybe i`m doing something wrong when i replace the Code?


Greetings Tina123
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 11:50 By Tina123.
  The administrator has disabled public write access.
#9726
MarcinLodz (User)
Player
Posts: 40
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 2 Months ago Karma: 0  
yes, i also noitced these bug..only one person is displayed, and the second one is not displayed in shoutbox
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9727
heli07at (User)
Newb Sauce
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 2 Months ago Karma: 0  
Hi!

No problems here with the Backend (J1.0) - but I had the problem that the name of the callenger did not appear in the Shout-Box.

Changed
$user->username
to
$my->username

and its working fine.

Regards,
heli

PS: @Tina - as far as I remember you was interested in the PURPS ranking module from adroussel - just got it running on my J1.0 site - if you´re interested I can PM you a short instruction on how to do it.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9728
Tina123 (User)
Gamer
Posts: 133
graphgraph
User Online Now Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 2 Months ago Karma: 1  
MarcinLodz wrote:
QUOTE:
yes, i also noitced these bug..only one person is displayed, and the second one is not displayed in shoutbox :(


well i don`t even get that far, i can`t even get access anymore to PURPS after replacing the Code. So i can`t challenge People to see how it looks in the Shoutbox.....

don`t worry....i am sure when tinker finds some Time he will take a Look^^
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 11:53 By Tina123.
  The administrator has disabled public write access.
#9732
Tinker (User)
Gamer
Posts: 88
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: 12  
@heli07at
Thanks for posting that fix.
@Tina123 pm me your email.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9739
Tinker (User)
Gamer
Posts: 88
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 4 Weeks ago Karma: 12  
File Attachment:
File Name: purps.zip
File Size: 3143
To make it easier here's a modded purps.php file for the Joomla 1.0x version. Just unzip it and replace the existing file with it...remember to keep a backup of the original.

This file announces results of a challenge and also Announces new challenges (the code for this may not be perfect but it is working. The only flaw is it will also announce a challenge if you try to re-challenge a user that you have a pending challenge with. On the bright side it may catch their attention to complete the original challenge.)

Enjoy
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/10/03 21:27 By Tinker.
  The administrator has disabled public write access.
#9740
adroussel (User)
Geek
Posts: 300
graphgraph
User Offline Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncement 1 Month, 4 Weeks ago Karma: 6  
I'm not posting my purps.php for j1.5 because it has other modifications in the same lines to give users AlphaUserPoints when they win. but if you want it just shout
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9745
Tina123 (User)
Gamer
Posts: 133
graphgraph
User Online Now Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 1 Month, 4 Weeks ago Karma: 1  
Tinker wrote:
QUOTE:
File Attachment:
File Name: purps.zip
File Size: 3143
To make it easier here's a modded purps.php file for the Joomla 1.0x version. Just unzip it and replace the existing file with it...remember to keep a backup of the original.
Enjoy B)



That`s real good

But in my Case i can`t use it, since i have already a couple Modifications in it.

GreetingsTina123
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9746
Tinker (User)
Gamer
Posts: 88
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: 12  
At least you can now see the proper layout of where to insert the code.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9748
Tina123 (User)
Gamer
Posts: 133
graphgraph
User Online Now Click here to see the profile of this user
Re:PURPS won/lost/draw challenge shoutbox anouncem 1 Month, 4 Weeks ago Karma: 1  
Of course

Great Work tinker
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#9750
adroussel (User)
Geek
Posts: 300
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: 6  
ok so here is the code to add for the 'new challenge sent' notification.
And not shout if you had allready a pending challenge with that user.


First open purps.php and look for that line:
for j1.5:
Code:

echo '<h3>'.JText::_('CHALLENGESENT').'</h3>';
for j1.0x:
Code:

echo '<h3>'.$lang['CHALLENGESENT'].'</h3>';
and add this just after, and before the next '}':
Code:

// now we shout for new challenge sent $msg = $user->username." has just sent a RPS challenge to ".mosGetParam( $_REQUEST, 'user'); $entryby = "Rock Paper Scissors"; $thetime = time(); $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 new challenge shoutbox mode
This code is for j1.5, for j1.01 replace #__shoutbox by #__liveshoutbox That way, It will not re-shout if you had allready a pending challenge with that user. have fun
 
Report to moderator   Logged Logged