PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
m2fnuke
New Member
New Member


Joined: Apr 14, 2004
Posts: 14

PostPosted: Fri Jun 18, 2004 8:32 am Reply with quote Back to top

how does forums handle deleted users in Nuke??
my understanding was it defaults to Anonymous..
it didn't happen, so here is the env..

1. site is for registered users only..so forums are visible to reg users only
2. in includes/contant.php, I changed define('DELETED', -1); to define('DELETED', 152); where 152 is a user_id whom I want to own all the posts od deleted users..
3. when I delete a user in Nuke, the forums are not displaying the deleted user posts..now, they are supposed to be owned by postername with userid 152 ?? am I missing something??

how does and where is the code which handles the deleted users posts??

thanks in advance
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Fri Jun 18, 2004 8:36 am Reply with quote Back to top

That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
m2fnuke
New Member
New Member


Joined: Apr 14, 2004
Posts: 14

PostPosted: Fri Jun 18, 2004 11:05 am Reply with quote Back to top

Raven wrote:
That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152.


am a bit confused now:-)
here is what I did..and please correct me if something is amiss..

1. I have a bunch of users deleted in Nuke..their posts still remain in the tables and point to their user_id but no postername (that is expected)..
2. then I created a username DELETED and made sure it's user_id is 152
3. when I go back and look in forums, I still don't get the visibility to the posts originally owned by those deleted users..

so my question is how do I make the deleted users posts visible even after they no longer have an account??

I tried with default define (DELETED, -1) , no luck either..

thanks for any insight..
View user's profile Send private message
m2fnuke
New Member
New Member


Joined: Apr 14, 2004
Posts: 14

PostPosted: Mon Jun 21, 2004 3:27 pm Reply with quote Back to top

in /admin/modules/user.php
the code handling the delete users..

Code:

case "delUser":
    include("header.php");
    GraphicAdmin();
    OpenTable();
    echo "<center><font class=\"title\"><b>" . _USERADMIN . "</b></font></center>";
    CloseTable();
    echo "<br>";
    OpenTable();
    echo "<center><font class=\"option\"><b>" . _DELETEUSER . "</b></font><br><br>"
        ."" . _SURE2DELETE . " $chng_uid?<br><br>"
        ."[ <a href=\"admin.php?op=delUserConf&amp;del_uid=$chng_uid\">" . _YES . "</a> | <a href=\"admin.php?op=mod_users\">" . _NO . "</a> ]</center>";
    CloseTable();
    include("footer.php");
    break;
                                                                                                                                                       
    case "delUserConf":
    $db->sql_query("delete from " . $user_prefix . "_users where username='$del_uid'");
    Header("Location: admin.php?op=adminMain");
    break;


and in /modules/Forums/admin/admin_users.php
the code handling the delete user stuff..
Code:

if( $HTTP_POST_VARS['deleteuser'] )
                {
                        $sql = "SELECT g.group_id
                                FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
                                WHERE ug.user_id = '$user_id'
                                        AND g.group_id = ug.group_id
                                        AND g.group_single_user = '1'";
                        if( !($result = $db->sql_query($sql)) )
                        {
                                message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
                        }
                                                                                                                                                                                   
                        $row = $db->sql_fetchrow($result);
                                                                                                                                                                                   
                        $sql = "UPDATE " . POSTS_TABLE . "
                                SET poster_id = " . DELETED . ", post_username = '$username'
                                WHERE poster_id = '$user_id'";
                        if( !$db->sql_query($sql) )
                        {
                                message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql);
                        }
                                                                                                                                                                                   
                        $sql = "UPDATE " . TOPICS_TABLE . "
                                SET topic_poster = " . DELETED . "
                                WHERE topic_poster = '$user_id'";
                        if( !$db->sql_query($sql) )
                        {
                                message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql);
                        }
                                                                                                                                                                                    ......
.....



as u can see, the delete user called from "Edit Users" does not have or call any of the admin_users.php deleteuser..

not knowing enough of how the Nuke/PhpBB integration works/done..is this by desgin or left out stuff??/

I guess, the ugly way of fixing the users deleted from
nuke and their posts is to hardcode these admin_users.php stuff into users.php??

any pointers??
TIA
View user's profile Send private message
dcasmr
Worker
Worker


Joined: Feb 06, 2004
Posts: 147

PostPosted: Wed Apr 26, 2006 1:40 am Reply with quote Back to top

Raven wrote:
That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152.



Interesting. I have a situation where I am trying to get a post message in nuke_bbpost_text appear in the forums. The message is there, but on the forum it does not show. I know the post_id, the post_username, and I have a user_id numbered 55 that I would like to tie to the post.

On a side note, when someone reply to that forum we get the error message "No post for such topic"?

Thanks,
dcasmr
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7264
Location: Arizona

PostPosted: Wed Apr 26, 2006 6:42 am Reply with quote Back to top

Personally, if you are going to delete a user from Nuke, use nuke's User feature to do it. I have modified the code recently to take of NSN Groups for RavenNuke76 and that function is taking care of ALL of the places within nuke that use a user_id. Since the phpBB user delete is not "Nuke Aware", it would not change everything that would need to (I am making an assumption here as I have not looked at the phpBB code, but based on what I am seeing in the forums here, I think it to be a good assumption).
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum