National Flags

ext of national flags on viewforum ? - National Flags

ext of national flags on viewforum ?

by patrick1963 » Wed Dec 20, 2017 10:56 pm

Good evening
with ext of national flags it is put on viewforum near the member?
pro.PNG
pro.PNG (9.75 KiB) Viewed 208 times
patrick1963
Registered User
Posts: 9
Joined: Mon Dec 11, 2017 5:42 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Thu Dec 21, 2017 11:04 am

No, that isn't possible.

There are several places within when viewing a topic where you can have the flag display.

Code: Select all

	'FLAG_POSITION_AFTER_AVATAR'		=> 'After a users avatar', //1
	'FLAG_POSITION_BEFORE_AVATAR'		=> 'Before a users avatar', //2
	'FLAG_POSITION_AFTER_USER_NAME'		=> 'After a user name', //3
	'FLAG_POSITION_BEFORE_USER_NAME'	=> 'Before a user name', //4
	'FLAG_POSITION_ABOVE_RANK'			=> 'Above a users rank', //5
	'FLAG_POSITION_BELOW_RANK'			=> 'Below a users rank', //6
	'FLAG_POSITION_AFTER_PROFILE_FIELDS'	=> 'After profile fields', //7
	'FLAG_POSITION_BEFORE_PROFILE_FIELDS'	=> 'Before profile fields', //8
	'FLAG_POSITION_AFTER_CONTACT_FIELDS'	=> 'After contact fields', //0
all selectable in the ACP settings of the extension.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by patrick1963 » Thu Dec 21, 2017 3:21 pm

Hello RMcGirr83
I have to look in which file to see the place ?
patrick1963
Registered User
Posts: 9
Joined: Mon Dec 11, 2017 5:42 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Fri Dec 22, 2017 2:43 am

It's in the works. ;)
index page.jpg
viewforum_page.jpg
memberlist.jpg
team_page.jpg
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by patrick1963 » Fri Dec 22, 2017 8:37 am

Hello
I'm sorry but I can not find the file or I could put this code I see that you walk all by all? I have that flag in viewtopic for the rest it and not the
patrick1963
Registered User
Posts: 9
Joined: Mon Dec 11, 2017 5:42 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Fri Dec 22, 2017 10:34 am

It will be in the next version.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by patrick1963 » Fri Dec 22, 2017 12:17 pm

OK, thanks
I'm waiting for your new version

thank you
patrick1963
Registered User
Posts: 9
Joined: Mon Dec 11, 2017 5:42 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Mon Jan 22, 2018 2:16 pm

In version 2.1.4
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by panteror » Tue Jan 30, 2018 7:47 pm

RMcGirr83 wrote:In version 2.1.4
Hi
I installed the last version, can you add a switch in ACP to not showing flag in viewforum ?, i prefer like old version (only in viewtopic).
Or what file i need to edit to remove it ?

Thanks
panteror
Registered User
Posts: 45
Joined: Sun Aug 09, 2015 3:33 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Tue Jan 30, 2018 8:47 pm

No matter how hard I try, I fail at pleasing everyone all the time. ***sigh***
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by panteror » Wed Jan 31, 2018 2:48 pm

RMcGirr83 wrote:No matter how hard I try, I fail at pleasing everyone all the time. ***sigh***
:), i'm sorry, i didn't see this request before, otherwise I would have suggested you put it in option during development
panteror
Registered User
Posts: 45
Joined: Sun Aug 09, 2015 3:33 pm

Re: ext of national flags on viewforum ?

by LukeWCS » Mon Feb 05, 2018 10:43 am

Hi
RMcGirr83 wrote:No matter how hard I try, I fail at pleasing everyone all the time[/b]. ***sigh***
After developing programs more than 30 years i can say this: don't try it, because it's really impossible! ;)
panteror wrote:I installed the last version, can you add a switch in ACP to not showing flag in viewforum ?, i prefer like old version (only in viewtopic).
Or what file i need to edit to remove it ?
Agree. I also don't like the flags on INDEX and VIEWFORUM. There should really be a switch in ACP for that.

@panteror, you can made a simple minimal invasive change:

1. Edit event/listener.php
2. Go to the line with "public function viewforum_modify_topicrow"
3. In the next line add "return;" after "{", see the following detail:

Code: Select all

	public function viewforum_modify_topicrow($event)
	{return;
		$users_flag_array = $this->nationalflags->get_users_and_flags_cache();
This will disable the flags after TOPIC_AUTHOR_FULL and LAST_POST_AUTHOR_FULL on INDEX and VIEWFORUM.
May the backup be with you. Always.
User avatar
LukeWCS
Registered User
Posts: 295
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: ext of national flags on viewforum ?

by panteror » Mon Feb 26, 2018 11:18 am

LukeWCS wrote:Hi
RMcGirr83 wrote:No matter how hard I try, I fail at pleasing everyone all the time[/b]. ***sigh***
After developing programs more than 30 years i can say this: don't try it, because it's really impossible! ;)
panteror wrote:I installed the last version, can you add a switch in ACP to not showing flag in viewforum ?, i prefer like old version (only in viewtopic).
Or what file i need to edit to remove it ?
Agree. I also don't like the flags on INDEX and VIEWFORUM. There should really be a switch in ACP for that.

@panteror, you can made a simple minimal invasive change:

1. Edit event/listener.php
2. Go to the line with "public function viewforum_modify_topicrow"
3. In the next line add "return;" after "{", see the following detail:

Code: Select all

	public function viewforum_modify_topicrow($event)
	{return;
		$users_flag_array = $this->nationalflags->get_users_and_flags_cache();
This will disable the flags after TOPIC_AUTHOR_FULL and LAST_POST_AUTHOR_FULL on INDEX and VIEWFORUM.
Hi,
I tested your modification, i still have flag on index forum, it's OK on viewforum. What i need to change ? Thanks.

EDIT: I also changed the line

Code: Select all

	public function display_forums_modify_template_vars($event)
	{return;
Seems working.
panteror
Registered User
Posts: 45
Joined: Sun Aug 09, 2015 3:33 pm

Re: ext of national flags on viewforum ?

by RMcGirr83 » Mon Feb 26, 2018 12:11 pm

It's even easier than that, within the listener file make these two lines

Code: Select all

			'core.display_forums_modify_template_vars'	=> 'display_forums_modify_template_vars',
			'core.viewforum_modify_topicrow'			=> 'viewforum_modify_topicrow',
like this

Code: Select all

			//'core.display_forums_modify_template_vars'	=> 'display_forums_modify_template_vars',
			//'core.viewforum_modify_topicrow'			=> 'viewforum_modify_topicrow',
Then flags won't display in viewforum nor on the idex page or other pages where forums are displayed.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22105
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: ext of national flags on viewforum ?

by panteror » Mon Feb 26, 2018 1:14 pm

Thanks RMcGirr83
panteror
Registered User
Posts: 45
Joined: Sun Aug 09, 2015 3:33 pm