Sitede Kullanıcılara Oyvermek
İçin Ne Yapmak Gerekir ?
??? Acaba Soylermısınız
#
#Karma Mod- by countach44
#root@countach44.mine.nu
#
#Sorry for this being poorly written, but hey, at least it's written
#Sql queries: 2
#
#
ALTER TABLE `phpbb_users` ADD `karma` MEDIUMINT DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_users` ADD `karma_time` BIGINT DEFAULT '0' NOT NULL ;
#where 'phpbb_' is your $table_prefix
#New files:1
# $PHPBBROOT/karma.php
#
#Files to edit:4
# includes/usercp_viewprofile.php
# $PHPBBROOT/viewtopic.php
# templates/"template"/profile_view_body.tpl
# templates/"template"/viewtopic_body.tpl
# open includes/usercp_viewprofile.php
#before:
#
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
#
#add:
//Fetch karma
$sql = "select karma from " . USERS_TABLE . " where username='$profiledata[username]'";
$result = $db->sql_query($sql);
$array = mysql_fetch_array($result);
$karma = $array[0];
#after:
#
#'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
#
#add:
'KARMA' => $karma,
#Save: usercp_viewprofile.php
#Open: $PHPBBROOT/viewtopic.php
#before:
#//
#// Again this will be handled by the templating
#// code at some point
#//
#
#Add:
//Fetch karma
$sql = "select karma from " . USERS_TABLE . " where username='$poster'";
$result = $db->sql_query($sql);
$array = mysql_fetch_array($result);
$karma = $array[0];
#
#After:
'POSTER_JOINED' => $poster_joined,
#Add:
'POSTER_KARMA' => $karma,
#Save: viewtopic.php
#Open: templates/x/profile_view_body.tpl
#where x == each template
#before (Or anywhere around here...)
#
# <tr>
# <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_EMAIL_ADDRESS}:</span></td>
# <td class="row1" valign="middle" width="100%"><b><span class="gen">{EMAIL_IMG}</span></b></td>
# </tr>
#
#
#Add:
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">Karma:</span></td>
<td class="row1" valign="middle" width="100%"><span class="gen">{KARMA}</span></td>
</tr>
#Save: templates/x/profile_view_body.tpl
#Open: templates/x/viewtopic_body.tpl
#
#In same line after {postrow.POSTER_POSTS}<br />
#
#Add:
<font size=1>Karma: {postrow.POSTER_KARMA}<br /><a href="karma.php?x=applaud&u={postrow.POSTER_ID}&t={TOPIC_ID}">applaud</a> / <a href="karma.php?x=smite&u={postrow.POSTER_ID}&t={TOPIC_ID}">smite</a></font><br />
#Save: templates/x/viewtopic_body.tpl
#If voting doesn't work do this:
#Open $PHPBBROOT/viewtopic.php
#After
'POSTER_NAME' => $poster,
#Add
'POSTER_ID' => $poster_id,
#Save $PHPBBROOT/viewtopic.php
#If it doesn't work email me, root@gotslack.mine.nu
//Fetch karma
$sql = "select karma from " . USERS_TABLE . " where username='$poster'";
$result = $db->sql_query($sql);
$array = mysql_fetch_array($result);
$karma = $array[0];
djwolkan yazdı:arkadaşlar bu aaba beleş phpbb forumlarındada oluyomu bu kodu yerleştirince acaba
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir