Profile eklenen eklentiyi avatar altına almak ?

Eklentiler ile ilgili soru, sorun ve tartışmalar.

Profile eklenen eklentiyi avatar altına almak ?

İleti G60 14.01.2006, 01:35

Selam beyler;
adfield modunu kurdum sadece yaş bilgisi almak için mod çalışıyor ancak ben burdaki yaş bilgisini avatar altına almayı istiyorum..


viewtopic.tpl de ve viewtopic.php de online offline moda göre biraz değişiklik yaptım ancak beceremedim...alamadım profilde yazan bölümü avatarın altına...

Buda kurmuş oldugum mod...
Kod: Tümünü seç
#########################################################################################
##
## Hack Title:   Add new field to profile
## Hack Version: 1.2.2 (ex phpbb 2.0.4)
## Author        Acid
##
## Description:  Just a simple way to add a new field to profile. "info" can be
##       changed to "whatever" of course but be aware of the spelling (e.g.
##       "INFO", "info", "user_info").
##       If you want to add more than one field duplicate the following
##       steps and change "info" to "whatever" (be aware of the spelling).   
##       The field "info" is just an example.
##
## Files to edit:   8
##         admin/admin_users.php
##                   language/lang_english/lang_main.php
##                 includes/usercp_viewprofile.php
##                   includes/usercp_register.php
##                 includes/usercp_avatar.php
##                 templates/xxx/admin/user_edit_body.tpl
##                    templates/xxx/profile_add_body.tpl
##                 templates/xxx/profile_view_body.tpl
##
#########################################################################################
##
## Installation/Author Notes:
## First always backup the files/database that you're going to edit.
##
## This hacks adds a new column to the 'user' table.
##
#########################################################################################
##
## Versions:
##
## 1.2.2       - optional part changed
## 1.2.1       - typo in "dropdown guide" fixed
## 1.2.0       - guide re_written
## 1.0.1/1.0.8 - ...
## 1.0         - Release
##
#########################################################################################
#
#-----[ SQL ]-------------------------------------------

# You have to execute the following query via phpmyadmin (change prefix)..

ALTER TABLE phpbb_users ADD user_info VARCHAR(255) AFTER user_interests;

# If you´re going to add/change several fields duplicate the above query and
# change the field name "user_info".
#
#########################################################################################
#
#-----[ OPEN ]------------------------------------------

# language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------------------------
#
$lang['Interests'] = 'Interests';

#
#-----[ BELOW ADD ]---------------------------------------------------
#
$lang['Info'] = 'Info';



#
#-----[ OPEN ]------------------------------------------

# includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------------------------------------
#
   'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',

#
#-----[ BELOW ADD ]---------------------------------------------------
#
   'INFO' => ( $profiledata['user_info'] ) ? $profiledata['user_info'] : ' ',
   'L_INFO' => $lang['Info'],



#
#-----[ OPEN ]------------------------------------------

# includes/usercp_register.php
#
#-----[ FIND ]---------------------------------------------------
#
   $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
'interests'

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, 'info' => 'info'

#
#-----[ FIND (2x) ]---------------------------------------------------
#
      $interests = stripslashes($interests);

#
#-----[ always BELOW ADD ]---------------------------------------------------
#
      $info = stripslashes($info);

#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
$interests) . "'

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, user_info = '" . str_replace("\'", "''", $info) . "'

#
#-----[ FIND ]---------------------------------------------------
#
         $sql = "INSERT INTO " . USERS_TABLE . "

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
user_interests

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, user_info

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
$interests) . "'

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, '" . str_replace("\'", "''", $info) . "'

#
#-----[ FIND ]---------------------------------------------------
#
   $interests = $userdata['user_interests'];

#
#-----[ BELOW ADD ]---------------------------------------------------
#
   $info = $userdata['user_info'];

#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
display_avatar_gallery($mode, $avatar_category

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
$interests

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, $info

#
#-----[ FIND (just a quote) ]--------------------------
#
   $template->assign_vars(array(
      .
      .
      .
      .
      'INTERESTS' => $interests,

#
#-----[ BELOW ADD ]---------------------------------------------------
#
      'INFO' => $info,
      'L_INFO' => $lang['Info'],



#
#-----[ OPEN ]------------------------------------------

# includes/usercp_avatar.php
#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
function display_avatar_gallery($mode, &$category

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
&$interests

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, &$info

#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
$params = array('coppa', 'user_id'

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
'interests'

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, 'info'



#
#-----[ OPEN ]------------------------------------------

# admin/admin_users.php
#
#-----[ FIND ]---------------------------------------------------
#
      $interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';

#
#-----[ BELOW ADD ]---------------------------------------------------
#
      $info = ( !empty($HTTP_POST_VARS['info']) ) ? trim(strip_tags( $HTTP_POST_VARS['info'] ) ) : '';

#
#-----[ FIND (2x) ]--------------------------------------------
#
         $interests = htmlspecialchars(stripslashes($interests));

#
#-----[ always BELOW ADD ]---------------------------------------------------
#
         $info = htmlspecialchars(stripslashes($info));

#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "

#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
$interests) . "'

#
#-----[ IN-LINE ADD ]---------------------------------------------------
#
, user_info = '" . str_replace("\'", "''", $info) . "'

#
#-----[ FIND ]---------------------------------------------------
#
      $interests = htmlspecialchars($this_userdata['user_interests']);

#
#-----[ BELOW ADD ]---------------------------------------------------
#
      $info = htmlspecialchars($this_userdata['user_info']);

#
#-----[ FIND ]---------------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", "&quot;", $interests) . '" />';

#
#-----[ BELOW ADD ]---------------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="info" value="' . str_replace("\"", "&quot;", $info) . '" />';

#
#-----[ FIND ]---------------------------------------------------
#
         'INTERESTS' => $interests,

#
#-----[ BELOW ADD ]---------------------------------------------------
#
         'INFO' => $info,
         'L_INFO' => $lang['Info'],



#
#-----[ OPEN ]------------------------------------------

# templates/xxx/profile_add_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
     </td>
   </tr>

#
#-----[ BELOW ADD ]---------------------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_INFO}:</span></td>
     <td class="row2"> <input type="text" class="post"style="width: 200px"  name="info" size="35" maxlength="150" value="{INFO}" /> </td>
   </tr>



#
#-----[ OPEN ]------------------------------------------

# templates/xxx/profile_view_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
      <tr>
        <td valign="top" align="right"><span class="gen">{L_INTERESTS}:</span></td>
        <td> <b><span class="gen">{INTERESTS}</span></b></td>
      </tr>

#
#-----[ BELOW ADD ]---------------------------------------------------
#
      <tr>
        <td valign="top" align="right"><span class="gen">{L_INFO}:</span></td>
        <td> <b><span class="gen">{INFO}</span></b></td>
      </tr>



#
#-----[ OPEN ]------------------------------------------

# templates/xxx/admin/user_edit_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_INTERESTS}</span></td>
     <td class="row2">
      <input type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
     </td>
   </tr>

#
#-----[ BELOW ADD ]---------------------------------------------------
#
        <tr>
          <td class="row1"><span class="gen">{L_INFO}</span></td>
          <td class="row2"> <input class="post" type="text" name="info" size="35" maxlength="50" value="{INFO}" /> /td>
         </tr>

#########################################################################################
#########################################################################################
#########################################################################################



Fikir vermesi açısından online offline moduda koyuyorum...

Kod: Tümünü seç
########################################################
## Mod Title:   Show Online In View Topic
## Mod Version: 2.0.0
## Author:      AJ Quick, (http://www.ajquick.com/)
##
## Description: 
## This mod will show the status of a user in viewtopic
## next to their post. Stating if they are online or not.
##
## This mod is for phpBB2 ver 2.0.X
##
## Portions of this script were inspired/written by
## other people. I can only claim partial credit.
##
## Installation Level:  Easy
## Installation Time:   1-2 Minutes
## Files To Edit:      2
##   viewtopic.php
##   /templates/SubSilver/Viewtopic_body.tpl
##
##########################################################
##
## Installation Notes:
##
## There is some customization that will need to be
## done in Viewtopic_body.tpl It is really up to you
## where you want it to be placed.
##
########################################################

#
#-----[ OPEN ]------------------------------------------
#

Viewtopic.php

#
#-----[ FIND ]------------------------------------------
#

u.user_allowavatar, u.user_allowsmile,

#
#-----[ ADD AFTER ]------------------------------------------
#

u.user_allow_viewonline, u.user_session_time,

#
#-----[ FIND ]------------------------------------------
#

   //
   // Again this will be handled by the templating
   // code at some point
   //
   $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
   $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

//User Online Hack
//By AJ Quick (http://www.ajquick.com/)
if($postrow[$i]['user_session_time'] >= (time()-60)){
if($postrow[$i]['user_allow_viewonline']){
$status = '<b><a href="viewonline.php">Online!</a></b>';
}else{
$status = "Offline";
}
}else{
$status = "Offline";
}

#
#-----[ FIND ]------------------------------------------
#

      'POSTER_JOINED' => $poster_joined,
      'POSTER_POSTS' => $poster_posts,

#
#-----[ AFTER, ADD ]------------------------------------------
#

      'POSTER_STATUS' => $status,

#
#-----[ OPEN ]------------------------------------------
#

templates/SubSilver/Viewtopic_body.tpl

#
#-----[ FIND: Something Similar ]------------------------------------------
#

      <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br /><br /><div align="center">{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}</div><br /><br /> {postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}</span></td>

#
#-----[ Somewhere... ADD ]------------------------------------------
#

Status: {postrow.POSTER_STATUS}

# That's It!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

G60
Üye
Üye
 
İleti: 74
Kayıt: 09.11.2005, 16:31

İleti G60 14.01.2006, 17:12

yokmu kimsenin bir çözüm yolu yau
G60
Üye
Üye
 
İleti: 74
Kayıt: 09.11.2005, 16:31

Cvp: Profile eklenen eklentiyi avatar altına almak ?

İleti OkanBaran 17.01.2006, 17:42

bende bu modu kurdum fakat her hangi bir yönetim paneli oluşmaıd yani kontrol mekanizmasımı var bu modun yoksa otomatikmi yapıyor. manuel olarak admin panelinde extra bir link gelişmedi.
OkanBaran
Üye
Üye
 
İleti: 7
Kayıt: 07.01.2006, 22:40

İleti G60 18.01.2006, 01:59

bendede admin panelde birşey çıkmadıda register bölümünde mevcut.
Yokmu fikri olanlar bu konularla ilgili arkadaşlar?
G60
Üye
Üye
 
İleti: 74
Kayıt: 09.11.2005, 16:31

Cvp: Profile eklenen eklentiyi avatar altına almak ?

İleti gardean 04.02.2006, 12:24

dostum mod zaten ekliyo kendisi ben kurdum ekledi. Eklemediyse de viewtopic_body.tpl dosyasını ac {postrow.POSTER_POSTS}<br /> bul altına {postrow.POSTER_MOBILE}<br /> ekle sorunun hallolacaktır. Gelelim diğer soruna arkadaslar modu ilk eklediğinizde mobile olarak cıkıyo modu biraz editleyerek mobile yazan yere istediğinizi yazabilirsiniz.
gardean
Üye
Üye
 
İleti: 42
Kayıt: 16.11.2005, 15:28
Konum: İzmir

İleti onurnet 20.01.2007, 14:57

dediğin gibi denedim ama olmadı :(
onurnet
Üye
Üye
 
İleti: 37
Kayıt: 20.12.2005, 19:28


Soru(n)lar & Tartışmalar



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron