Welcome Guest!   Please Login or Register
Subscribe Today

You are not subscriber of DaDaNuke | Making PHP-Nuke Better!. You can subscribe from here now!

Sponsored Links




Search




Site Navigation

· Home
· About Us
· Advertise With Us
· Club
· CVS
· Downloads
· Feedback
· Forums
· Gallery
· Groups
· Journal
· Private Messages
· Search
· Stories Archive
· Submit News
· Top 10
· Topics
· Web Links
· Your Account

Survey

I Want This Addon:

SEO
Gaming
Commerce
Database
Security



Results
Polls

Votes 562

Advertisers





Who's Online

There are currently, 32 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

Total Hits

We received
3866817
page views since September 2005




DaDaNuke :: View topic - Private Messages (Arcade)
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log inLog in 

Private Messages (Arcade)

 
Post new topic   Reply to topic    DaDaNuke Forum Index -> BBtoNuke
View previous topic :: View next topic  
Author Message
BooF
dadaMember
dadaMember


Joined: Apr 06, 2007
Posts: 9


PostPosted: Fri Apr 06, 2007 5:47 pm    Post subject: Private Messages (Arcade) Reply with quote

I was told to try and get some help on these forums. Hope I can Very Happy


http://www.teamplayguild.com

Arcade v3.02
Phpnuke 7.9



When someone beats a high score arcade automatically sends you a PM saying so and so beat ur high score. Now I was getting these messages from a non admin user which shouldnt have been sending them. I read one of your fax and edited my proarcade.php file with this

Code:
$sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('0', '" . str_replace("\'", "''", addslashes(sprintf($register_pm_subject,$row[0]['game_name']))) . "', '42', " . $user_id . ", " . $privmsgs_date . ", '0', '1', '1', '0')";



Making the admin user ID 42. Now when a high score is beat it sends out a PM from correct user but the subject is blank and the PM is empty. Now I ran

Code:
SELECT * FROM `nuke_bbprivmsgs` WHERE `privmsgs_from_userid` =42



But didnt fix it. Any ideas?


Last edited by BooF on Mon Apr 23, 2007 6:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
dadaBIT
General Manager
General Manager


Joined: Jun 23, 2005
Posts: 582
Location: United States

PostPosted: Mon Apr 23, 2007 10:23 pm    Post subject: Reply with quote

Greetings BooF and welcome to the boards! Apologies for the delay M8, been all over the place lately Rolling Eyes You may have to refresh my memory, for it has been awhile since I have messed with the script. Was there not an issue like this that had been common? Was this the fix you seek?

Quote:

ALTER TABLE nuke_users ADD user_allow_arcadepm TINYINT( 0 ) DEFAULT '1' NOT NULL;


If not, apologies for being useless. I remember when updating the MOD, there was a whole set of issues that had to be resolved. Unfortunately, did no documentation.

-Kev
_________________

Visit the DaDaNuke Wish List
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
BooF
dadaMember
dadaMember


Joined: Apr 06, 2007
Posts: 9


PostPosted: Tue Apr 24, 2007 6:12 pm    Post subject: Reply with quote

Thanks for replying.

I actually already have that user in nuke_users except it looks like this


user_allow_arcadepm TINYINT( 4 ) DEFAULT '1' NOT NULL;


I removed user and re-added the way you gave me but it still shows up with TINYINT(4)
Im a MySQL beginner so that doesnt mean much to me and I dunno if thats even the problem.

As I stated the arcpm worked fine when I initially installed it but only for user ID 2 which the user with that ID is not the one that should be sending the arcpm. I changed it so the arcpm would be sent from user ID 42 which it does but the PM is blank with no content or subject. Its not even clickable.


Last edited by BooF on Tue Apr 24, 2007 6:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
BooF
dadaMember
dadaMember


Joined: Apr 06, 2007
Posts: 9


PostPosted: Tue Apr 24, 2007 6:14 pm    Post subject: Reply with quote

So if I delete "user_allow_arcadepm" will the arcade stop sending private messages when a highscore is beat or can the empty PM's be fixed?
Back to top
View user's profile Send private message
dadaBIT
General Manager
General Manager


Joined: Jun 23, 2005
Posts: 582
Location: United States

PostPosted: Fri Apr 27, 2007 3:14 pm    Post subject: Reply with quote

Greetings, try this out. In fact, not so sure about this one. Do me a favor and compare with code you have now. I would, but a bit busy at the moment. This is from modules/Forums/proarcade.php.

Code:

$user_id = $row[1]['user_id'];

                  $sql = "SELECT user_allow_arcadepm FROM " . USERS_TABLE . " WHERE user_id = $user_id";

                  if (!($result = $db->sql_query($sql))) {
                        message_die(GENERAL_ERROR, "Error retrieving user arcade pm preference", '', __LINE__, __FILE__, $sql);
                  }

                  $row_check = $db->sql_fetchrow($result);
                 
                  if ($row_check['user_allow_arcadepm'] == 1) {
                        $sql = "UPDATE " . USERS_TABLE . " SET user_new_privmsg = '1', user_last_privmsg = '9999999999' WHERE user_id = $user_id";

                        if (!($result = $db->sql_query($sql))) {
                              message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
                        }

                        $link = "<a>here</a>";

                                                                $privmsgs_date = date("U");

                        $sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace("\'", "''", addslashes(sprintf($lang['register_pm_subject'],$row[0]['game_name']))) . "', '2', " . $user_id . ", " . $privmsgs_date . ", '0', '1', '1', '0')";

                        if (!$db->sql_query($sql)) {
                              message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
                        }

                        $privmsg_sent_id = $db->sql_nextid();

                        $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_text) VALUES ($privmsg_sent_id, '" . str_replace("\'", "''", addslashes(sprintf($lang['register_pm'],$row[1]['score_game'],$row[0]['game_name'],$row[0]['username'],$row[0]['score_game'],$link))) . "')";

                        if (!$db->sql_query($sql)) {
                              message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
                        }

_________________

Visit the DaDaNuke Wish List
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
dadaBIT
General Manager
General Manager


Joined: Jun 23, 2005
Posts: 582
Location: United States

PostPosted: Fri Apr 27, 2007 3:24 pm    Post subject: Reply with quote

Hello again, this is another fix I found. See if this is it or maybe I am sending you chasing after windmills again Rolling Eyes

Open modules/Forums/proarcade.php

#
#-----[ FIND ]------------------------------------------------
#

Code:

      if (!($row = $db->sql_fetchrow($result)) or ($vpaver != "100B2") or (!isset($vscore))) {
            $sql = "INSERT INTO " . HACKGAME_TABLE . " (user_id , game_id , date_hack) VALUES ('" . $userdata['user_id'] . "' , '$gid' , '" . time() . "')" ;

            if (!$db->sql_query($sql)) {
                  message_die(GENERAL_ERROR, 'Could not insert hack game data', '', __LINE__, __FILE__, $sql);
            }

             header($header_location . append_sid("arcade.$phpEx", true));
            exit;
      }

#
#-----[ REPLACE WITH ]------------------------------------
#

Code:

/*
      if (!($row = $db->sql_fetchrow($result)) or ($vpaver != "100B2") or (!isset($vscore))) {
            $sql = "INSERT INTO " . HACKGAME_TABLE . " (user_id , game_id , date_hack) VALUES ('" . $userdata['user_id'] . "' , '$gid' , '" . time() . "')" ;

            if (!$db->sql_query($sql)) {
                  message_die(GENERAL_ERROR, 'Could not insert hack game data', '', __LINE__, __FILE__, $sql);
            }

             header($header_location . append_sid("arcade.$phpEx", true));
            exit;
      }*/


-Kev
_________________

Visit the DaDaNuke Wish List
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
BooF
dadaMember
dadaMember


Joined: Apr 06, 2007
Posts: 9


PostPosted: Sat Apr 28, 2007 11:49 am    Post subject: Reply with quote

The first fix you posted is just the same code I already have.

I tried the second fix by commenting out that section to no avail the PM's are still blan and empty.
Back to top
View user's profile Send private message
dadaBIT
General Manager
General Manager


Joined: Jun 23, 2005
Posts: 582
Location: United States

PostPosted: Wed May 02, 2007 11:15 am    Post subject: Reply with quote

Hi BooF, if you wish I can fix for you. Just need the files and SQL extract, I will make right. PM me and lemme know.

-Kevin
_________________

Visit the DaDaNuke Wish List
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    DaDaNuke Forum Index -> BBtoNuke All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001 phpBB Group Version 2.0.6 of PHP-Nuke Port by Tom Nitzschner © 2002 www.toms-home.com
Theme designed by Western Studios



Terms of Use | Privacy Policy © 1996-2007, DaDaNuke

Listed on FeedBurner

PHP-Nuke Copyright © 2006 by Francisco Burzi. This is free software, and you may redistribute it under the GPL.
PHP-Nuke comes with absolutely no warranty, for details, see the license.

Theme Designed by Western Studios