Sonunda sonuca ulaştığım bi kaç eklentiyi sizinle paylaşmak istedim :D
Ultimate profilde kullanıcıların eklediği son resimleri frontblokta gösterme
frontblok ta phpbox yarat kodu ekle
global $db_prefix, $modSettings, $scripturl;
$sql = db_query ('SELECT p.ID_PICTURE, p.ID_MEMBER, p.title, p.time, p.filename, m.realName
FROM ' . $db_prefix . 'profile_pictures AS p, ' . $db_prefix . 'members AS m
WHERE p.ID_MEMBER = m.ID_MEMBER
ORDER BY p.time DESC
LIMIT 5', __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc ($sql)) {
$data[] = array (
'thumb' => $modSettings['profile_pictures_url'] . '/' . $row['ID_MEMBER'] . '_' . $row['time'] . '_thumb.' . substr (strrchr ($row['filename'], '.'), 1),
'url' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . ';sa=pictures;view=' . $row['ID_PICTURE'],
'time' => timeformat ($row['time']),
'user' => $row['realName'],
'profile' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
);
}
echo '
<DIV ALIGN="CENTER">
<table width="50% height="200%">
<tr>';
foreach ($data as $picture)
{
echo '
<td height="90%"><center>
<a href="', $picture['url'] ,'"><img src="' . $picture['thumb'] . '" alt="" /></a>' . $picture['title'], '
</center></td>';
}
echo '
</tr>
</table></div>';
sol veya sağ blokta gösterme
phpbox yarat kodu ekle
global $db_prefix, $modSettings, $scripturl;
$sql = db_query ('SELECT p.ID_PICTURE, p.ID_MEMBER, p.title, p.time, p.filename, m.realName
FROM ' . $db_prefix . 'profile_pictures AS p, ' . $db_prefix . 'members AS m
WHERE p.ID_MEMBER = m.ID_MEMBER
ORDER BY p.time DESC
LIMIT 5', __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc ($sql)) {
$data[] = array (
'title' => $row['title'],
'thumb' => $modSettings['profile_pictures_url'] . '/' . $row['ID_MEMBER'] . '_' . $row['time'] . '_thumb.' . substr (strrchr ($row['filename'], '.'), 1),
'url' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . ';sa=pictures;view=' . $row['ID_PICTURE'],
'time' => timeformat ($row['time']),
'user' => $row['realName'],
'profile' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
);
}
echo '
';
foreach ($data as $picture)
{
echo '
<center>
<a href="', $picture['url'] ,'"><img src="' . $picture['thumb'] . '" alt="" /></a><br />' . $picture['title'], '
</center><br />';
}
echo '
';
Frontblok ta rastgele resim
phpbox yarat kodu ekle
global $db_prefix, $modSettings, $scripturl;
$sql = db_query ('SELECT p.ID_PICTURE, p.ID_MEMBER, p.title, p.time, p.filename, m.realName
FROM ' . $db_prefix . 'profile_pictures AS p, ' . $db_prefix . 'members AS m
WHERE p.ID_MEMBER = m.ID_MEMBER
ORDER BY RAND()
LIMIT 3', __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc ($sql)) {
$data[] = array (
'title' => $row['title'],
'thumb' => $modSettings['profile_pictures_url'] . '/' . $row['ID_MEMBER'] . '_' . $row['time'] . '_thumb.' . substr (strrchr ($row['filename'], '.'), 1),
'url' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . ';sa=pictures;view=' . $row['ID_PICTURE'],
'time' => timeformat ($row['time']),
'user' => $row['realName'],
'profile' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
);
}
echo '
<table cellspacing="0" cellpadding="10" border="0" ALIGN="center" width="100%">
<tr>';
foreach ($data as $picture)
{
echo '
<td><center>
<a href="', $picture['url'] ,'"><img src="' . $picture['thumb'] . '" alt="" /></a>
</center></td>';
}
echo '
</tr>
</table>';global $db_prefix, $modSettings, $scripturl;
$sql = db_query ('SELECT p.ID_PICTURE, p.ID_MEMBER, p.title, p.time, p.filename, m.realName
FROM ' . $db_prefix . 'profile_pictures AS p, ' . $db_prefix . 'members AS m
WHERE p.ID_MEMBER = m.ID_MEMBER
ORDER BY RAND()
LIMIT 1', __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc ($sql)) {
$data[] = array (
'title' => $row['title'],
'thumb' => $modSettings['profile_pictures_url'] . '/' . $row['ID_MEMBER'] . '_' . $row['time'] . '_thumb.' . substr (strrchr ($row['filename'], '.'), 1),
'url' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . ';sa=pictures;view=' . $row['ID_PICTURE'],
'time' => timeformat ($row['time']),
'user' => $row['realName'],
'profile' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
);
}
echo '
<table cellspacing="0" cellpadding="1" border="0" ALIGN="center" width="50%">
<tr>';
foreach ($data as $picture)
{
echo '
<td><center>
<a href="', $picture['url'] ,'"><img src="' . $picture['thumb'] . '" alt="" /></a>
</center></td>';
}
echo '
</tr>
</table>';
ulitmate profil menüsünü ana bloklara ekleme (sadece link)
phpbox yarat kodu ekle
global $scripturl, $context;
echo '
<a href="', $scripturl ,'?action=profile">My Profile</a><br />
<a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=customized">Hesabım</a><br />
<a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures;add">Resim Ekle</a><br />
<br />
<a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures">Resimlerim</a><br />
<a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=buddies">Arkadaşlarım</a><br />
';
eğer menü linklerinde icon olmasını istiyorsanız
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.petdost.com%2Fimages%2Fprofil.jpg&hash=ed80025b49c8dc80d8f8c8162b278925dbca44a0)
ekteki zip dosyasını açın ftp ile ana dizine ultprof klsörünü atın
pxpbok yaratın kodu ekleyin
global $scripturl, $context;
echo '
<img src="/ultprof/profile.png"/> <a href="', $scripturl ,'?action=profile">My Profile</a><br />
<img src="/ultprof/custom.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=customized">Hesabım</a><br />
<img src="/ultprof/photos.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures;add">Resim Ekle</a><br />
<img src="/ultprof/addphoto.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=pictures">Resimlerim</a><br />
<img src="/ultprof/buddy.png"/> <a href="', $scripturl ,'?action=profile;u=', $context['user']['id'] ,';sa=buddies">Arkadaşlarım</a><br />
';
Profil Hesabına direk resim ekleme bloğu
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.petdost.com%2Fimages%2Fupload.jpg&hash=a48b85961f8d03b1739ad6a5208e8f9487e567f5)
pxpbok yarat kodu ekle
echo '
<form action="http://www.seninsiten.com/index.php?action=profile;sa=pictures;add2" method="post" accept-charset="', $context['character_set'], '" name="picture" id="picture" enctype="multipart/form-data">
Title:<br />
<input type="text" name="title" size="10" value="', @$context['picture_title'] ,'" /><br />';
echo '
Description:<br />
<input type="text" name="description" size="15">', @$context['picture_description'] ,'</textarea><br />';
echo '
Parent Album:<br />
<select name="album_id" id="album_id">
<option value="0">Basic album</option>';
foreach ($context['album_tree'] as $album)
{
echo '
<option value="', $album['id'] ,'"', (@$context['album_parent'] == $album['id']) ? ' selected="selected"' : '', '> ' . str_repeat('=', $album['level']) . '=> ' . $album['title'] . '</option>';
}
echo '
</select><br />';
echo '
Find Photos:<br />
<input type="file" size="10" name="picture" /><br />';
echo '
<input type="submit" value="', $txt[10], '" />
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
Not: http://www.seninsiten.com yazan kısmı kendi sitenize göre değiştirin
resim limitlerni kodlardaki LIMIT 1' kısmından değiştirebilirsiniz
konu yanlış yerde açtıysam mod arkadaşlar taşıyabilir
konu sabitlenirse çoğu kişinin işine yarar
sağolasın
bende ÅŸimdi senin sitende onu inceliyordum :D
--
konudışı
bizdede bir rott var herhalde senin siteye sık takılıcam
;D yinede teşekkürler
sabitleme şansımız varsa sabitleyelim yada taşıyalım iyi olur
henüz sabitlemeye gerek yok. ultimate profile çok kullanılmaya başladı ama o kadar özel ilgiye gerek yok. zaten ilgilenen kişi fazla olursa konu cevaplar yüzünden yukarlarda kalır
tavsiye:son iki blok ziyaretçilerden gizlenirse daha hoş olur. onların görmesine gerek yok nasılsa kullanamazlar.
tamamdır saol ;)
bbturk sendede rot varsa tamamdır bu iş :D
ayrıca hangi bloğu kaldırayim onu anlamadım
EDIT : diğer tarafta pm ni okudum blokları gizledim saol ;)