I try to figure out if it's possible for a mod to change the group of a member after a timeline.

For example, admin promote a member in a special group for x days, then he returns to the original group.

Thank you for your help.


Thanks now I had success, here is the code I use to show avatar of the member everywhere I want in the main.tpl:

Add in include/template/main.tpl (where you want to show the avatar)

<pun_include "myfile.php">

Make a new PHP file with this code :

// Load the profile.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/profile.php';

if ($pun_user['is_guest'])
{ // If it's a visitor, nothing...
$user_avatar = '';
{ // If it's a member
  if ($pun_config['o_avatars'] == '1' && $pun_user['show_avatars'] != '0')
    { // If the admin allowed members to use avatar AND member has an avatar
      if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.gif'))
      $user_avatar = '<a href="profile.php?section=personality&id='.$pun_user['id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.gif" '.$img_size[3].' alt="" /></a>';
      else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.jpg'))
      $user_avatar = '<a href="profile.php?section=personality&id='.$pun_user['id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.jpg" '.$img_size[3].' alt="" /></a>';
      else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.png'))
      $user_avatar = '<a href="profile.php?section=personality&id='.$pun_user['id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user['id'].'.png" '.$img_size[3].' alt="" /></a>';
  // If the admin allowed members to use avatar AND member has NO avatar
  $user_avatar = '<a href="profile.php?section=personality&id='.$pun_user['id'].'">'.$lang_profile['No avatar'].'</a>';
// Show the result  
echo $user_avatar;

RENAME your new PHP file 'myfile.php' and SAVE it to /include/user/


Thanks, so I need to search in this way. Do you know what I need to show the avatar of the member ? Any function like pun_user[avatar] ? Or I need to create myself ? And what I need to make one ?

By the way, any documentation about all the variable of member we can call? (name, avatar, last connexion, etc ?)


I want to add avatar of the current member in the main.tpl before the <pun_status>, but I can't find the way to make it, because tpl files seems to not understand PHP.

I also tried to make a new SUBST - <pun_avatar> in the header.php, or to use <pun_include "....">but still the same, I can't show the avatar of the member.

So is it possible to do it without to change lot and a lot of files, and please how ?

Thank you