Gönderen Konu: Üye Profilinde Facebook, Twitter, FriendFeed, Eksenim Alanları Açmak  (Okunma sayısı 1666 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5109
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
Konu başlığında yazıldığı üzere herşey açık ve net. SMF forumunuzda üye profil alanında düzenleme yaparak; üyelerin Facebook, Twitter, FriendFeed ve Mynet Eksenim sayfa bağlantılarını paylaşabilecek bir alan oluşturup, bunu hem profil alanında hemde her mesajın yayındaki profil alanında gösterebilirsiniz.


Örnek Ekran Görüntüleri:










Önemli Açıklama:

Bu yapacağınız değişikliği uygulamadan önce sitenizin tüm dosyalarının (veritabanı dahil) yedeğini alınız. Ayrıca bu yapacağınız değişiklik SMF forumunda mevcut olan ICQ, AIM, YIM, MSN alanlarını etkilemektedir. Bu form alanları pek aktif kullanılmadığı ve sosyal ağ sitelerinin daha çok paylaşıldığını düşünerek, bu belirtilen dört alan yerine sosyal ağ alanları oluşturulacaktır.

Sürüm Bilgisi:

Bu değişiklik SMF 1.1.12 sürümü üzerinde gerçekleştirilmiştir. Diğer sürümlerde de kontrollü bir şekilde yapılandırarak deneyebilirsiniz.

-----

Dosya Adı: Themes\default\languages\Profile.turkish.php
Satır Numarası: 39, 40, 41, 52

Bulunacak Kod:
Kod: [Seç]
$txt[600] = 'ICQ numaranız.';
$txt[601] = 'AOL Instant Messenger kullanıcı adınız.';
$txt[602] = 'Yahoo! Instant Messenger kullanıcı adınız.';
$txt['smf237'] = 'Bu sizin MSN Messenger adresinizdir';

Değiştirilecek Kod:
Kod: [Seç]
$txt[600] = 'FriendFeed adresinizi yazınız.';
$txt[601] = 'Twitter adresinizi yazınız.';
$txt[602] = 'Mynet Eksenim adresinizi yazınız.';
$txt['smf237'] = 'Facebook adresinizi yazınız.';

-----

Dosya Adı: Themes\default\languages\index.turkish.php
Satır Numarası: 258, 270, 273, 472

Bulunacak Kod:
Kod: [Seç]
$txt[513] = 'ICQ';
$txt[603] = 'AIM';
$txt[604] = 'YIM';
$txt['MSN'] = 'MSN';

Değiştirilecek Kod:
Kod: [Seç]
$txt[513] = 'FriendFeed';
$txt[603] = 'Twitter';
$txt[604] = 'Mynet Eksenim';
$txt['MSN'] = 'Facebook';

-----

Dosya Adı: Themes\default\languages\index.turkish.php
Satır Numarası: 258, 270, 273, 472

Bulunacak Kod:
Kod: [Seç]
$txt['mlist_search_messenger'] = 'MSN adresine göre ara';
Değiştirilecek Kod:
Kod: [Seç]
$txt['mlist_search_messenger'] = 'Facebook adresine göre ara';
-----

Dosya Adı: Themes\default\Profile.template.php
Satır Numarası: 1429, 1435

Bulunacak Kod:
Kod: [Seç]
<td><input type="text" name="AIM" maxlength="16" size="24" value="', $context['member']['aim']['name'], '" /></td>
<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>

Değiştirilecek Kod:
Kod: [Seç]
<td><input type="text" name="AIM" size="24" value="', $context['member']['aim']['name'], '" /></td>
<td><input type="text" name="YIM" size="24" value="', $context['member']['yim']['name'], '" /></td>

-----

Dosya Adı: Sources\Profile.php
Satır Numarası: 299, 300

Bulunacak Kod:
Kod: [Seç]
'icq' => array('name' => !isset($user_profile[$memID]['ICQ']) ? '' : $user_profile[$memID]['ICQ']),
'aim' => array('name' => empty($user_profile[$memID]['AIM']) ? '' : str_replace('+', ' ', $user_profile[$memID]['AIM'])),

Değiştirilecek Kod:
Kod: [Seç]
'icq' => array('name' => empty($user_profile[$memID]['ICQ']) ? '' : $user_profile[$memID]['ICQ']),
'aim' => array('name' => empty($user_profile[$memID]['AIM']) ? '' : $user_profile[$memID]['AIM']),

-----

Dosya Adı: Sources\Profile.php
Satır Numarası: 567

Bulunacak Kod:
Kod: [Seç]
'AIM', 'YIM',
Değiştirilecek Kod:
Kod: [Seç]
'AIM', 'YIM',
'ICQ', 'MSN',

-----

Dosya Adı: Sources\Profile.php
Satır Numarası: 576-587 Arası

Bulunacak Kod:
Kod: [Seç]
// Fix the spaces in messenger screennames...
$fix_spaces = array('MSN', 'AIM', 'YIM');
foreach ($fix_spaces as $var)
{
// !!! Why?
if (isset($_POST[$var]))
$_POST[$var] = strtr($_POST[$var], ' ', '+');
}

// Make sure the MSN one is an email address, not something like 'none' :P.
if (isset($_POST['MSN']) && ($_POST['MSN'] == '' || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $_POST['MSN']) != 0))
$profile_strings[] = 'MSN';

Değiştirilecek Kod:
Kod: [Seç]
// Fix the spaces in messenger screennames...
// $fix_spaces = array('MSN', 'AIM', 'YIM');
// foreach ($fix_spaces as $var)
// {
// !!! Why?
// if (isset($_POST[$var]))
$_POST[$var] = strtr($_POST[$var], ' ', '+');
// }

// Make sure the MSN one is an email address, not something like 'none' :P.
// if (isset($_POST['MSN']) && ($_POST['MSN'] == '' || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $_POST['MSN']) != 0))
// $profile_strings[] = 'MSN';

-----


Dosya Adı: Sources\Profile.php
Satır Numarası: 2840-2844 Arası

Bulunacak Kod:
Kod: [Seç]
'icq' => array(
'name' => !isset($_POST['icq']) ? '' : stripslashes($_POST['ICQ'])
),
'aim' => array(
'name' => empty($_POST['aim']) ? '' : str_replace('+', ' ', $_POST['AIM'])

Değiştirilecek Kod:
Kod: [Seç]
'icq' => array(
'name' => empty($_POST['icq']) ? '' : stripslashes($_POST['ICQ'])
),
'aim' => array(
'name' => empty($_POST['aim']) ? '' : stripslashes($_POST['AIM'])

-----

Dosya Adı: Sources\Load.php
Satır Numarası: 1034-1057 Arası

Bulunacak Kod:
Kod: [Seç]
'icq' => $profile['ICQ'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['ICQ'],
'href' => 'http://www.icq.com/whitepages/about_me.php?uin=' . $profile['ICQ'],
'link' => '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $profile['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&amp;icq=' . $profile['ICQ'] . '" alt="' . $profile['ICQ'] . '" width="18" height="18" border="0" /></a>',
'link_text' => '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $profile['ICQ'] . '" target="_blank">' . $profile['ICQ'] . '</a>',
) : array('name' => '', 'add' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'aim' => $profile['AIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['AIM'],
'href' => 'aim:goim?screenname=' . urlencode(strtr($profile['AIM'], array(' ' => '%20'))) . '&amp;message=' . $txt['aim_default_message'],
'link' => '<a href="aim:goim?screenname=' . urlencode(strtr($profile['AIM'], array(' ' => '%20'))) . '&amp;message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $profile['AIM'] . '" border="0" /></a>',
'link_text' => '<a href="aim:goim?screenname=' . urlencode(strtr($profile['AIM'], array(' ' => '%20'))) . '&amp;message=' . $txt['aim_default_message'] . '">' . $profile['AIM'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'yim' => $profile['YIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['YIM'],
'href' => 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($profile['YIM']),
'link' => '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($profile['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($profile['YIM']) . '&amp;m=g&amp;t=0" alt="' . $profile['YIM'] . '" border="0" /></a>',
'link_text' => '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($profile['YIM']) . '">' . $profile['YIM'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'msn' => $profile['MSN'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['MSN'],
'href' => 'http://members.msn.com/' . $profile['MSN'],
'link' => '<a href="http://members.msn.com/' . $profile['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $profile['MSN'] . '" border="0" /></a>',
'link_text' => '<a href="http://members.msn.com/' . $profile['MSN'] . '" target="_blank">' . $profile['MSN'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),

Değiştirilecek Kod:
Kod: [Seç]
'icq' => $profile['ICQ'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['ICQ'],
'href' => &$profile['ICQ'],
'link' => '<a href="' . $profile['ICQ'] . '" target="_blank"><img src="' . $settings['images_url'] . '/friendfeed.png" alt="FriendFeed: ' . $profile['ICQ'] . '" width="18" height="18" border="0" /></a>',
'link_text' => '<a href="' . $profile['ICQ'] . '" target="_blank">' . $profile['ICQ'] . '</a>',
) : array('name' => '', 'add' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'aim' => $profile['AIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['AIM'],
'href' => &$profile['AIM'],
'link' => '<a href="' . $profile['AIM'] . '" target="_blank"><img src="' . $settings['images_url'] . '/twitter.png" alt="Twitter: ' . $profile['AIM'] . '" border="0" /></a>',
'link_text' => '<a href="' . $profile['AIM'] . '" target="_blank">' . $profile['AIM'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'yim' => $profile['YIM'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['YIM'],
'href' => &$profile['YIM'],
'link' => '<a href="' . $profile['YIM'] . '" target="_blank"><img src="' . $settings['images_url'] . '/eksenim.png" alt="Eksenim: ' . $profile['YIM'] . '" border="0" /></a>',
'link_text' => '<a href="' . $profile['YIM'] . '" target="_blank">' . $profile['YIM'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'msn' => $profile['MSN'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['MSN'],
'href' => &$profile['MSN'],
'link' => '<a href="' . $profile['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/facebook.png" alt="Facebook: ' . $profile['MSN'] . '" border="0" /></a>',
'link_text' => '<a href="' . $profile['MSN'] . '" target="_blank">' . $profile['MSN'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),

-----

Dosya Adı: Themes\default\images

Yüklenecek Resimler: facebook.png, twitter.png, friendfeed.png, eksenim.png (Bu dosyaları EK'ten indirebilirsiniz.)

-----

PHPMyAdmin MySQL yöneticisinden _members tablosunun yapısını açarak ICQ, AIM, YIM, MSN sütunlarının yapılarını TINYTEXT olarak belirlenmelidir.
Konuyu Paylaş:
  delicious  facebook  twitter  google
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
1 Yanıt
1384 Gösterim
Son İleti Kasım 19, 2008, 21:32:42 ÖS
Gönderen: webtime
0 Yanıt
740 Gösterim
Son İleti Ağustos 11, 2009, 17:53:25 ÖS
Gönderen: WhisperSuLtaN
6 Yanıt
824 Gösterim
Son İleti Mart 08, 2010, 19:35:59 ÖS
Gönderen: AdmiN
2 Yanıt
860 Gösterim
Son İleti Ağustos 06, 2010, 16:42:41 ÖS
Gönderen: burajan
0 Yanıt
1216 Gösterim
Son İleti Nisan 14, 2011, 22:45:00 ÖS
Gönderen: AdmiN