Перейти к контенту
  • 0

Флаги гос-в


Bulldog

Вопрос

Народ,подскажите плиzz,где найти хак,чтобы в постах под аватаром показывался флаг гос-ва установленного пользователем при регестрации?....не могу найти=(
Ссылка на комментарий
Поделиться на других сайтах

Рекомендуемые сообщения

  • 0

Flag Hack for IBF 1.3 by YBJS from the hack by MarkusD from the hack by Monster 
--------------------------------------------------------------------------------

Very Simple to install!

Using ACP/Users and Groups/Custom Profile Fields:


DOWNLOAD AND BACKUP:  > /index.php
   > /sources/Topics.php


STEP 1 - Adding New Custom Profile Field:
------

Go to your ACP/Users and Groups/Custom Profile Fields.

Add a New one.

Field Title: Country
Description:
Field Type: Drop Down Box
Max Input (for text input and text areas) in characters:
Display order (when editing and displaying) numeric 1 lowest.:
Option Content (for drop downs): 
(Here you need to fill in all the Content of the included flags.txt (just use copy/paste)
Show on registration page also?: Yes/No
Field cannot be left blank?: Yes/No
Hidden to profile viewers?: No
Editable by user?: Yes

Yes/No = Choose yourself.

***************************************************************
NOTE: Now go to ACP/System settings/CPU Saving, under Heading SQL Savings:
Allow custom profile field info be used in TopicView? Click Yes.

***************************************************************


STEP 2 - Upload the Flags:
------

Upload the attached full "flags" folder into you html directory!
If u want some very "cool as" animated ones visit: www.3dflags.com. Go to world flags and select small.


STEP 3 - Modify index.php: (around Line 96):
------

Find:

    $this->vars['mime_img']        = $INFO['html_url'] . '/mime_types';
 
Add right below:

    $this->vars['FLAGS_URL']        = $INFO['html_url'] . '/flags';


=======
SAVE
=======
 

STEP 4 - Modify Sources/Topics.php: (around Line 620):
------

Find:

 //--------------------------------------------
 // Optimized query?
 // mySQL.com insists that forcing LEFT JOIN or
 // STRAIGHT JOIN helps the query optimizer, so..
 //--------------------------------------------
       
 $DB->query( "SELECT p.*,
      m.id,m.name,m.mgroup,m.email,m.joined,m.avatar,m.avatar_size,m.posts,m.aim_name,
m.icq_number,
      m.signature, m.website,m.yahoo,m.integ_msg,m.title,m.hide_email,m.msnname, m.warn_level, m.warn_lastwarn,
      g.g_id, g.g_title, g.g_icon, g.g_dohtml $join_get_fields
      FROM ibf_posts p
        LEFT JOIN ibf_members m ON (p.author_id=m.id)
        LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup)
        $join_profile_query
        WHERE p.topic_id='".$this->topic['tid']."' and p.queued !='1'
        ORDER BY p.{$ibforums->vars['post_order_column']} {$ibforums->vars['post_order_sort']} LIMIT $first, ".$ibforums->vars['display_max_posts']);


We need to add two things here to the appropriate lines as above:

1. $DB->query( "SELECT d.field_1 AS 'country',p.*,                    <----- added the d.field_1 AS 'country',

2. LEFT JOIN ibf_members m ON (p.author_id=m.id)
   LEFT JOIN ibf_pfields_content d ON (p.author_id=d.member_id)       <----- added this line
   LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup)


***************************************************************
Just check that 'country' in Point 1. above, is actually default field_1.  Just check back in your ACP/Users & Groups/
Custom Profile Fields.  If it is NOT field_1 change it to whatever field number it is by changing the above.
***************************************************************

***************************************************************
NOTE: If u have installed my Sex Mod, here is an example what Point 1. above should look like with the change: 

Example:    $DB->query( "SELECT d.field_1 AS 'country',d.field_5 AS 'sex',p.*,
***************************************************************


Further down Find: (around Line 1234):

 if ($member['msnname'])
 {
	 $member['msn_icon'] = "<a href=\"javascript:PopUp('{$this->base_url}act=MSN&MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_MSN}></a>";
 }
 
Add directly below: 

 // Flag Hack:
 
 if ($member['country'] != "" AND $member['country'] != "-")
 {
	 $member['country'] =  "<img title='{$member['country']}' src='{$ibforums->vars['FLAGS_URL']}/{$member['country']}.gif' border='0'></a>";
 } else {
	 $member['country'] = "<img src='{$ibforums->vars['FLAGS_URL']}/blank.gif' border='0'>";
 }
 //-----------------------------------------------------


=======
SAVE
=======


STEP 5 - Upload Files:
------

Now Upload the files that you edited back to their proper locations:	> /index.php
      	 > /sources/Topics.php


STEP 6: - Editing HTML/Topic View Section/Post Entry:
------

In ACP go to Skin Templates -> Manage HTML -> (Select a skin) -> Topic View Section -> Post Entry
Search for {$author['member_joined']}<br />

Somewhere in this section, depends on your personal preference, add:

  {$author['country']}<br />

***************************************************************
NOTE: If u have installed my Sex Mod, here is an example of what this should look like with the change: 

       <td valign='top' class='{$post['post_css']}'>
        <span class='postdetails'>{$author['avatar']}<br /><br />
        {$author['title']}<br />
        {$author['member_rank_img']}<br /><br />
        {$author['member_group']}<br />
        {$author['member_posts']}<br />
        {$author['member_number']}<br />
        {$author['member_joined']}<br />
        {$author['country']}Gender:{$author['sex']}<br />
        {$author['member_status']}<br /><br /><!-- (START ID=4)Image/Text Online/Offline Mod v3.4 by Shadow Fox (END_ID=4) -->        


The line above relates to my Sex Mod and Flag Mod being on the same line as shown exactly in my attached gif with the added
word "Gender" included (this is optional).  If u dont want them on the same line just put each one on a separate line. 
***************************************************************

(NOTE:  Remember to apply the above to "ALL" Skin Templates)

SAVE your template.


STEP 7: - Done:
------

Go back to your Board, My Controls, select Profile, then select your flag. A nice flag image should now be on display.


THANK U and ENJOY:)

 

Перевод:

Flag Hack for IBF 1.3 by YBJS from the hack by MarkusD from the hack by Monster

хак Флаги для IB форума 1.3 разработан YBJS на основе хака MarkusD и хака Мonster

--------------------------------------------------------------------------------

 

Very Simple to install!

 

Очень легко инсталлировать (устанавливать)

 

Using ACP/Users and Groups/Custom Profile Fields:

 

Используя ACP/Users and Groups/Custom Profile Fields в Админцентре

 

DOWNLOAD AND BACKUP:  > /index.php

    > /sources/Topics.php

 

Скачайте и созраните два файла:              > /index.php

    > /sources/Topics.php

 

STEP 1 - Adding New Custom Profile Field:

------

 

Go to your ACP/Users and Groups/Custom Profile Fields.

 

Add a New one.

 

Field Title: Country

Description:

Field Type: Drop Down Box

Max Input (for text input and text areas) in characters:

Display order (when editing and displaying) numeric 1 lowest.:

Option Content (for drop downs):

(Here you need to fill in all the Content of the included flags.txt (just use copy/paste)

Show on registration page also?: Yes/No

Field cannot be left blank?: Yes/No

Hidden to profile viewers?: No

Editable by user?: Yes

 

Yes/No = Choose yourself.

 

В Админцентре просизводят следуюющие настройки...

 

Слушай, если ты это перевести не в состоянии, то может не надо хаки устанавливать??? Извини... :D

Ссылка на комментарий
Поделиться на других сайтах

  • 0
ставил вроде все как там описано, но по стандарту показываеться пустое поле, blank.gif и не хочет распозновать страны как флаги :D
Ссылка на комментарий
Поделиться на других сайтах

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Ответить на вопрос...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.