Addon: Add avatar of poster on portal

Post Reply

Topic author
macdonald
Active Member
Posts: 7
Joined: 1. March 2013 19:35

Addon: Add avatar of poster on portal

Post by macdonald »

Hello from Belarus! Sorry for my bad English ....
How to add avatars to ads and the latest reports on the portal?
Image

Example, as is made on the main forum page with this mod Avatar of poster on Index and Viewforum
Image

The mod author asked a question, but it is silent
Image

Testing account
Login: test
Password: v32skpert
Site: belgut.by
User avatar

gamingboard
Active Member
Posts: 26
Joined: 20. November 2009 15:44
phpBB.de User: gamingboard
phpBB.com User: gamingboard
Location: Free and Hanseatic City of Hamburg, Germany
Contact:

Re: Addon: Add avatar of poster on portal

Post by gamingboard »

Before adding this MOD to your forum, you should back up all files and databases related to this MOD.

This MOD was designed for Avatar of poster on Index and Viewforum 1.3.0 / Board3 2.0.1
and may not function as stated on other Avatar of poster on Index and Viewforum / Board3 versions.


EDIT: I updated the first edit

Open: portal/includes/functions.php
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

            t.icon_id,
Add after

Code: Select all

            t.topic_first_poster_avatar,
            t.topic_last_poster_avatar,

Find
Tip: This may be a partial find and not the whole line.

Code: Select all

            'attachments'            => (!empty($attachments)) ? $attachments : array(),
Add after

Code: Select all

//-- mod : apiv ----------------------------------------------------------------
//-- add
//-- Board3
            'topic_first_poster_avatar'            => $row['topic_first_poster_avatar'],
            'topic_last_poster_avatar'            => $row['topic_last_poster_avatar'],
//-- fin mod : apiv ------------------------------------------------------------                   


Open: portal/modules/portal_news.php
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

                    
                    // Grab icons
                    $icons = $cache->obtain_icons();
Add before

Code: Select all

//-- mod : apiv ----------------------------------------------------------------
//-- add
//-- Board3
                    if ( $config['avatar_topics_first_poster_show'] || $config['avatar_topics_last_poster_show'] )
                    {
                        $template->assign_var('AVATAR_MAX_DIMENSIONS', $config['avatar_max_dimensions']);
                    }
//-- fin mod : apiv ------------------------------------------------------------                    
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

                    if(!empty($fetch_news[$i]['attachments']))
                    {
                        foreach ($fetch_news[$i]['attachments'] as $attachment)
                        {
                            $template->assign_block_vars('news_row.attachment', array(
                                'DISPLAY_ATTACHMENT'    => $attachment)
                            );
                        }
                    }
Add before

Code: Select all

//-- mod : apiv ----------------------------------------------------------------
//-- add
//-- Board3
                    user_display_avatar($fetch_news[$i], 'topic_first', 'news_row', $config['avatar_topics_first_poster_show']);
                    user_display_avatar($fetch_news[$i], 'topic_last', 'news_row', $config['avatar_topics_last_poster_show']);
//-- fin mod : apiv ------------------------------------------------------------                    


Open: styles/prosilver/template/portal/modules/news_compact_center.html
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

<!-- IF news_row.S_UNREAD_TOPIC -->
Add before

Code: Select all

<!-- IF news_row.TOPIC_FIRST_POSTER_AVATAR --><span style="float: left; padding-top: 3px; margin-right: {news_row.TOPIC_FIRST_POSTER_AVATAR_MARGIN}px;">{news_row.TOPIC_FIRST_POSTER_AVATAR}</span><!-- ENDIF -->

Find
Tip: This may be a partial find and not the whole line.

Code: Select all

<span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {news_row.USERNAME_FULL_LAST} <!-- IF news_row.S_UNREAD_INFO --><a href="{news_row.U_VIEW_UNREAD}">{NEWEST_POST_IMG}</a><!-- ELSE --><a href="{news_row.U_LAST_COMMENTS}">{READ_POST_IMG}</a><!-- ENDIF --><br />
				{news_row.LAST_POST_TIME}</span>
Add before

Code: Select all

<!-- IF news_row.TOPIC_LAST_POSTER_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {news_row.TOPIC_LAST_POSTER_AVATAR_MARGIN}px;">{news_row.TOPIC_LAST_POSTER_AVATAR}</div><!-- ENDIF -->
Purge the cache

Enjoy

A picture:
Image

You can find a MODX Version of this mod here (subsilver2 included, Automod ready)

Topic author
macdonald
Active Member
Posts: 7
Joined: 1. March 2013 19:35

Re: Addon: Add avatar of poster on portal

Post by macdonald »

Thank you!!!

Topic author
macdonald
Active Member
Posts: 7
Joined: 1. March 2013 19:35

Re: Addon: Add avatar of poster on portal

Post by macdonald »

Please, how add this to announcements? :oops:
Image
User avatar

gamingboard
Active Member
Posts: 26
Joined: 20. November 2009 15:44
phpBB.de User: gamingboard
phpBB.com User: gamingboard
Location: Free and Hanseatic City of Hamburg, Germany
Contact:

Re: Addon: Add avatar of poster on portal

Post by gamingboard »

Oh, I forgot this block...
I'll take care of it tomorrow. I'm sorry for the inconvenience!

Topic author
macdonald
Active Member
Posts: 7
Joined: 1. March 2013 19:35

Re: Addon: Add avatar of poster on portal

Post by macdonald »

Excellent! I'll wait! Thank you! :D
User avatar

gamingboard
Active Member
Posts: 26
Joined: 20. November 2009 15:44
phpBB.de User: gamingboard
phpBB.com User: gamingboard
Location: Free and Hanseatic City of Hamburg, Germany
Contact:

Post by gamingboard »

Before adding this MOD to your forum, you should back up all files and databases related to this MOD.

This MOD was designed for Avatar of poster on Index and Viewforum 1.3.0 / Board3 2.0.1
and may not function as stated on other Avatar of poster on Index and Viewforum / Board3 versions.


Note: This is just a fix for the global announcements block.

Open: portal/modules/portal_announcements.php
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

                // Grab icons
                $icons = $cache->obtain_icons();
Add before

Code: Select all

//-- mod : apiv ----------------------------------------------------------------
//-- add
//-- Board3
                if ( $config['avatar_topics_first_poster_show'] || $config['avatar_topics_last_poster_show'] )
                {
                    $template->assign_var('AVATAR_MAX_DIMENSIONS', $config['avatar_max_dimensions']);
                }
//-- fin mod : apiv ------------------------------------------------------------        
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

                    if(!empty($fetch_news[$i]['attachments']))
                    {
                        foreach ($fetch_news[$i]['attachments'] as $attachment)
                        {
                            $template->assign_block_vars('announcements_center_row.attachment', array(
                                'DISPLAY_ATTACHMENT'    => $attachment)
                            );
                        }
                    }
Add before

Code: Select all

//-- mod : apiv ----------------------------------------------------------------
//-- add
//-- Board3
                    user_display_avatar($fetch_news[$i], 'topic_first', 'announcements_center_row', $config['avatar_topics_first_poster_show']);
                    user_display_avatar($fetch_news[$i], 'topic_last', 'announcements_center_row', $config['avatar_topics_last_poster_show']);
//-- fin mod : apiv ------------------------------------------------------------        


Open: styles/prosilver/template/portal/modules/announcements_center_compact.html
Find
Tip: This may be a partial find and not the whole line.

Code: Select all

<!-- IF announcements_center_row.S_UNREAD_TOPIC -->
Add before

Code: Select all

<!-- IF announcements_center_row.TOPIC_FIRST_POSTER_AVATAR --><span style="float: left; padding-top: 3px; margin-right: {announcements_center_row.TOPIC_FIRST_POSTER_AVATAR_MARGIN}px;">{announcements_center_row.TOPIC_FIRST_POSTER_AVATAR}</span><!-- ENDIF -->

Find
Tip: This may be a partial find and not the whole line.

Code: Select all

<span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {announcements_center_row.USERNAME_FULL_LAST} <!-- IF announcements_center_row.S_UNREAD_INFO --><a href="{announcements_center_row.U_VIEW_UNREAD}">{NEWEST_POST_IMG}</a><!-- ELSE --><a href="{announcements_center_row.U_LAST_COMMENTS}">{READ_POST_IMG}</a><!-- ENDIF --><br />
				{announcements_center_row.LAST_POST_TIME}</span>
Add before

Code: Select all

<!-- IF announcements_center_row.TOPIC_LAST_POSTER_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {announcements_center_row.TOPIC_LAST_POSTER_AVATAR_MARGIN}px;">{announcements_center_row.TOPIC_LAST_POSTER_AVATAR}</div><!-- ENDIF -->
Purge the cache

Enjoy


You can find a MODX Version of this mod here (subsilver2 included, Automod ready [Uninstall the old version first, if you're using Automod])

Topic author
macdonald
Active Member
Posts: 7
Joined: 1. March 2013 19:35

Re: Addon: Add avatar of poster on portal

Post by macdonald »

Thank you! ;)
Post Reply

Return to “Modification Requests”