
Kullanıcı ismine link vermek?
Kullanıcı ismine link vermek?
Bunu html ile yapmaya çalıştım ama olmadı:D phpdende fazla anlamıyorum.İstediğim şu viewtopic de kullanıcı isimlerinin üzerlerine gidildiği zaman ismin link şeklini almasını istiyorum yani tıklandığında kullanıcının profiline gidecek basit ama yapamadım 

Direct User Profile Link
On viewtopic, this hack makes each username a link to that users profile.
http://www.phpbbhacks.com/download/183
profiline gidecek derken profil görüntüleme sayfasına gidecekse kolay iş ama zaten mesajın altında profil butonu var.
profil düzenleme sayfasına gidilmek isteniyorsa iş biraz zorlaşıyor. çünkü admin kontrolu yapmak lazım. Yani sayfayı açan admin ise link olacak değilse olmayacak. yoksa her önüne gelen profil düzenler
profil düzenleme sayfasına gidilmek isteniyorsa iş biraz zorlaşıyor. çünkü admin kontrolu yapmak lazım. Yani sayfayı açan admin ise link olacak değilse olmayacak. yoksa her önüne gelen profil düzenler

Yukarıdaki mod profili görüntülemek değil editlemek için. Profil görüntülemek kolay. yarın akşam evime gittiğimde yazarım.
hala anlayamadığım bir şey var. örneğin bu mesajımda sol taraftaki nickime tıklayarak profilimi görüntülemek istiyorsunuz. Peki neden mesajın hemen altındaki profil butonuna tıklamıyorsunuz?
hala anlayamadığım bir şey var. örneğin bu mesajımda sol taraftaki nickime tıklayarak profilimi görüntülemek istiyorsunuz. Peki neden mesajın hemen altındaki profil butonuna tıklamıyorsunuz?
Kod: Tümünü seç
Viewtopic'de üye ismine, profilini görüntüleyecek link vermek
-------------------------------------------------------------
Değiştirilen dosyaları yedeklemeyi unutmayın.
#
#-----[ AÇ ]------------------------------------------------
#
viewtopic.php
#
#-----[ BUL ]------------------------------------------------
#
if ( $poster_id != ANONYMOUS )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
#
#-----[ SONRASINA EKLE ]------------------------------------------------
#
$isim_url = $temp_url;
#
#-----[ BUL ]------------------------------------------------
#
$profile_img = '';
#
#-----[ SONRASINA EKLE ]------------------------------------------------
#
$isim_url = '';
#
#-----[ BUL ]------------------------------------------------
#
'PROFILE_IMG' => $profile_img,
#
#-----[ SONRASINA EKLE ]------------------------------------------------
#
'ISIM_URL' => $isim_url,
#
#-----[ AÇ ]------------------------------------------------
#
templates/tema isminiz/viewtopic_body.tpl
#
#-----[ BUL ]------------------------------------------------
#
<b>{postrow.POSTER_NAME}</b>
#
#-----[ BUNUNLA DEĞİŞTİR ]------------------------------------------------
#
<b><a href={postrow.ISIM_URL} class="nav">{postrow.POSTER_NAME}</a></b>
#
#-----[ TÜM DOSYALARI KAYDET VE ÇIK ]------------------------------------------------
#
Yukarıda linki verilen modda küçük 1-2 değişiklik yaparak phpBB 2.0.22 sürümüne uyarladım.
Admin olarak girilirse profil düzenleme, kullanıcı olarak girilirse profil görüntüleme yaptığı için üstteki basit moddan çok daha iyi. Kendi siteme de ekledim, çalışıyor.
Admin olarak girilirse profil düzenleme, kullanıcı olarak girilirse profil görüntüleme yaptığı için üstteki basit moddan çok daha iyi. Kendi siteme de ekledim, çalışıyor.
Kod: Tümünü seç
##############################################################
## MOD Title: Direct user link
## MOD Author: Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Description: Makes the users name as a link when viewing
## topic's - that whay more intuitive to get users
## profile. If the viewing user have admin rigths
## then the link is to the administration profile
## MOD Version: 1.0.7
## MOD Compatibility: 2.0.22
##
## Installation Level: Easy
## Installation Time: 2 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit: 2
## viewtopic.php
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: 0
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## 1. EasyMOD
## -----------
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## 2. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.db9.dk/viewtopic.php?t=28
##
##############################################################
## MOD History:
##
## 2007-04-21 - Version 1.0.7
## - phpBB 2.0.22 compatible by metinyaw
##
## 2003-12-10 - Version 1.0.6
## - phpBB template & EasyMOD compliance enhancement
##
## 2003-10-10 - Version 1.0.5
## - change into viewtopic.php
##
## 2003-08-24 - Version 1.0.4
## - history started
## - rewrite how-to to be EM ready
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.username,
FROM " . POSTS_TABLE . "
WHERE p.topic_id
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u.user_level
#
#-----[ FIND ]------------------------------------------------
#
$template->assign_block_vars('postrow', array(
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Direct user link MOD
switch ($postrow[$i]['user_level'])
{
case ADMIN :
$poster = "<b>$poster</b>";
$poster_style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$poster = "<b>$poster</b>";
$poster_style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default : $poster_style_color = '';
}
// End add - Direct user link MOD
#
#-----[ FIND ]------------------------------------------------
#
'U_MINI_POST' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Direct user link MOD
'U_VIEW_POSTER_PROFILE' => ($userdata['user_level'] != ADMIN)? append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $poster_id) : append_sid("admin/admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $poster_id . "&sid=" . $userdata['session_id'] ) ,
'POSTER_STYLE' => $poster_style_color,
// End add - Direct user link MOD
#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme your board uses
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<b>{postrow.POSTER_NAME}</b>
#
#-----[ BUNUNLA DEĞİŞTİR ]----------------------------------------
#
<a href="{postrow.U_VIEW_POSTER_PROFILE}" class="name" {postrow.POSTER_STYLE}><b>{postrow.POSTER_NAME}</b></a>
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
Kimler çevrimiçi
Bu forumu görüntüleyen kullanıcılar: Google [Bot] ve 2 misafir