Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Ranks Improvement 
 
Hello,

I wanna have your point of view on my following ideas ( if it's possible to do it and if it wont create some bug or probs ) :

1st/ Groups of Ranks

My idea would be to be able to create a " group " of ranks. This group will be able to contain many other ranks. For exemple :
I create a group of rank called " Graphic "
In this one I put 3 ranks ranking by post and named " Neophyte " - " Master " - " Pro "
The utility of this " group of rank " user will be able to have a specific rank which will improve automatically. I explain : imagine you need 100 post for be neophyte, 250 for master and 500 for pro. That would be easy to set it with normal ranks BUT the problem with normal ranks is that EVERY users who will get 100 posts will have " Neophyte " rank etc ... With this " group of rank ", we would be able to set that only users with that specific group of rank will get those ranks ( in that order and setted with these properties ).
We also could make other groups of ranks and combine each ... Imagine I also have a group of rank called " Coder " with 2 ranks setted by posts too : " New " ( 50 posts ) - " Old " ( 200 posts ).
We could mix both groups and, for sample, a user who has both group of ranks will see his ranks automatically updated with his posts and admin won't need to change it manually !!! ( Very useful when you've a lot of members and many kind of ranks with specific " upgrades " for each ones ).

If i'm not rly clear, tell me I'll try to explain better with some complements.

2nd/ Special Ranks automatically setting by Cash

My second idea would to be able to set special ranks with another feature : Actually, special ranks can be set by :
-Automatic ranking by days
-Automatic ranking by posts
-Special Rank
-Guest ( rank only for guest I suppose ? ** )
-Banned ( same for banned people ? ** )
My idea would be to add :
-Cash ( with a little text field for choose the database field of cash point )

For exemple, I've a cash currency name " Gold " in " user_gold " and I would create ranks " Poor " - " Rich " set by this currency ^^ I suppose it is possible because, if I'm right, ranking by day or post simply take another field ( user_posts for sample )

Thanks for your help, ideas and replies =)
 



 
YrosSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
First thing it's not so easy... second one could be implemented with some basic skills.

I have no time for both... maybe you are lucky and will find someone interested in that who could help in the process.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
Well, if I don't I will try to find how ranks setting are made and will try to copy one of the field, modifying what I need ><'. Thanks anyway. If I find a way I will reply here for share.

EDIT : Can someone check my following process and tell me what is missing for make that option appeared ? --'

Code: [Download] [Hide] [Select]
#
#-----[ OPEN ]------------------------------------------
#

ranks.php

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

        case '3':
            $rank_special_des = $lang['Rank_Special_Banned'];
            break;

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

case '4':
            $rank_special_des = $lang['Rank_Special_Cash'];
            break;

#
#-----[ OPEN ]------------------------------------------
#

adm/admin_ranks.php

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

$rank_is_banned = ($rank_info['rank_special'] == '3') ? "checked=\"checked\"" : "";


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

$rank_by_cash = ($rank_info['rank_cash'] == '4') ? "checked=\"checked\"" : "";

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

"BANNED_RANK" => $rank_is_banned,

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

"CASH_RANK" => $rank_by_cash,

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

"L_SPECIAL_RANK" => $lang['Rank_Special'],

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

"L_CASH_RANK" => $lang['Rank_Special_Cash'],

#
#-----[ FIND ]------------------------------------------
# I don't know if that following process is useful ... Is it ?

"L_RANK_SPECIAL" => $lang['Rank_special'],

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

"L_RANK_CASH" => $lang['Rank_Special_Cash'],

#
#-----[ OPEN ]------------------------------------------
#

language/{your_languages}/lang_main.php

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

'Rank_Special_Banned' => 'Special Rank For Banned',

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

'Rank_Special_Cash' => 'Rank by Cash',


And it seems that in include/fuctions_mg_ranks.php I should add the properties of $rank_by_cash but here ... I haven't enough knowledge for do that ^^'
 



 
YrosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
Hellow,

I did not forget this topic and I'd like to know if someone could help me for adapt a mod from phpBB 2 to Icy Phoenix. It is a simple basic mode which allow to use cash as a rank special feature. With this mode you can use cash ( user_point ) function for define ranks ( starting at X points for sample ).

The mod himself only need some files editing ( under phpBB 2 ). The installation is the following one :

Code: [Download] [Hide] [Select]
##############################################################
## MOD Titre :         Rank Gain Access
## MOD Auteur :     Poupoune < kristff@hotmail.com > (N/A) http://www.phpbb-fr.com
##
## MOD Description :     Permet de choisir dans le panneau d'administration le choix d'attribution des rangs,
##             selon, soit la méthode classique selon le nombre de messages, soit selon le nombre de points
##             obtenus par le membre grâce à un système de points. Le MOD est compatible avec le Cash MOD
##             de Xore et le Point System d'eXplosive. Si aucun système de points n'est installé, la fonction du choix
##             du rang selon le nombre de points sera désactivé.            
##
## MOD Version : 1.0.0
##
## Niveau d'installation : moyen
## Temps d'installation :  10 minute(s)
## Fichier(s) à éditer :   8
##     includes/constants.php
##    admin/admin_ranks.php
##    includes/usercp_register.php
##    includes/usercp_viewprofile.php
##    viewtopic.php
##    language/lang_french/lang_admin.php
##    templates/subSilver/admin/ranks_list_body.tpl
##    templates/subSilver/admin/ranks_edit_body.tpl
##      
## Fichier(s) inclu(s) :   0
##
##############################################################
## Pour des raisons de sécurité, vous êtes prier de consulter
## régulièrement http://forums.phpbb-fr.com afin d'obtenir la
## dernière version de ce MOD.
## Télécharger ce MOD à partir des sites autres que phpBB-fr.com
## peut être dangereux pour votre forum phpBB.
## Par conséquent, phpBB-fr.com n'assurera aucun support pour
## les MODs absents de leur base de données, consultable sur:
## http://forums.phpbb-fr.com/
##############################################################
## Notes de l'auteur :
##
## Si vous utilisez le Cash MOD de Xore, il faut que vous crééez une monnaie
## s'appelant 'points' afin de rajouter un champ user_points à la table des users,
## afin de permettre au MOD de fonctionner correctement.
##
##############################################################
## Historique du MOD :
##
##   05-07-2004 - Version 1.0.0
##
##############################################################
## Avant d'ajouter ce MOD à votre forum, il vous est fortement conseillé
## d'effectuer une sauvegarde des éléments que vous allez modifier.
##############################################################

#
#-----[ SQL ]----------------------------------------------
#

ALTER TABLE phpbb_ranks ADD rank_choose_minimum tinyint(1) not null;

#
#-----[ OUVRIR ]----------------------------------------------
#

includes/constants.php

#
#-----[ CHERCHER ]----------------------------------------------
#

define('USER_AVATAR_GALLERY', 3);

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

// Rank gain access MOD
define('USER_POINTS_MINIMUM', 1);


#
#-----[ OUVRIR ]----------------------------------------------
#

admin/admin_ranks.php

#
#-----[ OUVRIR ]----------------------------------------------
#

    $rank_is_special = ( $rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
    $rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked=\"checked\"" : "";

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

  $rank_minimum_points = ( $rank_info['rank_choose_minimum'] ) ? "checked=\"checked\"" : "";
    
  $sql = "SELECT * FROM " . USERS_TABLE ."
     WHERE user_points";    
  
  if( !$result = $db->sql_query($sql) )
  {
    $lock_points = 'disabled';
    $template->assign_block_vars('switch_no_point_explain', array() );
  }
  else
  {
     $lock_points = '';
     $template->assign_block_vars('switch_point_system_explain', array() );
  }


#
#-----[ CHERCHER ]----------------------------------------------
#

    "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

    "RANK_MINIMUM_POINTS" => $rank_minimum_points,
    "LOCK_POINTS" => $lock_points,

#
#-----[ CHERCHER ]----------------------------------------------
#

    "L_RANK_SPECIAL" => $lang['Rank_special'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

    "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'],
    "L_RANK_POINT_SYSTEM_EXPLAIN" => $lang['Rank_point_system_explain'],
    "L_RANK_NO_POINT_EXPLAIN" => $lang['Rank_no_point_explain'],
    "L_POINTS" => $lang['Points'],

#
#-----[ CHERCHER ]----------------------------------------------
#

    $special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

    $rank_choose_minimum = ( $HTTP_POST_VARS['rank_choose_minimum'] == 1 ) ? TRUE : 0;

#
#-----[ CHERCHER ]----------------------------------------------
#

    $sql = "UPDATE " . RANKS_TABLE . "
      SET

#
#-----[ DANS LA LIGNE CHERCHER ]----------------------------------------------
#

rank_image = '" . str_replace("\'", "''", $rank_image) . "'    

#
#-----[ DANS LA LIGNE APRES, AJOUTER ]----------------------------------------------
#

, rank_choose_minimum = $rank_choose_minimum    


#
#-----[ CHERCHER ]----------------------------------------------
#

$sql = "INSERT INTO " . RANKS_TABLE . "

#
#-----[ DANS LA LIGNE CHERCHER ]----------------------------------------------
#

, rank_image    

#
#-----[ DANS LA LIGNE APRES, AJOUTER ]----------------------------------------------
#

, rank_choose_minimum    

#
#-----[ CHERCHER ]----------------------------------------------
#

)";

#
#-----[ AVANT, AJOUTER ]----------------------------------------------
#

, $rank_choose_minimum

#
#-----[ CHERCHER ]----------------------------------------------
#

      "L_RANK_MINIMUM" => $lang['Rank_minimum'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'],

#
#-----[ CHERCHER ]----------------------------------------------
#

      $special_rank = $rank_rows[$i]['rank_special'];

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      $rank_choose_minimum = $rank_rows[$i]['rank_choose_minimum'];

#
#-----[ CHERCHER ]----------------------------------------------
#

      "SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      "RANK_CHOOSE_MINIMUM" => ( $rank_choose_minimum == 1 ) ? $lang['Points'] : $lang['Posts'],

#
#-----[ CHERCHER ]----------------------------------------------
#

      "L_RANK_MINIMUM" => $lang['Rank_minimum'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'],

#
#-----[ CHERCHER ]----------------------------------------------
#

      $special_rank = $rank_rows[$i]['rank_special'];

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      $rank_choose_minimum = $rank_rows[$i]['rank_choose_minimum'];

#
#-----[ CHERCHER ]----------------------------------------------
#

      $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      $rank_selected_minimum = ( $rank_choose_minimum ) ? $lang['Points'] : $lang['Posts'];

#
#-----[ CHERCHER ]----------------------------------------------
#

      "SPECIAL_RANK" => $rank_is_special,

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

      "RANK_CHOOSE_MINIMUM" => $rank_selected_minimum,

#
#-----[ OUVRIR ]----------------------------------------------
#

includes/usercp_viewprofile.php

#
#-----[ CHERCHER ]----------------------------------------------
#

else
{
  for($i = 0; $i < count($ranksrow); $i++)
  {
    if ( $profiledata['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
    {
      $poster_rank = $ranksrow[$i]['rank_title'];
      $rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
    }
  }
}

#
#-----[ REMPLACER PAR ]----------------------------------------------
#

else
{
  for($i = 0; $i < count($ranksrow); $i++)
  {
    if ( $ranksrow[$i]['rank_choose_minimum'] == USER_POINTS_MINIMUM )
    {
      if ( $profiledata['user_points'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
      {
        $poster_rank = $ranksrow[$i]['rank_title'];
        $rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
      }
    }  
  }
}

#
#-----[ OUVRIR ]----------------------------------------------
#

viewtopic.php

#
#-----[ CHERCHER ]----------------------------------------------
#

  else
  {
    for($j = 0; $j < count($ranksrow); $j++)
    {
      if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
      {
        $poster_rank = $ranksrow[$j]['rank_title'];
    $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
      }
    }
  }

#
#-----[ REMPLACER PAR ]----------------------------------------------
#

  else
  {
    for($j = 0; $j < count($ranksrow); $j++)
    {
      }
      if ( $ranksrow[$j]['rank_choose_minimum'] == USER_POINTS_MINIMUM )  
      {
        if ( $postrow[$i]['user_points'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
    {
      $poster_rank = $ranksrow[$j]['rank_title'];
      $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
    }
      }  
    }
  }

#
#-----[ OUVRIR ]----------------------------------------------
#

language/lang_french/lang_admin.php

#
#-----[ CHERCHER ]----------------------------------------------
#

$lang['Rank_minimum'] = '

#
#-----[ REMPLACER PAR ]----------------------------------------------
#

// Début Rank gain access MOD
$lang['Rank_minimum'] = 'Messages / Points Minimum';
$lang['Points'] = 'Points';
$lang['Posts'] = 'Messages';
$lang['Rank_choose_minimum'] = 'Choix du système de répartition des rangs';
$lang['Rank_point_system_explain'] = 'Un système de points compatible a bien été detecté sur votre forum';
$lang['Rank_no_point_explain'] = 'Aucun système de points compatible n\'est installé sur ce forum';
// Fin rank gain access MOD

#
#-----[ OUVRIR ]----------------------------------------------
#

templates/subSilver/admin/ranks_list_body.tpl

#
#-----[ CHERCHER ]----------------------------------------------
#

<th class="thTop">{L_RANK_MINIMUM}</th>

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

<th class="thTop">{L_RANK_CHOOSE_MINIMUM}</th>

#
#-----[ CHERCHER ]----------------------------------------------
#

<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_MIN}</td>

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_CHOOSE_MINIMUM}</td>

#
#-----[ OUVRIR ]----------------------------------------------
#

templates/subSilver/admin/ranks_edit_body.tpl

#
#-----[ CHERCHER ]----------------------------------------------
#

  <tr>
    <td class="row1"><span class="gen">{L_RANK_SPECIAL}</span></td>
    <td class="row2"><input type="radio" name="special_rank" value="1" {SPECIAL_RANK} />{L_YES} &nbsp;&nbsp;<input type="radio" name="special_rank" value="0" {NOT_SPECIAL_RANK} /> {L_NO}</td>
  </tr>

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

  <tr>
    <td class="row1"><span class="gen">{L_RANK_CHOOSE_MINIMUM}</span><br />
    <span class="gensmall">
    <!-- BEGIN switch_point_system_explain -->
    {L_RANK_POINT_SYSTEM_EXPLAIN}*
    <!-- END switch_point_system_explain -->
    <!-- BEGIN switch_no_point_explain -->
    {L_RANK_NO_POINT_EXPLAIN}*
    <!-- END switch_no_point_explain -->
    </span></td>
    <td class="row2"><input type="radio" name="rank_choose_minimum" {LOCK_POINTS} value="1" {RANK_MINIMUM_POINTS} /> {L_POINTS}</td>
  </tr>

#
#-----[ SAUVEGARDER/FERMER TOUS LES FICHIERS ]------------------------------------------
#
# FdM


It work perfectly under phpBB 2 but I couldn't adapt it to Icy Phoenix and I'd like to know if someone could take a look at this and help me to update this mod ? And if you have the time to add the possibility to choose which currency of cash mod we want to use ( allow other currency than user_point ) it would be very great ^^
Thanks to anyone who will help =)
 



 
YrosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
Only thing i see after a quick glance at your code is that you´ve got to replace the vars

change $HTTP_POST_VARS   to  $_POST

Hope that helps
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
Yros ... This file is in french ...
 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Ranks Improvement 
 
Informpro wrote: [View Post]
Yros ... This file is in french ...


Its simple...
Spoiler: [ Show ]


Greetings..
 



 
Edited by TuningBEB2008, Fri 27 Nov, 2009 06:57: update 27/11/09
TuningBEB2008Send private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron