[Mod] SSI Karma ve Son Üye Verileri + SSI Member Color Link - 11.08.2007

Started by Kapadokyalı, August 10, 2007, 07:50:32 PM

Previous topic - Next topic

Kapadokyalı



Quote

Mod:
SSI Karma ( +/- Karma Listesi)

Yazan:
ディン1031

Açıklama:
SSI - Karma (+/-) Karma Listesi

URL:
http://custom.simplemachines.org/mods/index.php?mod=885

Uyumluluk:
1.1.3

Download:
Çevirme işlemi olmadığı için modun orjinalini indirin.






Quote

Mod:
SSI Latest Members (Son Üyeler)

Yazan:
ディン1031

Açıklama:
SSI - Son Üyeler

URL:
http://custom.simplemachines.org/mods/index.php?mod=886

Uyumluluk:
1.1.3

Download:
Çevirme işlemi olmadığı için modun orjinalini indirin.




Her 2 mod'la SSI üzerinde çeşitli geliştirmeler yapılmış.

1. SSI - Karma ile En Yüksek Karma ve En Düşük Karma listesini veri olarak alabiliyoruz.
2. SSI - Latest Members ile Son Üyeler listesini veri olarak alabiliyoruz.

Kontrol etmek için : http://forumadresiniz/ssi_examples.php 'ye bakabilir ve bu fonksiyonları kullanmak için SSI Rehberi 'ni okuyabilirsiniz.


Ayrıca;
SSI verilerindeki üyeleri (gruplarına göre) renklendirmek istiyorsanız (forumunuzda üye renklendirmesi kullanıyorsanız)  SSI Member Color Link  'i de kurmanız gerekmektedir.


Saygılar...[/td][/tr][/table][/td][/tr][/table]

systemforumnet


Kapadokyalı

Quote from: systemforumnet on September 20, 2007, 10:00:13 PM
SSI Karma ( +/- Karma Listesi) Türkçesi warmı?

Hiç kalmadı, olsa dükkan senin...! :)
Şaka bir yana, "Çevirme işlemi olmadığı için modun orjinalini indirin. " demek, Türkçe çeviri gerektiren bir durumun olmadığı manasını taşımaktadır.

Saygılar...

systemforumnet


cedrik48

ya abi bana SSI member color link lazım ama bana verdiğin bu linke ben giremiyorum bana sadece yetkililer girebilir diyo acaba mümkünse buarda paylaşabilirmisin

Yağız...


cedrik48

abi bana hata verdi test başarızsız diye mümkünse bunun manueli varmı

Yağız...

../SSI.php
Code (Ara) Select
$posts = array();
Code (Sonrasına Ekle) Select
$posts = array();
$colorids = array();

Code (Ara) Select
// Censor it!
censorText($row['subject']);
censorText($row['body']);

Code (Sonrasına Ekle) Select
// Censor it!
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

Code (Ara) Select
'new_from' => $row['new_from'],
);
}
mysql_free_result($request);

Code (Sonrasına Ekle) Select
'new_from' => $row['new_from'],
);
}
mysql_free_result($request);

//Add Colors to the Output link :)
if(!empty($colorids)) {
global $color_profile;
ssi_loadColors($colorids);
foreach($posts as $k => $p) {
$profile = $color_profile[$p['poster']['id']];
if(!empty($profile)) {
$posts[$k]['poster']['link'] = $profile['link'];
}
}
}

Code (Ara) Select
$posts = array();
Code (Sonrasına Ekle) Select
$posts = array();
$colorids = array();

Code (Ara) Select
// Censor it!
censorText($row['subject']);
censorText($row['body']);

Code (Sonrasına Ekle) Select
// Censor it!
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

Code (Ara) Select
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

Code (Sonrasına Ekle) Select
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

//Add Colors to the Output link :)
if(!empty($colorids)) {
global $color_profile;
ssi_loadColors($colorids);
foreach($posts as $k => $p) {
$profile = $color_profile[$p['poster']['id']];
if(!empty($profile)) {
$posts[$k]['poster']['link'] = $profile['link'];
}
}
}

Code (Ara) Select
while ($row = mysql_fetch_assoc($request))
$return[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'posts' => $row['posts']
);
mysql_free_result($request);

Code (Değiştir) Select
$colorids = array();
while ($row = mysql_fetch_assoc($request)) {

//Collect the ids
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

$return[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'posts' => $row['posts']
);
}
mysql_free_result($request);

//Add Colors to the link :)
if(!empty($colorids)) {
global $color_profile;
ssi_loadColors($colorids);
foreach($return as $k => $p) {
$profile = $color_profile[$p['id']];
if(!empty($profile)) {
$return[$k]['link'] = $profile['link'];
}
}
}

Code (Ara) Select
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['body']) > $length)

Code (Öncesine Ekle) Select
$colorids = array();
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['body']) > $length)

Code (Ara) Select
censorText($row['subject']);
censorText($row['body']);

Code (Sonrasına Ekle) Select
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

Code (Ara) Select
$return[count($return) - 1]['is_last'] = true;
Code (Sonrasına Ekle) Select
$return[count($return) - 1]['is_last'] = true;

//Add Colors to the Output link :)
if(!empty($colorids)) {
global $color_profile;
ssi_loadColors($colorids);
foreach($return as $k => $p) {
$profile = $color_profile[$p['poster']['id']];
if(!empty($profile)) {
$return[$k]['poster']['link'] = $profile['link'];
}
}
}

Code (Ara) Select
?>
Code (Öncesine Ekle) Select
//This is a small Skript to load colors for ssi
function ssi_loadColors($users = array()) {
global $modSettings;
global $color_profile, $db_prefix, $scripturl;

// Can't just look for no users :P.
if (empty($users))
return false;

// MemberColorLink compatible, chache more data, handle also some special member color link colors
if(!empty($modSettings['MemberColorLinkInstalled'])) {
$loaded_ids = load_onlineColors($users, false);
foreach($loaded_ids as $id) {
if(!isset($color_profile[$id]['link'])) {
$profile = $color_profile[$id];
$onlineColor = !empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color'];
$color_profile[$id]['link'] = (empty($modSettings['MemberColorLinkOldSpanStyle']) ?
'<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '"'.(!empty($onlineColor) ? ' style="color:'.$onlineColor.';"' : '').'>' . $profile['realName'] .'</a>' :
'<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '">'.(!empty($onlineColor) ? '<span style="color:'. $onlineColor .';">' : '') . $profile['realName'] . (!empty($onlineColor) ? '</span>' : '' ).'</a>');
}
}
return empty($loaded_ids) ? false : $loaded_ids;
}

// Make sure it's an array.
$users = !is_array($users) ? array($users) : array_unique($users);

$loaded_ids = array();
//First check is it already loaded?
if(empty($color_profile))
$color_profile = array();
else {
foreach($users as $k => $u)
if(isset($color_profile[$u])) {
$loaded_ids[] = $u;
unset($users[$k]);
}
}

if (empty($users))
return empty($loaded_ids) ? false : $loaded_ids;

// Load the data.
$request = db_query("
SELECT
mem.ID_MEMBER, mem.memberName, mem.realName, mem.ID_GROUP,
mg.onlineColor AS member_group_color, pg.onlineColor AS post_group_color
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
WHERE mem.ID_MEMBER ".(count($users) == 1 ? " = '" . current($users) . "'" : " IN ('" . implode("', '", $users) . "')"), __FILE__, __LINE__);

$loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{
$loaded_ids[] = $row['ID_MEMBER'];
$color_profile[$row['ID_MEMBER']] = $row;
$color_profile[$row['ID_MEMBER']]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . (!empty($row['member_group_color']) || !empty($row['post_group_color']) ? '<span style="color:'. (!empty($row['member_group_color']) ? $row['member_group_color'] : $row['post_group_color'] ) .';">' : '' ) . $row['realName'] . (!empty($row['member_group_color']) || !empty($row['post_group_color']) ? '</span>' : '' ).'</a>';
}
mysql_free_result($request);

return empty($loaded_ids) ? false : $loaded_ids;
}
?>

Advertisement: