avatar and subject icons by gender

For support and discussion related to templates and themes in phpBB 3.3.
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

avatar and subject icons by gender

Post by halil16 »

Hello,
There are many avatar images in the files of the style I use. But there is no current information on how it can be used.

Image

I want to set the default avatar of members as male, female and not specified. Is there any updated plugin or code? How?

Finally, is it possible to make topic icons as below? With the avatar of the sender of the last message.

Image
Last edited by halil16 on Fri Oct 30, 2020 5:36 pm, edited 1 time in total.
Idea: phpBB PWA

I ❤ phpBB
User avatar
P_I
Registered User
Posts: 1495
Joined: Tue Mar 01, 2011 8:35 pm
Location: Staying home - Western Canada
Contact:

Re: avatar and subject icons by gender

Post by P_I »

halil16 wrote:
Fri Oct 30, 2020 4:46 pm
Hello,
There are many avatar images in the files of the style I use. But there is no current information on how it can be used.
Why not ask where you got the style? Shouldn't they be able to provide the answer?
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

the style developer is no longer answering questions. For a long time. Offline. I also thought it was a style independent thing and could be useful to other users as well. For That Reason I opened the title here.
Idea: phpBB PWA

I ❤ phpBB
User avatar
Mick
Support Team Member
Support Team Member
Posts: 23055
Joined: Fri Aug 29, 2008 9:49 am

Re: avatar and subject icons by gender

Post by Mick »

If the style isn’t being supported by the author then you would be better off looking for another one. In the meantime I’ll move this to a forum where you’re more likely to get a result.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

Thank you. The style writer produces great results. I hope it comes back with phpBB 4 tremendously. I think this is not about a style what I want to do.
Idea: phpBB PWA

I ❤ phpBB
User avatar
Lumpy Burgertushie
Registered User
Posts: 68544
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: avatar and subject icons by gender

Post by Lumpy Burgertushie »

it most likely is a style issue. not every style has the required html to put a default "no avatar" image in place.
not even sure if prosilver does.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

can it be done?
Idea: phpBB PWA

I ❤ phpBB
User avatar
Mannix_
Registered User
Posts: 1065
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: avatar and subject icons by gender

Post by Mannix_ »

You could do it with custom profile fields but I'm to dumb to figure out how to use them so can't help you
Did I helped You? Consider a donation. I don't drink 🍺 :lol:
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.3.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
Mick
Support Team Member
Support Team Member
Posts: 23055
Joined: Fri Aug 29, 2008 9:49 am

Re: avatar and subject icons by gender

Post by Mick »

What’s the name or location of the style you mention?
halil16 wrote:
Fri Oct 30, 2020 10:48 pm
can it be done?
Probably with an extension, try making an extension request.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

Mick wrote:
Sat Oct 31, 2020 8:28 am
What’s the name or location of the style you mention?
halil16 wrote:
Fri Oct 30, 2020 10:48 pm
can it be done?
Probably with an extension, try making an extension request.
Any style of Arty is Latte, Elegance, Digi and Basic. I use all four of them.

There is Default Avatar plugin but it is no longer supported and not working. Only the Genders plugin that this plugin points to is up to date. :(

And can the thing in the second picture in the first message be done?
Idea: phpBB PWA

I ❤ phpBB
User avatar
Mannix_
Registered User
Posts: 1065
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: avatar and subject icons by gender

Post by Mannix_ »

Good News I figure it out how to achieve it with CPF
First we need to set up a CPF in ACP like so
Custom profile fields localhost 475b55165717.png
Custom profile fields localhost 0667856cac82.png
Important name of the CPF must be as shown!!!
Now to editing the files
In viewtopic_body.html find

Code: Select all

<div class="avatar-container">
and change to

Code: Select all

<div class="avatar-container <!-- IF postrow.S_PROFILE_GENDER -->{postrow.PROFILE_GENDER_VALUE}<!-- ENDIF -->">
In memberlist_view.html find

Code: Select all

<!-- IF AVATAR_IMG -->
		<dl class="left-box">
			<dt class="profile-avatar">{AVATAR_IMG}</dt>
			<!-- EVENT memberlist_view_rank_avatar_before -->
			<!-- IF RANK_TITLE --><dd style="text-align: center;">{RANK_TITLE}</dd><!-- ENDIF -->
			<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->
			<!-- EVENT memberlist_view_rank_avatar_after -->
		</dl>	
	<!-- ENDIF -->
and change to

Code: Select all

<!-- IF AVATAR_IMG -->
		<dl class="left-box">
			<dt class="profile-avatar">{AVATAR_IMG}</dt>
			<!-- EVENT memberlist_view_rank_avatar_before -->
			<!-- IF RANK_TITLE --><dd style="text-align: center;">{RANK_TITLE}</dd><!-- ENDIF -->
			<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->
			<!-- EVENT memberlist_view_rank_avatar_after -->
		</dl>
	<!-- ELSE -->
		<dl class="left-box">
			<dt class="no-avatar no-avatar-memberview">
			<div class="avatar-container <!-- IF S_PROFILE_GENDER -->{PROFILE_GENDER_VALUE}<!-- ENDIF -->"> 
			</div>
			</dt>
			<!-- EVENT memberlist_view_rank_no_avatar_before -->
			<!-- IF RANK_TITLE --><dd style="text-align: center;">{RANK_TITLE}</dd><!-- ENDIF -->
			<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->
			<!-- EVENT memberlist_view_rank_no_avatar_after -->
		</dl>	
	<!-- ENDIF -->
then find and delete

Code: Select all

		<!-- IF not AVATAR_IMG -->
			<!-- EVENT memberlist_view_rank_no_avatar_before -->
			<!-- IF RANK_TITLE --><dt>{L_RANK}{L_COLON}</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
			<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}{L_COLON}<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
			<!-- EVENT memberlist_view_rank_no_avatar_after -->
		<!-- ENDIF -->
3rd file to edit is ucp_pm_viewmessage.html
find

Code: Select all

<div class="avatar-container">
and change to

Code: Select all

<div class="avatar-container <!-- IF S_PROFILE_GENDER -->{PROFILE_GENDER_VALUE}<!-- ENDIF -->">

Now for css open _colours.scss and at the bottom add

Code: Select all

.no-avatar .avatar-container {
    width: 96px;
    height: 96px;
}

.no-avatar .Male {
    background-image: url("./images/no_avatar_male.png");
    background-repeat: no-repeat;
}

.no-avatar .Female {
    background-image: url("./images/no_avatar_female.png");
    background-repeat: no-repeat;	

}
.no-avatar .None {
    background-image: url("./images/no_avatar.png");
    background-repeat: no-repeat;
}
@media (max-width: 700px) {
	.postprofile .no-avatar .avatar-container {
		width: 32px;
		height: 32px;
		float: left;
		margin-right: 5px;
	}
	
.no-avatar .None, .no-avatar .Female, .no-avatar .Male {
    background-size: 32px;
}
.no-avatar-memberview .Female, .no-avatar-memberview .Male, .no-avatar-memberview .None {
    background-size: 96px;
}
}
This is gonna get tricky since Arty's styles use scss you need to recompile that scss file.

Here is his tutorial how to do it https://www.artodia.com/phpbb-31-tutori ... ile-theme/

I recommend using the extensions it works on 3.3

END RESULT
(1) Test topic 50 - Page 10 - Testing Board localhost 1e91ae465bd1.png
Did I helped You? Consider a donation. I don't drink 🍺 :lol:
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.3.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

Since Memberlist_view.html file is not in style files, I copied and edited from Prosilver theme.
I did the custom profile fields as you say, but I ran into a problem. When I translated the Private Profile Field in the custom language settings, it didn't work.
But okay. Although it remains in English, members will understand. Thank you so much. If I had Paypal in my country, I would donate some.
What do i need to do the second picture in the first message? do you think it should be done Is it necessary? I thought it might be nice.
Many thanks again and again.
Idea: phpBB PWA

I ❤ phpBB
User avatar
Mannix_
Registered User
Posts: 1065
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: avatar and subject icons by gender

Post by Mannix_ »

halil16 wrote:
Sat Oct 31, 2020 7:20 pm
Since Memberlist_view.html file is not in style files, I copied and edited from Prosilver theme.
I did the custom profile fields as you say, but I ran into a problem. When I translated the Private Profile Field in the custom language settings, it didn't work.
It can be fixed by adding classes to css
so if we have

Code: Select all

.no-avatar .Male {
    background-image: url("./images/no_avatar_male.png");
    background-repeat: no-repeat;
}
we need to change it to

Code: Select all

.no-avatar .Male, .no-avatar .Your_Translation_For_Male {
    background-image: url("./images/no_avatar_male.png");
    background-repeat: no-repeat;
}
you need to repeat that everywhere where the Male/Female/None occurs in css
halil16 wrote:
Sat Oct 31, 2020 7:20 pm
What do i need to do the second picture in the first message? do you think it should be done Is it necessary? I thought it might be nice.
Many thanks again and again.
Can you send a link to where we can see that in action this cropped image is not enough :)
Did I helped You? Consider a donation. I don't drink 🍺 :lol:
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.3.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
halil16
Registered User
Posts: 148
Joined: Fri Jul 24, 2020 11:30 pm
Location: Türkiye

Re: avatar and subject icons by gender

Post by halil16 »

translations did not happen.
I've seen it on some phpBB forums, but I'm not sure. Here: https://www.artodia.com/forums/phpbb-support/ and https://forum.shiftdelete.net/
Idea: phpBB PWA

I ❤ phpBB
User avatar
Mannix_
Registered User
Posts: 1065
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: avatar and subject icons by gender

Post by Mannix_ »

halil16 wrote:
Sun Nov 01, 2020 12:25 pm
translations did not happen.
What do you mean it did not happen? In CPF setting you are able to make translations for all available languages and it worked on my test board.
Custom profile fields localhost a968513a4b46.png
halil16 wrote:
Sun Nov 01, 2020 12:25 pm
I've seen it on some phpBB forums, but I'm not sure. Here: https://www.artodia.com/forums/phpbb-support/ and https://forum.shiftdelete.net/
Those are not phpBB forum one looks custom and arty's is on xenforo.

Anyway this require an extension. There are extension to display avatars in the last post section f.e https://www.phpbb.com/customise/db/exte ... tar_status but you would have to ask there if it's possible to make them appear where the forum icons are.

On top of that you would probably want the no-avatar by gender to work too so you would need to add that function in the extension because my solution only work in place where CPF are available to use.

So you can ask the author if he can help you with it or you can just ask for the extension to made from scratch in Extension Request forum or Wanted forum.
Did I helped You? Consider a donation. I don't drink 🍺 :lol:
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.3.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
Post Reply

Return to “[3.3.x] Styles Support & Discussion”