Collapse profile fields?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
hawayman
Registered User
Posts: 8
Joined: Fri Dec 06, 2019 9:00 pm
Location: Earth
Name: Elar

Collapse profile fields?

Post by hawayman »

Hi!

Goooooogeled that but no good answer. What i want is, how collapse group profile fields in viewtopic and profile view?

Have anyone some idea?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Collapse profile fields?

Post by david63 »

I think that you will need to explain a little better, perhaps with an image, as to what you mean by
hawayman wrote: Fri Dec 06, 2019 9:09 pm collapse group profile fields
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
hawayman
Registered User
Posts: 8
Joined: Fri Dec 06, 2019 9:00 pm
Location: Earth
Name: Elar

Re: Collapse profile fields?

Post by hawayman »

Something like that would be good!
Image
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: Collapse profile fields?

Post by 3Di »

Depends on your style, an easy way could be (prosilver here)

OPEN .\styles\prosilver\template\viewtopic_body.html

Find this block

Code: Select all

		<!-- EVENT viewtopic_body_postrow_custom_fields_before -->
		<!-- BEGIN custom_fields -->
			<!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
				<dd class="profile-custom-field profile-{postrow.custom_fields.PROFILE_FIELD_IDENT}"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
			<!-- ENDIF -->
		<!-- END custom_fields -->
		<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
and surrond it with the new HTML5 details TAG

Like

Code: Select all

	<div>
		<details>
			<summary title="collapse cpf">&nbsp;&nbsp;<i class="icon fa-compress fa-fw" style="color: #0076b1" aria-hidden="true"></i> Collapse CPF</summary>
			<!-- EVENT viewtopic_body_postrow_custom_fields_before -->
			<!-- BEGIN custom_fields -->
				<!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
					<dd class="profile-custom-field profile-{postrow.custom_fields.PROFILE_FIELD_IDENT}"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
				<!-- ENDIF -->
			<!-- END custom_fields -->
			<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
		</details>
	</div>
If you have doubts or questions please post in the styles forum.


2019-12-07 02_30_12-collapse CPF.png


2019-12-07 02_31_24-collapse CPF open.png
You do not have the required permissions to view the files attached to this post.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
hawayman
Registered User
Posts: 8
Joined: Fri Dec 06, 2019 9:00 pm
Location: Earth
Name: Elar

Re: Collapse profile fields?

Post by hawayman »

Thanks for code, it works almost but i dont understand why it give me those 3x duplicates and that small triangle icon?

Image

My code!

Code: Select all

		<!-- BEGIN custom_fields -->
		<div>
		<details>
		<summary title="PC Spec"><i class="icon fa-compress fa-fw" style="color: #0076b1" aria-hidden="true"></i> PC Spec</summary>
		<!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
	    <dd class="profile-gender"><strong>{L_GENDER}{L_COLON}</strong> {postrow.USER_GENDER}</dd>
			<!-- ENDIF -->
			</details>
			</div>
		<!-- END custom_fields -->
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: Collapse profile fields?

Post by 3Di »

3Di wrote: Sat Dec 07, 2019 1:31 am If you have doubts or questions please post in the styles forum.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: Collapse profile fields?

Post by mrgoldy »

You should post the details and summary tags outside the BEGIN and END tag.
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: Collapse profile fields?

Post by 3Di »

Yup, the discussion moved here since.
viewtopic.php?f=591&t=2531456
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

Return to “phpBB Custom Coding”