Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: Adrek in April 14, 2012, 03:06:04 VORMITTAG

Titel: [TIP/TRICK] Hiding Custom Profile Fields from guests in topic view
Beitrag von: Adrek in April 14, 2012, 03:06:04 VORMITTAG
In SMF 2 Custom profile fields are visible in topic view for guests, so if you want to hide them here is one simple edit, but before it make backup of ./Sources/Load.php

Now open: ./Sources/Load.php
Code (Find) Auswählen
// Are we also loading the members custom fields into context?
if ($display_custom_fields && !empty($modSettings['displayFields']))

Code (Replace with) Auswählen
// Are we also loading the members custom fields into context?
if ($display_custom_fields && !empty($modSettings['displayFields']) && !$user_info['is_guest'])



Titel: Re: [TIP/TRICK] Hiding Custom Profile Fields from guests in topic view
Beitrag von: Robert. in April 14, 2012, 03:07:31 VORMITTAG
Nice trick :) Thanks for sharing ;D
Titel: Re: [TIP/TRICK] Hiding Custom Profile Fields from guests in topic view
Beitrag von: kat in April 14, 2012, 10:37:30 VORMITTAG
As this is a tip/trick, I've moved it to the... er... Tips and tricks board.

Logical, huh? ;)
Titel: Re: [TIP/TRICK] Hiding Custom Profile Fields from guests in topic view
Beitrag von: Adrek in April 14, 2012, 10:39:34 VORMITTAG
Thanks K@ ;)
Titel: Re: [TIP/TRICK] Hiding Custom Profile Fields from guests in topic view
Beitrag von: kat in April 14, 2012, 10:42:43 VORMITTAG
No sweat! :)