[RC] 2.0.4/2.0.5 : Profile Controle Panel v 1.0.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

> Senghong : keep reporting, it's a very important point to get the mod better :)

- title tag : I'm not often put it on pictures, except when the pic can be misunderstood. I have so to see for this one (it will probably result in a client function rather than repeating the tag everywhere ;)),

- adding an existing field to the buddy list : if you look at the tutos, you will see the display part is always splitted from the input part, and modifications for buddy list is a part itself :). Just use the name of your existing field in place of the a added field :),

- AAAAMMJJ : my bad : this should appear in a $lang[] var, and it means YYYYMMDD
senghong79
Registered User
Posts: 311
Joined: Wed Oct 30, 2002 2:45 pm
Location: Malaysia

Post by senghong79 »

Ptirhiik - RPGnet-fr wrote: - adding an existing field to the buddy list : if you look at the tutos, you will see the display part is always splitted from the input part, and modifications for buddy list is a part itself :). Just use the name of your existing field in place of the a added field :),


Ahh... Thanks. I'll take a closer look (shouldn't have been lazy in the first place!)
CapCom_SHoP
Registered User
Posts: 136
Joined: Wed Nov 20, 2002 12:10 am

attachement mod

Post by CapCom_SHoP »

I had this working at one time.. but I temp took it off to do an upgrade on the profile componets..
now my problem is finding the line to put the info in privmsgs.php template..

does someone have a working line to add the functions of the attachment mod into the profilecp.. ??
all the backbone stuff was never changed, just the template file.. so greatly apperciated.. thx.
Image
chickeneater
Registered User
Posts: 400
Joined: Wed May 21, 2003 3:16 pm

Post by chickeneater »

I installed the sticky avatar, and now I can't find the avatar function. where would it be located?
Eliar
Registered User
Posts: 82
Joined: Sat Apr 06, 2002 1:44 am
Contact:

Post by Eliar »

I get the following error when accessing my profile

Code: Select all

Could not obtain Friend list information

DEBUG MODE

SQL Error : 1146 Table 'coffnet_main.BUDDYS_TABLE' doesn't exist

SELECT b.*, u.user_id as user_user_id, u.* from BUDDYS_TABLE as b, phpbb_users as u, phpbb_sessions as s WHERE b.user_id = 2 and b.buddy_ignore = 0 and u.user_id = b.buddy_id and s.session_user_id = b.buddy_id and s.session_time >= 1060635374 ORDER BY username

Line : 65
File : /home2/coffnet/public_html/forums/profilcp/profilcp_home.php
chickeneater
Registered User
Posts: 400
Joined: Wed May 21, 2003 3:16 pm

Post by chickeneater »

did you do the sql?
Josh Windu
Registered User
Posts: 377
Joined: Sun Jul 14, 2002 3:14 am
Location: Australia
Contact:

Post by Josh Windu »

have you run the mysql install, or installed the tables?
Nitrotech - Alpha stage... Your own fully customisable forum! and site!
Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

work with easy mod?
chickeneater
Registered User
Posts: 400
Joined: Wed May 21, 2003 3:16 pm

Post by chickeneater »

yes, all you gotta do is insert the sql
CapCom_SHoP
Registered User
Posts: 136
Joined: Wed Nov 20, 2002 12:10 am

ACP Addon

Post by CapCom_SHoP »

Ok people.. I'm thinking the File Attachment Display Icon would look much better in the ACP panel for the users..
so lets have it.. who's got it? heh..
thx btw.
Image
User avatar
Hater
Registered User
Posts: 570
Joined: Tue May 06, 2003 8:56 pm
Location: Wisconsin
Contact:

Post by Hater »

Again, I just wanted to say excellent mod.

I love it, and it's modular design is just spectacular.

Anyone that wants to see it in action can visit www.wildemotorsports.com.
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

A fix to apply, in order to enhance the compliancy with other mods (no real impact on existing ones :)) :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
# - fix : 2003-08-13-01 : add the global def for system values
functions.php
#
#-----[ FIND ]------------------------------------------------
#

	if(defined('HAS_DIED'))
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
//-- fix
	global $admin_level, $level_prior;
//-- fin mod : profile cp --------------------------------------------------------------------------
jarosz
Registered User
Posts: 20
Joined: Wed Aug 13, 2003 10:57 am
Location: Kraków, Poland
Contact:

Polish version

Post by jarosz »

Hello!

I've made a Polish version of your mode
Today or tomorrow I'll finish lang_admin and icons...

You might want to use it in your foreign packs, if it's ok?
Last edited by jarosz on Thu Aug 14, 2003 8:15 am, edited 1 time in total.
- jarosz -
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

i need an addon for this, and i cant do it :(

it's for the rpg mod

it refreshes the stats, and shows stats

here is the code for it

Code: Select all


# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php

# 
#-----[ FIND ]------------------------------------------ 
# 
	$avatar_img = '';

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//get avatar overlay dimensions
	$c2sql = "select config_value from phpbb_config where config_name='statsconfig'";
	if ( !($c2result = $db->sql_query($c2sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error!'); }
	$c2row = mysql_fetch_array($c2result);
$stats_config = explode(',',$c2row['config_value']);

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

		case USER_AVATAR_UPLOAD:
			$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
			case USER_AVATAR_UPLOAD:
				$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
	$avatar_img = ( $profiledata['user_status'] !=0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/' . 'status_' . $profiledata['user_status'] . '.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
	$avatar_img = ( $profiledata['user_hp'] == 0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/dead.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
				break;

			case USER_AVATAR_REMOTE:
				$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
	$avatar_img = ( $profiledata['user_status'] !=0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/' . 'status_' . $profiledata['user_status'] . '.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
	$avatar_img = ( $profiledata['user_hp'] == 0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/dead.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
				break;

			case USER_AVATAR_GALLERY:
				$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
	$avatar_img = ( $profiledata['user_status'] !=0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/' . 'status_' . $profiledata['user_status'] . '.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
	$avatar_img = ( $profiledata['user_hp'] == 0 ) ? '<div style="position:absolute;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:1;"><IMG src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" border=0 width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div><div style="position:relative;padding:0px;width:'.$stats_config[7].'px;height:'.$stats_config[6].'px;z-index:2;"><IMG src="' . $board_config['avatar_gallery_path'] . '/dead.gif" border=0 STYLE="filter:alpha(opacity=65)" width="'.$stats_config[7].'" height="'.$stats_config[6].'"></div>' : $avatar_img;
				break;


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

	$donate_points = '<br />' . sprintf($lang['Points_donate'], '<a href="' . append_sid("pointscp.$phpEx?mode=donate&user_id=" . $profiledata['user_id']) . '" class="genmed" title="' . sprintf($lang['Points_link_title_2'], $board_config['points_name']) . '">', '</a>')

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

			$donate_points = '<a href="' . append_sid("pointscp.$phpEx?mode=donate&user_id=" . $profiledata['user_id']) . '"><img src="templates/subSilver/images/stat_gold.gif" width="16" height="7" border="0" alt="Donate '.$board_config['points_name'].'"></a>';

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

//
// Generate page
//

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//REGENERATE HP, MP & Prize Limit

//get config values
	$c2sql = "select config_value from phpbb_config where config_name='statsconfig'";
	if ( !($c2result = $db->sql_query($c2sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error!'); }
	$c2row = mysql_fetch_array($c2result);
$stats_config = explode(',',$c2row['config_value']);

$membership_days = floor( ( time() - $userdata['user_regdate'] ) / 86400 );

$noreplenish = 0;
if (($userdata['user_hp'] == 0) && ($stats_config[4] == 0))
{$noreplenish = 1;}

if (($membership_days > ($userdata['user_statupdate']+($stats_config[1]-1))) && ($userdata['user_id'] == $profiledata['user_id']) && ($noreplenish == 0))
{ 
$hp_regen = round((($userdata['user_hpmax']-$userdata['user_hp'])/100)*$stats_config[2]);
$mp_regen = ($userdata['user_mpmax'] > 0) ? round((($userdata['user_mpmax']-$userdata['user_mp'])/100)*$stats_config[2]) : 0;
$new_hp = $userdata['user_hp'];
$new_mp = $userdata['user_mp'];
$new_limit = $stats_config[5];
$new_exp = $stats_config[3];
if ($userdata['user_hp'] < $userdata['user_hpmax']) {$new_hp = $userdata['user_hp'] + $hp_regen;}
if ($new_hp > $userdata['user_hpmax']) {$new_hp = $userdata['user_hpmax'];}
if ($userdata['user_mp'] < $userdata['user_mpmax']) {$new_mp = $userdata['user_mp'] + $mp_regen;}
if ($new_mp > $userdata['user_mpmax']) {$new_mp = $userdata['user_mpmax'];}


	$sql="UPDATE " . USERS_TABLE . " SET user_hp='$new_hp', user_mp='$new_mp', user_prizelimit='$new_limit',  user_statupdate='$membership_days', user_exp = user_exp+$new_exp WHERE username='$userdata[username]'";
	if ( !($results = $db->sql_query($sql)) ) {message_die(GENERAL_MESSAGE, 'Fatal Error Replenishing User Statistics!');}

message_die(GENERAL_MESSAGE,'User statistics replenished!<P><A HREF="'.append_sid("profile.php?mode=viewprofile&u=$profiledata[user_id]").'">Continue on to Profile...</A>');

}


//STATISTICS
//Moogie's stat mod!
$poster_lvl = ( $poster_id != ANONYMOUS ) ? '<TR><TD colspan="2" align="center"><span class="gensmall">'.$profiledata['user_class'].' LV'.$profiledata['user_statlevel'].'</span></TD></TR>' : '';

if (($profiledata['user_status'] != 0) && ($poster_id != ANONYMOUS))
{
$poster_status = ( $profiledata['user_status'] == 1 ) ? '<TR><TD colspan="2" align="center"><span class="gensmall" style="color:#00FF00"><b>POISONED</b></span></TD></TR>' : '<TR><TD colspan="2" align="center"><span class="gensmall" style="color:#FF0000"><b>CURSED</b></span></TD></TR>';
}

$poster_attdef = ( $poster_id != ANONYMOUS ) ? '<TR><TD colspan="2" align="center"><span class="gensmall">ATT:'.$profiledata['user_att'].' DEF:'.$profiledata['user_def'].'</span></TD></TR>' : '';

//HP bar
$poster_hp_fullwidth = round(($profiledata['user_hp']/$profiledata['user_hpmax'])*40);
$poster_hp_full = ($poster_hp_fullwidth != 0) ? '<img src="templates/subSilver/images/stat_barfull.gif" width="'.$poster_hp_fullwidth.'" height="7" border="0" ALT="HP: '.$profiledata['user_hp'].'/'.$profiledata['user_hpmax'].'">' : '';
$poster_hp_emptywidth = 40-$poster_hp_fullwidth;
$poster_hp_empty = ($poster_hp_emptywidth != 0) ? '<img src="templates/subSilver/images/stat_barempty.gif" width="'.$poster_hp_emptywidth.'" height="7" border="0" ALT="HP: '.$profiledata['user_hp'].'/'.$profiledata['user_hpmax'].'">' : '';

$poster_hp = ( $poster_id != ANONYMOUS ) ? '<TR><TD><span class="gensmall">HP:</span></TD><TD><img src="templates/subSilver/images/stat_barstart.gif" width="2" height="7" border="0">'.$poster_hp_full.$poster_hp_empty.'<img src="templates/subSilver/images/stat_barend.gif" width="2" height="7" border="0"></TD></TR>' : '';

//MP bar
if ($profiledata['user_mpmax'] > 0) {
$poster_mp_fullwidth = round(($profiledata['user_mp']/$profiledata['user_mpmax'])*40);
$poster_mp_full = ($poster_mp_fullwidth != 0) ? '<img src="templates/subSilver/images/stat_barfull.gif" width="'.$poster_mp_fullwidth.'" height="7" border="0" ALT="MP: '.$profiledata['user_mp'].'/'.$profiledata['user_mpmax'].'">' : '';

$poster_mp_emptywidth = 40-$poster_mp_fullwidth;
$poster_mp_empty = ($poster_mp_emptywidth != 0) ? '<img src="templates/subSilver/images/stat_barempty.gif" width="'.$poster_mp_emptywidth.'" height="7" border="0" ALT="MP: '.$profiledata['user_mp'].'/'.$profiledata['user_mpmax'].'">' : '';

$poster_mp = ( $poster_id != ANONYMOUS ) ? '<TR><TD><span class="gensmall">MP:</span></TD><TD><img src="templates/subSilver/images/stat_barstart.gif" width="2" height="7" border="0">'.$poster_mp_full.$poster_mp_empty.'<img src="templates/subSilver/images/stat_barend.gif" width="2" height="7" border="0"></TD></TR>' : '';
}

if ($profiledata['user_mpmax'] < 1)
{$poster_mp = ( $poster_id != ANONYMOUS ) ? '<TR><TD><span class="gensmall">MP:</span></TD><TD><img src="templates/subSilver/images/stat_barstart.gif" width="2" height="7" border="0"><img src="templates/subSilver/images/stat_barempty.gif" width="40" height="7" border="0" ALT="MP: 0/0"><img src="templates/subSilver/images/stat_barend.gif" width="2" height="7" border="0"></TD></TR>' : '';}

//EXP bar 
$poster_expmax = $stats_config[0];
$poster_exp_fullwidth = round(($profiledata['user_exp']/$poster_expmax)*40);
if ($poster_exp_fullwidth > 40) {$poster_exp_fullwidth = 40;}
$poster_exp_full = ($poster_exp_fullwidth != 0) ? '<img src="templates/subSilver/images/stat_barfull.gif" width="'.$poster_exp_fullwidth.'" height="7" border="0" ALT="EXP: '.$profiledata['user_exp'].'/'.$poster_expmax.'">' : '';
$poster_exp_emptywidth = 40-$poster_exp_fullwidth;
$poster_exp_empty = ($poster_exp_emptywidth != 0) ? '<img src="templates/subSilver/images/stat_barempty.gif" width="'.$poster_exp_emptywidth.'" height="7" border="0" ALT="EXP: '.$profiledata['user_exp'].'/'.$poster_expmax.'">' : '';

$poster_exp = (($poster_id != ANONYMOUS) && (($stats_config[12] == 1) || ($userdata['user_level'] == 1))) ? '<TR><TD><span class="gensmall">EX:</span></TD><TD><img src="templates/subSilver/images/stat_barstart.gif" width="2" height="7" border="0">'.$poster_exp_full.$poster_exp_empty.'<img src="templates/subSilver/images/stat_barend.gif" width="2" height="7" border="0"></TD></TR>' : '';

//PRIZE LIMIT bar
$prizelimit = $stats_config[5];
$poster_pl_fullwidth = round(($profiledata['user_prizelimit']/$prizelimit)*40);
$poster_pl_full = ($poster_pl_fullwidth != 0) ? '<img src="templates/subSilver/images/stat_barfull.gif" width="'.$poster_pl_fullwidth.'" height="7" border="0" ALT="Prizes Remaining: '.$profiledata['user_prizelimit'].'/'.$prizelimit.'">' : '';

$poster_pl_emptywidth = 40-$poster_pl_fullwidth;
$poster_pl_empty = ($poster_pl_emptywidth != 0) ? '<img src="templates/subSilver/images/stat_barempty.gif" width="'.$poster_pl_emptywidth.'" height="7" border="0" ALT="Prizes Remaining: '.$profiledata['user_prizelimit'].'/'.$prizelimit.'">' : '';

$poster_pl = ( $poster_id != ANONYMOUS ) ? '<TR><TD><span class="gensmall">PL:</span></TD><TD><img src="templates/subSilver/images/stat_barstart.gif" width="2" height="7" border="0">'.$poster_pl_full.$poster_pl_empty.'<img src="templates/subSilver/images/stat_barend.gif" width="2" height="7" border="0"></TD></TR>' : '';

//Victories/Defeats Display
$poster_vicdef = ( $poster_id != ANONYMOUS ) ? '<TR><TD colspan="2"><span class="gensmall">Victories: '.$profiledata[user_victories].'<BR>Defeats: '.$profiledata[user_defeats].'<BR>Escapes: '.$profiledata[user_escapes].'</span></TD></TR>' : '';

//Gold Display
$poster_gold = ( $poster_id != ANONYMOUS ) ? '<TR><TD>'.$donate_points.'</TD><TD><span class="gensmall">'.$user_points.'</span></TD></TR>' : '';

$inventoryurl = append_sid("shop.".$phpEx."?action=inventory&searchname=".$profiledata[username]);

$poster_collection = ( $poster_id != ANONYMOUS ) ? '<TR><TD colspan="2" align="center"><span class="gensmall"><A HREF="'.$inventoryurl.'">Inventory</A></span></TD></TR>' : '';

$poster_stats = ( $poster_id != ANONYMOUS ) ? '<TABLE cellpadding="0" cellspacing="0" border="0"><tr height="5"><td></td><td></td></tr>'.$poster_lvl.$poster_status.$poster_attdef.$poster_hp.$poster_mp.$poster_pl.$poster_exp.$poster_vicdef.$poster_gold.$poster_collection.'</TABLE>' : '';

# 
#-----[ FIND ]------------------------------------------ 
# 
	'PERCENTAGE' => $percentage . '%', 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	'POSTER_STATS' => $poster_stats,

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/profile_view_body.tpl


# 
#-----[ ADD (where you want the stats displayed) ]------
# 
{POSTER_STATS}

how would u add that to the pro cp?
senghong79
Registered User
Posts: 311
Joined: Wed Oct 30, 2002 2:45 pm
Location: Malaysia

Post by senghong79 »

Just curious again :

Where does the script checks for the "user_allow_email" to stop a user from sending email when he is not allowed to? I couldn't find it in profilcp_email.php.
I know a user who can't send email won't be able to see the links, but will he be able to send with a direct url (I think, not tested) such as profile.php?mode=email&u=id, and also from unmoddified parts such as modcp.php?
Locked

Return to “[2.0.x] MODs in Development”