Anonymous,

Please Login or Register
Download Nuke Evolution Xtreme today for a CMS you can enjoy using and sharing with your friends!
[ Download Now ]
Forum Index  ·  Search  ·  Usergroups  ·  Edit your profile  ·  Members  ·  Login, Check Messages
Arcade  ·  Ranks  ·  Staff  ·  Statistics  ·  Board Rules  ·  Forum FAQ  ·  Log in

Search for at
Evolution-Xtreme Advanced Search


+  
Latest Site News   Next 5 >>  
 Forum   Author   Replies   Last Post 
File Repository 1.0.0 Released Announcements! Lonestar 0 Tue Apr 26, 2016 6:44 am
Lonestar View latest post
Image Repository Released Announcements! Lonestar 1 Mon Oct 27, 2014 7:39 pm
Lonestar View latest post
So what happened to us? Announcements! SgtLegend 0 Tue May 06, 2014 12:32 am
SgtLegend View latest post
[PROGRESS] Nuke Evolution Xtreme 2.0.9e Announcements! SgtLegend 2 Sun May 27, 2012 6:25 pm
SgtLegend View latest post
European Cookie Law Announcements! SgtLegend 0 Sat May 26, 2012 7:33 am
SgtLegend View latest post
   
Recent Topics   Next 15 >>  
 Forum   Author   Replies   Last Post 
Evo staff looking for some volunteers. Community Announcements coRpSE 20 Thu Jul 02, 2015 9:19 am
Depresjon2 View latest post
Evo Xtreme 2.0.9D Updated for PHP 5.6 General Support coRpSE 121 Thu Mar 23, 2017 3:57 pm
casterdon View latest post
[ MOD ] - Honeypot V2.2 AntiBot Module Security coRpSE 106 Tue Nov 22, 2016 11:30 am
coRpSE View latest post
Possible new Admin area layout Comments and Suggestions Lonestar 18 Wed Sep 14, 2016 11:37 am
Blackou View latest post
jQuery update General Support Lonestar 2 Wed May 11, 2016 4:49 pm
Charles64 View latest post
Deutsche Sprachdatei - german language files German DT50R 7 Thu Jan 28, 2016 7:04 am
DT50R View latest post
[FIX] Correct Cookie Settings (Invalid Session Error) Quick fixes killigan 110 Fri Mar 20, 2015 1:06 pm
Macdaddy View latest post
babstats nuke evo PHP 5.6 Modules pd35 4 Mon Mar 27, 2017 5:45 pm
Ragonese View latest post
Looking for coRpSE? He is gone till May. General Chat coRpSE 4 Sun Mar 26, 2017 6:50 pm
coRpSE View latest post
Think I got hit with malware somehow General Support bobdude 10 Sun Mar 26, 2017 6:44 pm
coRpSE View latest post
error log Bugs Redcougarxr7 31 Tue Mar 21, 2017 8:46 pm
coRpSE View latest post
I seem to be locked out of my website Smile General Support storm 4 Sat Mar 11, 2017 12:29 pm
coRpSE View latest post
Site gone off General Support GI_ 3 Fri Mar 03, 2017 11:21 am
Lonestar View latest post
Norwegian Language Multilingual Support dogbone 0 Wed Mar 01, 2017 10:43 pm
dogbone View latest post
Arcade General Support Reaper2388 59 Sun Feb 26, 2017 7:13 pm
pholix View latest post

Welcome PM showing from wrong user?

 
Post new topic    Reply to topic    printer-friendly view   Thank Post    Evolution-Xtreme Forum Index -> Quick fixes
View previous topic :: View next topic  
Author Message
coRpSE
Xtreme Developer
Xtreme Developer
Site Admin
Site Admin
Support Team
Support Team



Gender: Gender:Male
Joined: Dec 24, 2008
Age: 36
Posts: 1350
Location: Back of your mind!!!
Reputation: 185.8
votes: 10
usa.png


Status: Offline
Web Control Panel: 11.42.0 (build 23)
PostPosted: Sun Jan 04, 2015 8:19 pm Post subject: No icon Welcome PM showing from wrong user? Reply with quote

 By  default,  this  system  was  put  in  to  post  from  user  id  #2,  which  is  usually  the  admin  that  created  the  site.  The  problem  that  has  been  found  is  some  admins  leave  and  new  admins  take  their  place,  and  sometimes  when  those  admins  leave,  their  accounts  get  deleted  or  in  other  cases,  they  set  up  a  admin  account  separate  from  their  normal  account,  essentially  they  have  2  user  accounts.
 
 What  ever  the  case  may  be,  no  matter  what,  the  user  that  sends  the  PM  will  always  show  as  user  id  #2,  even  if  the  admins  account  is  really  user  ID  nume  6  or  what  ever.  I  have  been  contacted  a  couple  of  times  about  this  and  I  finally  got  around  to  looking  into  it  and  I  came  up  with  a  fix  for  this.  What  this  fix  does  is  removes  the  default  user  id  2  from  just  being  put  in  and  instead,  put  the  user  that  created  the  Welcome  PM  so  when  the  welcome  PM  is  sent,  its  coming  from  that  person  and  not  automatically  user  id  #2.  Only  3  files  need  to  be  edited  and  1  sql  run.  Very  simple  to  do.
 
 

 
 Go  into  your  phpmyadmin,  Run  this  SQL  first;
 
                                                 
PHP:                
ALTER TABLE  `nuke_welcome_pmADD  `from_uidINT NOT NULL FIRST;
UPDATE `nuke_welcome_pmSET  `from_uid` =  '2'
               

 
 (Note:  change  the  2  in  that  SQL  to  match  your  user  ID  number  if  you  want.  Or  just  resubmit  the  welcome  PM  after  all  the  edits  are  done.)
 
 Open:
 public_html/includes/usercp_register.php
 public_html/modules/Your_Account/public/functions_welcome_pm.php
 (edits  are  the  same)
 
 Find:
 
                                                 
Code:                
     $message  =  $row['msg'];                

 
 Add  on  new  line  BEFORE:
 
                                                 
Code:                
    $fromuid  =  $row['from_uid'];                

 
 
 
 Find:
 
                                                 
Code:                
     $sql  =  "INSERT  INTO  "  .  $prefix  .  "_bbprivmsgs  (privmsgs_type,  privmsgs_subject,  privmsgs_from_userid,  privmsgs_to_userid,  privmsgs_date  )  VALUES  ('1',  '".$subject."',  '2',  '".$new_uid."',  ".$privmsgs_date.")";                

 
 Replace  with:
 
                                                 
Code:                
     $sql  =  "INSERT  INTO  "  .  $prefix  .  "_bbprivmsgs  (privmsgs_type,  privmsgs_subject,  privmsgs_from_userid,  privmsgs_to_userid,  privmsgs_date  )  VALUES  ('1',  '".$subject."',  '".$fromuid."',  '".$new_uid."',  ".$privmsgs_date.")";                

 
 Save  &  Close
 
 
 Open:
 public_html/modules/Private_Messages/index.php
 
 Find:
 
                                                 
Code:                
    if($db->sql_numrows($db->sql_query("SELECT  *  FROM  ".$prefix."_welcome_pm"))  !=  0)  {
            $sql_w_pm  =  "UPDATE  ".$prefix."_welcome_pm  SET  subject='".$HTTP_POST_VARS['subject']."',  msg='".$HTTP_POST_VARS['message']."'";
      }  else  {
            $sql_w_pm  =  "INSERT  INTO  ".$prefix."_welcome_pm  VALUES('".$HTTP_POST_VARS['subject']."',  '".$HTTP_POST_VARS['message']."')";
      }
                 

 
 Replace  with:
 
                                                 
Code:                
     if($db->sql_numrows($db->sql_query("SELECT  *  FROM  ".$prefix."_welcome_pm"))  !=  0)  {
            $sql_w_pm  =  "UPDATE  ".$prefix."_welcome_pm  SET  from_uid  ='".$userdata['user_id']."',  subject='".$HTTP_POST_VARS['subject']."',  msg='".$HTTP_POST_VARS['message']."'";
      }  else  {
            $sql_w_pm  =  "INSERT  INTO  ".$prefix."_welcome_pm  VALUES('".$userdata['user_id']."',  '".$HTTP_POST_VARS['subject']."',  '".$HTTP_POST_VARS['message']."')";
      }                

 
 Now  that  is  it.  If  you  need  to,  reset  your  welcome  PM  so  your  user  name  will  show  up  as  the  sender  ot  you  can  maually  edit  your  user  ID  number  from  with  in  your  database,  in  the  nuke_welcome_pm  table,  the  column  of  course  to  edit  would  be  the  new  one,  from_uid.
 
 Hope  this  helps  others  in  the  future.
 
 
 
 Last  Note:
 If  you  are  not  sure  where  to  find  your  user  id.  on  your  site,  go  to  your  profile.  I  will  use  my  site  for  an  example.  Me,  my  profile  is:
 http://www.headshotdomain.net/modules.php?name=Profile&mode=viewprofile&u=2
 
 If  you  look  at  the  URL,  my  user  ID  number  happens  to  be  2.  Now  on  this  site,  if  we  take  a  look,  here  is  my  account  here:  
 http://evolution-xtreme.com/modules.php?name=Profile&mode=viewprofile&u=126
 
 again,  looking  at  the  URL,  I  see  &u=126  which  means  my  user  number  on  this  site  is  126.  which  usually  means  I  was  the  124  person  to  register  on  this  site,  which  is  not  always  true,  but  is  a  good  idea.  I  say  124  because  the  first  2  accounts  is  usually  Anonymous  and  the  admin,  then  after  user  1  and  2,  is  the  general  pop  that  registers  on  this  site.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view   Thank Post Evolution-Xtreme Forum Index ->  Quick fixes All times are UTC - 5 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
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Brazilian language files Post - Translation in Progress 14 Todikovic 7932 Wed Nov 26, 2014 5:23 pm
Sonikboy View latest post
No new posts Help required to CHMOD files............ 10 Evil_Blue 3769 Wed Nov 24, 2010 3:59 pm
Evil_Blue View latest post
No new posts I have found a way to embed long text files... 2 Thomas 2290 Mon Nov 08, 2010 12:56 am
Thomas View latest post
No new posts Missing Files according to logging webhost 3 nemesisNL 2561 Sun Oct 17, 2010 5:09 pm
SgtLegend View latest post
No new posts How do i install 2 .sql files into my database??? 1 Evil_Blue 2254 Sun Sep 26, 2010 9:47 am
SgtLegend View latest post
 




Powered by phpBB © 2001, 2006 phpBB Group
EvoXtreme Theme by SgtLegend ©
Forums ©