PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
helsnicht
Hangin' Around


Joined: Jan 25, 2008
Posts: 42

PostPosted: Sun Jun 15, 2008 3:14 pm Reply with quote Back to top

I'm tring to allow for people to edit their bio within the MILPACS module. It has a field within the database to assign a nukeusername with a profile. So I'm wondering how to write it so that it checks that the username thats logged into nuke matches that of the milpacs nukeusername and allow for them and only them to edit the bio much like the forum does to allow for editing posts.

Such as if jdoe is logged in and went to his profile within milpacs he would see a link that'll let him edit his bio, but if he went to someone elses profile he wouldn't see the link.

I went into viewtopic.php and looked at the code to allow for editing of posts which is
Code:
if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )

But I'm not for sure how to convert that over to work with what I'm wanting. Anyone have some insight for me?
View user's profile Send private message Visit poster's website
montego
Site Admin


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

PostPosted: Wed Jun 18, 2008 6:52 am Reply with quote Back to top

Have you checked with the author? Donovan here is the original author of this module.
View user's profile Send private message Visit poster's website
helsnicht
Hangin' Around


Joined: Jan 25, 2008
Posts: 42

PostPosted: Fri Jun 20, 2008 3:10 pm Reply with quote Back to top

Yes, I'm aware that Donovan is the auther of MILPACS. I know he frequents here quiet often, one reason I posted the question here instead of the 3rdID's site. I figured if I asked a whole group of coders instead of a single person I would have better odds at finding the answer. Though it seems not many people have the time these days to help, so I'll just move on to something else, and jump back to this when I figure out how to do it or someone replies.
View user's profile Send private message Visit poster's website
montego
Site Admin


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

PostPosted: Sat Jun 21, 2008 6:27 am Reply with quote Back to top

helsnicht, its not just "not many people have the time these days to help", which is true to some degree, but its also a factor that MILPACS is not something that I, and others here, are really familiar with. I don't even know how the nukeusername is used. Is this the same as the user_id field in *nuke? I also don't know what other code MILPACS has already to grab the $userinfo within *nuke.

One way to get the logged in user's UserID and name is:

if (is_user($user)) {
cookiedecode($user);
$uid = intval($cookie[0]);
$uname = $cookie[1];
}

Now you have $uid and $uname to work with...
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