Jump to content

Integrare più di 2 custom field in uno solo

Featured Replies

come integrare più di 2 custom field in uno solo. Usare 2 o più campi personalizzati per un elemento nel Topic View (Visualizzazione Discussione).
ACP > Look & Feel > Manage Skin Sets & Templates > Scegli la tua skin > Global Templates > userInfoPane
cercate

                        <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">				<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">					<if test="$field != ''">						<li>							{$field}						</li>					</if>				</foreach>			</foreach>

aggiungi dopo

                        <if test="substr( $author['field_12'], 0, 4 ) == 'http'">				<if test="substr( $author['field_3'], 0, 4 ) == 'http'">					<a class='url' href="{$author['field_3']}"><img src="{$author['field_12']}"></a>				<else />					<if test="substr( $author['field_3'], 0, 3 ) == 'www'">						<a class='url' href="http://{$author['field_3']}"><img src="{$author['field_12']}"></a>					<else />						<img src="{$author['field_12']}">					</if>				</if>			</if>

field_3 corrisponde al Website URL
field_12 corrisponde al campo personalizzato dove far inserire l'url dell'immagine

ANTEPRIMA (temporanea)
(mistero risolto... ringrazio Martin)

Edited by Skillman_92

  • 2 years later...

io ho creato una pagina su ip.content, non c'è un modo per inserire un custom field ? ad esempio su una lista di utenti (gli utlimi 10 utenti registrati, come posso integrare i custom come nei profili, mettere nella lista ipc il genere del sesso la citta ecc? ho provato a usare questo cod

{$member['field_5']}

ma non mi visualizza nulla

  • Author

io ho creato una pagina su ip.content, non c'è un modo per inserire un custom field ? ad esempio su una lista di utenti (gli utlimi 10 utenti registrati, come posso integrare i custom come nei profili, mettere nella lista ipc il genere del sesso la citta ecc? ho provato a usare questo cod

{$member['field_5']}

ma non mi visualizza nulla

perchè una pagina? potresti usare un blocco.

 

se usi php a questo punto ti conviene caricare una cosa del genere, ma andresti a raddoppiare le query necessarie...

<foreach loop="$members as $member"><php>$member = IPSMember::load( $member['member_id'], 'customFields' );</php></foreach>	/**	 * Load member	 *	 * @param	 string	Member key: Either ID or email address OR array of IDs when $key_type is either ID or not set OR a list of $key_type strings (email address, name, etc)	 * @param	 string	Extra tables to load(all, none or comma delisted tables) Tables: members, pfields_content, profile_portal, groups, sessions, core_item_markers_storage.	 *					You can also use the aliases: 'extendedProfile', 'customFields' and 'itemMarkingStorage'	 * @param	string  Key type. Leave it blank to auto-detect or specify "id", "email", "username", "displayname".	 * @return	@e array   Array containing member data	 * <code>	 * # Single member	 * $member = IPSMember::load( 1, 'extendedProfile,groups' );	 * $member = IPSMember::load( 'matt@email.com', 'all' );	 * $member = IPSMember::load( 'MattM', 'all', 'displayname' ); // Can also use 'username', 'email' or 'id'	 * # Multiple members	 * $members = IPSMember::load( array( 1, 2, 10 ), 'all' );	 * $members = IPSMember::load( array( 'MattM, 'JoeD', 'DaveP' ), 'all', 'displayname' );	 * </code>	 */

altrimenti crei un blocco feed members e lo incorpori nella pagina desiderata

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.