Parašė Enzo· 2008 Geg. 15 14:05:34
#19
Imk čia:
##############################################################
## MOD Title: Ranking System
## MOD Author: Evil Inc. < http://evilgenius.funpic.de/CMS/... >
## Ðis modas ádiegia pas jus puslapyje rangus
##
## Failai kuriuos redaguosime: 8
## maincore.php
## profile.php
## administration/forums.php
## forum/postedit.php
## forum/postnewthread.php
## forum/postreply.php
## forum/viewthread.php
## locale/English/admin/forums.php
##
## Pridëti failai: 1
## administration/forum_ranks.php
##
#
#-----[ Ákeliame á savo puslapá ]------------------------------------------
#
administration/forum_ranks.php TO administration/forum_ranks.php
#
#-----[ SQL ]------------------------------------------
#
# Vietoj fusion pakeisk á savo prefixà ir atliks sql uþklausà
#
CREATE TABLE IF NOT EXISTS fusion_ranks (
rank_id smallint(5) unsigned NOT NULL auto_increment,
rank_title varchar(50) NOT NULL default '',
rank_image varchar(255) NOT NULL default '',
rank_post smallint(5) unsigned NOT NULL default '0',
rank_special tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (rank_id)
) TYPE=MyISAM;
ALTER TABLE fusion_users ADD user_rank smallint(5) unsigned NOT NULL default '0';
#
#-----[ Sukurk ]------------------------------------------
#
Sukurk direktorijà ranks, images folderyje
#
#-----[ Atsidaryk ]------------------------------------------
#
maincore.php
#
#-----[ Surask ]------------------------------------------
#
define("THEMES", BASEDIR."themes/");
#
#-----[ Po juo dëk ]------------------------------------------
#
define("IMAGES_R", IMAGES."ranks/");
#
#-----[ Surask ]------------------------------------------
#
// Create a list of files or folders and store them in an array
function makefilelist($folder, $filter, $sort=true, $type="files") {
#
#-----[ Prieð já dëk ]------------------------------------------
#
function ShowRank($user_post,$user_rank)
{
if($user_rank != 0)
{
$data = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."ranks WHERE rank_id='".$user_rank."' AND rank_special='1'"));
$ret = ($data['rank_image'] != "" ? $data['rank_title']."<br><img src='".IMAGES_R.$data['rank_image']."' alt=''>" : $data['rank_title']);
}
else
{
$data2 = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."ranks WHERE rank_post <= '".$user_post."' AND rank_special='0' ORDER BY rank_post DESC LIMIT 1"));
$ret = ($data2['rank_image'] != "" ? $data2['rank_title']."<br><img src='".IMAGES_R.$data2['rank_image']."' alt=''>" : $data2['rank_title']);
}
return $ret;
}
#
#-----[ Atsidaryk ]------------------------------------------
#
profile.php
#
#-----[ Surask ]------------------------------------------
#
<td class='tbl1'>".number_format($data['user_posts'])."</td>
</tr>
#
#-----[ Po juo dëk ]------------------------------------------
#
<tr>
<td width='1%' class='tbl2' style='white-space:nowrap'><b>".$locale['u054']."</b></td>
<td class='tbl2'>".ShowRank($data['user_posts'],$data['user_rank'])."</td>
</tr>
#
#-----[ Atsidaryk ]------------------------------------------
#
administration/forums.php
#
#-----[ Surask ]------------------------------------------
#
if ($forums_defined) echo "<tr>\n<td align='center' colspan='5' class='tbl1'>[ <a href='".FUSION_SELF.$aidlink."&action=refresh'>".$locale['493']."</a> ]</td>\n</tr>\n";
echo "</table>\n";
closetable();
#
#-----[ Po juo dëk ]------------------------------------------
#
tablebreak();
opentable($locale['494']);
echo "<center><a href='forum_ranks.php".$aidlink."'>".$locale['494e']."</a></center>";
closetable();
#
#-----[ Atsidaryk ]------------------------------------------
#
forum/postedit.php
#
#-----[ Surask ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($udata['user_level']))."</span><br><br>\n";
#
#-----[ Pakeisk ðiuo ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($udata['user_level']))."</span><br><br>\n
<span class='alt'>".ShowRank($udata['user_posts'],$udata['user_rank'])."</span><br><br>\n";
#
#-----[ Atsidaryk ]------------------------------------------
#
forum/postnewthread.php
#
#-----[ Surask ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n";
#
#-----[ Pakeisk ðiuo ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n
<span class='alt'>".ShowRank($userdata['user_posts'],$userdata['user_rank'])."</span><br><br>\n";
#
#-----[ Atsidaryk ]------------------------------------------
#
forum/postreply.php
#
#-----[ Surask ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n";
#
#-----[ Pakeisk ðiuo ]------------------------------------------
#
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n
<span class='alt'>".ShowRank($userdata['user_posts'],$userdata['user_rank'])."</span><br><br>\n";
#
#-----[ Atsidaryk ]------------------------------------------
#
forum/viewthread.php
#
#-----[ Surask ]------------------------------------------
#
if ($data['user_avatar'] != "") {
#
#-----[ Virð jo dëk ]------------------------------------------
#
echo "<span class='alt'>".Rangas." ".ShowRank($data['user_posts'],$data['user_rank'])."<br>";
#
#-----[ Atsidaryk ]------------------------------------------
#
locale/Lithuanian/admin/forums.php
#
#-----[ Surask ]------------------------------------------
#
?>
#
#-----[ Prieð já dëk ]------------------------------------------
#
// Forum Ranks
$locale['494'] = "Rangø administracija";
$locale['494e'] = "Redaguoti paprastus ir specialius rangus";
$locale['495'] = "Rangas atnaujintas";
$locale['496'] = "Rangas iðtrintas";
$locale['497'] = "Pridëti naujà rangà";
$locale['498'] = "Rango pavadinimas";
$locale['499'] = "Rango paveikslëlis";
$locale['500'] = "<i>(Nuoroda be /images/ranks)</i>";
$locale['501'] = "Maþiausiai þinuèiø";
$locale['502'] = "Specialus rangas";
$locale['503'] = "Iðsaugoti rangà";
$locale['504'] = "Taip";
$locale['505'] = "Ne";
$locale['506'] = "Narys";
$locale['507'] = "Nëra spacialiø rangø<br>Tu gali parinkti specialø rangà";
$locale['508'] = "Paþymëk narius priskiriamus ðiam rangui";
$locale['509'] = "Iðsaugoti narius";
#
#-----[ Iðsaugok visus failus ir ákelk á savo ftp serverá ]------------------------------------------
#
Redagavo Enzo· 2008 Geg. 15 14:05:37