[ABD] Avatar of Poster on Index and Viewforum 1.3.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

[ABD] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

  • Image
  • MOD Author : ABDev < N/A > http://www.phpbb-forge.com/
  • MOD Author : PastisD < N/A > http://www.phpbb-forge.com/
  • MOD Description : Shows the last poster's avatar in on the index and subforums, as well as the author's avatar and last poster's avatar on forums
  • MOD Version : 1.3.0
  • Installation level : Easy
  • Installation time : 15 minutes
  • Download : Click here
  • Screenshots :
    • prosilver :
      • Image Image
    • subsilver2 :
      • Image Image
  • Demo :
    • Demo board : N/A
  • Notes:
    • Available languages : English / French
    • Compatible styles : prosilver /subsilver2
  • Special thanks :
    • Thanks to lefty74 to have allowed us to continue his MOD development
    • Thanks to Jester-fr for the logo of the MOD
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

Fix on Tuesday, September 11 2012 :
  • The user avatar was not changed when the post author was changed via the moderator control panel
  • Small change in the behavior of the SQL queries when updating the avatar if a user hasn't one
Please apply the following fix :
  • Code: Select all

    #
    #-----[ OPEN ]------------------------------------------------
    #
    includes/mcp/mcp_post.php
    #
    #-----[ FIND ]------------------------------------------------
    #
        // Resync topic/forum if needed
    #
    #-----[ BEFORE, ADD ]-----------------------------------------
    #
    //-- mod : apiv ----------------------------------------------------------------
    //-- add
        include $phpbb_root_path . 'includes/functions_user.' . $phpEx;
    
        user_update_avatar($post_info['user_id'], $userdata['user_avatar'], $userdata['user_avatar_type'], $userdata['user_avatar_width'], $userdata['user_avatar_height']);
    //-- fin mod : apiv ------------------------------------------------------------
    #
    #-----[ OPEN ]------------------------------------------------
    #
    includes/functions_user.php
    #
    #-----[ FIND ]------------------------------------------------
    #
        $avatar_info = serialize(array(
            'avatar' => $new_avatar,
            'type' => (int) $new_avatar_type,
            'width' => (int) $new_avatar_width,
            'height' => (int) $new_avatar_height,
        ));
    #
    #-----[ REPLACE WITH ]----------------------------------------
    #
        $avatar_info = '';
        if ( !empty($new_avatar) )
        {
            $avatar_info = serialize(array(
                'avatar' => $new_avatar,
                'type' => (int) $new_avatar_type,
                'width' => (int) $new_avatar_width,
                'height' => (int) $new_avatar_height,
            ));
        }
    #
    #-----[ SAVE/CLOSE ALL FILES ]--------------------------------
    #
    # EoM  
The archive has been updated.

Fix on Wednesday, September 12 2012 :
  • There was an issue when creating or editing a forum
Please apply the following fix :
  • Code: Select all

    #
    #-----[ OPEN ]------------------------------------------------
    #
    includes/acp/acp_forums.php
    #
    #-----[ FIND ]------------------------------------------------
    #
                        // On add, add empty forum_options... else do not consider it (not updating it)
    #
    #-----[ BEFORE, ADD ]-----------------------------------------
    #
    //-- mod : apiv ----------------------------------------------------------------
    //-- add
                        $forum_data += array('forum_last_poster_avatar' => '');
    //-- fin mod : apiv ------------------------------------------------------------
    #
    #-----[ SAVE/CLOSE ALL FILES ]--------------------------------
    #
    # EoM   
The archive has been updated.
Last edited by ABDev on Wed Sep 12, 2012 5:02 am, edited 2 times in total.
Jabhi
Registered User
Posts: 572
Joined: Mon Feb 27, 2012 6:12 am

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Jabhi »

New version of mod ;) Thanks ABDev
Go phpBB go... Respected : Developers, Supporters.
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by martin123456 »

Be nice if this mod could detect the no avatar mod maybe some thing to think about ?

It seems it only detects a user with an avatar and i'm sure there is plenty of ppl who use the no avatar mod https://www.phpbb.com/customise/db/mod/ ... _no_avatar_/

Awesome mod by the way

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

For the moment, I prefer to fix all the issues in order it works on the latest versions of the software.
The add-ons, it will be later. It is not a priority.

But it is noted :).
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by martin123456 »

Infact i just purged my browser and it does pick up the no avatar mod so yeah its working well.

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

Hi all,
I added a fix in the second post.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Pthelovod »

Good day! In section moderator copying threads dividing it into two or more messages from the department a new topic appears here such error ... Any ideas?

Copying -

Code: Select all

Произошла общая ошибка: Общая ошибка 
» SQL ERROR [ mysqli ]

Field 'topic_first_poster_avatar' doesn't have a default value [1364]

SQL

INSERT INTO forum_topics (forum_id, icon_id, topic_attachment, topic_approved, topic_reported, topic_title, seo_desc, seo_key, topic_seo_title, topic_poster, topic_time, topic_replies, topic_replies_real, topic_status, topic_type, topic_first_poster_name, topic_last_poster_id, topic_last_poster_name, topic_last_post_time, topic_last_view_time, topic_bumped, topic_bumper, poll_title, poll_start, poll_length, poll_max_options, poll_vote_change) VALUES (145, 0, 0, 1, 0, 'Тяп Ляп', '', '', '', 1, 1340943484, 7, 7, 0, 0, 'Солнышко ясное', 1, 'мурочка', 1345618548, 1347350731, 0, 0, '', 0, 0, 1, 0)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/mcp/mcp_main.php
LINE: 1160
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/mcp/mcp_main.php
LINE: 109
CALL: mcp_fork_topic()

FILE: [ROOT]/includes/functions_module.php
LINE: 507
CALL: mcp_main->main()

FILE: [ROOT]/includes/functions_module.php
LINE: 802
CALL: p_master->load_active()

FILE: [ROOT]/mcp.php
LINE: 174
CALL: p_master->load()
Divided into two -

Code: Select all

» SQL ERROR [ mysqli ]

Field 'topic_first_poster_avatar' doesn't have a default value [1364]

SQL

INSERT INTO forum_topics (forum_id, topic_title, icon_id, topic_approved) VALUES (145, 'Тяп Ляп 2', 0, 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/mcp/mcp_topic.php
LINE: 544
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/mcp/mcp_topic.php
LINE: 74
CALL: split_topic()

FILE: [ROOT]/includes/mcp/mcp_main.php
LINE: 211
CALL: mcp_topic_view()

FILE: [ROOT]/includes/functions_module.php
LINE: 507
CALL: mcp_main->main()

FILE: [ROOT]/mcp.php
LINE: 249
CALL: p_master->load_active()
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

Okay, I check that.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Pthelovod »

Thank you! We'll wait ... :!: :!:
And here's another bug crawled

When creating a new forum from the admin panel :oops:

Code: Select all

Общая ошибка
SQL ERROR [ mysqli ]

Field 'forum_last_poster_avatar' doesn't have a default value [1364]

SQL

INSERT INTO forum_forums (parent_id, forum_type, forum_type_article, forum_status, forum_parents, forum_name, forum_link, forum_desc, forum_desc_uid, forum_desc_options, forum_desc_bitfield, forum_seo_key, forum_seo_desc, forum_seo_bottom, forum_rules, forum_rules_uid, forum_rules_options, forum_rules_bitfield, forum_rules_link, forum_image, forum_style, check_reading_timeout, post_content_height, display_subforum_list, forum_subforumslist_type, display_on_index, forum_topics_per_page, forum_recent_topics, enable_indexing, enable_icons, enable_prune, enable_topic_seo, prune_days, prune_viewed, prune_freq, enable_full_topic, sfpo_guest_enable, forum_ranon_flags, forum_bg, prune_move, forum_name_colour, forum_options, forum_flags, left_id, right_id) VALUES (1, 1, 0, 0, '', 'Запасные темы', '', '', '', 7, '', '', '', '', '', '', 7, '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 1, 0, 0, 0, '', 0, '', 0, 0, '29', 30)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 754
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/acp/acp_forums.php
LINE: 1131
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/acp/acp_forums.php
LINE: 212
CALL: acp_forums->update_forum_data()

FILE: [ROOT]/includes/functions_module.php
LINE: 507
CALL: acp_forums->main()

FILE: [ROOT]/adm/index.php
LINE: 78
CALL: p_master->load_active()
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

Hi,
The fix is available on the second message ;).
I'm working on the split/merge fix.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Pthelovod »

Thank you! Useful to try ...
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Pthelovod »

Everything is fine! I like to support such rapid fashion. You are a wonderful person.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by Pthelovod »

фix2...Can then edit in a better includes/acp/acp_forums.php ?

Code: Select all

$forum_data += array('forum_last_poster_avatar' => '');
ту

Code: Select all

$forum_data = array_merge($forum_data, array('forum_last_poster_avatar' => ''));
+ Russian translation

Code: Select all

<?php
//
//	file: language/ru/mods/info_acp_apiv.php
//	author: abdev
//	begin: 08/27/2012
//	version: 0.0.3 - 09/01/2012
//	licence: http://opensource.org/licenses/gpl-license.php GNU Public License
//

// ignore
if ( !defined('IN_PHPBB') )
{
	exit;
}

// init lang ary, if it doesn't !
if ( empty($lang) || !is_array($lang) )
{
	$lang = array();
}

// administration
$lang = array_merge($lang, array(
	'APIV_MAX_DIMENSIONS'               => 'Максимальный размер отображения аватар',
	'APIV_MAX_DIMENSIONS_EXPLAIN'       => 'Отображаемые аватары не будут превышать установленный размер.',
	'APIV_FORUMS_LAST_POSTER_SHOW'      => 'Отображать аватары авторов и ответивших на главной и в списках форумов.',
	'APIV_TOPICS_FIRST_POSTER_SHOW'     => 'Отображать аватар автора темы  в списках форумов',
	'APIV_TOPICS_LAST_POSTER_SHOW'      => 'Отображать аватар последнего ответившего в списках форумов',
));

// umil
$lang = array_merge($lang, array(
	'APIV'                              => '“Аватар автора и ответившего на главную и в список форумов”',

	'INSTALL_APIV'                      => 'Установка мода “Аватар автора и ответившего на главную и в список форумов”',
	'INSTALL_APIV_CONFIRM'              => 'Вы готовы к установке мода “Аватар автора и ответившего на главную и в список форумов” ?',
	'UPDATE_APIV'                       => 'Обновление мода “Аватар автора и ответившего на главную и в список форумов”',
	'UPDATE_APIV_CONFIRM'               => 'Вы готовы к обновлению мода “Аватар автора и ответившего на главную и в список форумов” ?',
	'UNINSTALL_APIV'                    => 'Удаление мода “Аватар автора и ответившего на главную и в список форумов”',
	'UNINSTALL_APIV_CONFIRM'            => 'Вы готовы к удалению мода “Аватар автора и ответившего на главную и в список форумов” ? Исчезнут и настройки и записи в Базе Данных !',
));

// functions
$lang = array_merge($lang, array(
	'APIV_AVATARS_SYNCHRONIZED'         => 'Данные мода были синхронизированы.',

	'APIV_130_UPDATED'                  => 'Мод “Аватар автора и ответившего на главную и в список форумов” обновлен до последней версии.<br /><br />Не забудьте удалить установочный файл с сервера!',
	'APIV_130_GREATER'                  => 'Вы уже испольуете или эту или более свежую версию.<br /><br />Не забудьте удалить установочный файл с сервера!',
));
ABDev
Registered User
Posts: 909
Joined: Sun Aug 21, 2005 9:29 pm
Location: France
Name: Adrien Bonnel

Re: [RC] Avatar of Poster on Index and Viewforum 1.3.0

Post by ABDev »

It is exactly the same thing 8-).
I often use +=, array_merge() only when there are issues with +=

Thanks for your translation, I will add it soon to the MOD page :).

Return to “[3.0.x] Abandoned MODs”