Jump to content

custom info pane for custom fields


autonami

Recommended Posts

ive searched and searched for a solution for what i am trying to do with no luck.

is there a way i can set up the info pane template to pull the information from custom fields per user?

setting up the display in each custom field setting will not display it how i need it.

i have it set up to just show an icon as a link with no text. so they should be horizontal, not vertical.

how it looks now.
%7Boption%7D

how i would like for it to look.

%7Boption%7D

Link to comment
Share on other sites

weird how you would post this now, as i was about to post the same thing :D

Mine are for Gamer ID's, it shows the images vertical and i want them horizontal. With maybe 5 on each line.

I did think of a way to get round this, and that would be using button like this %7Boption%7D With a logo and name, That way it would look nice being vertical.

Link to comment
Share on other sites

You can custom code it rather easily... Just don't put anything in the profile view and create your own list of the content... If there is nothing set for that field per the user, then don't display it...

You'd have to hardcode it into the userinfopane though...

Link to comment
Share on other sites

i figured it out...

i just took the <ul><li> tags away from the custom fields <if> codes. this way it does not put the fields in as a list.
and any field that needs to be on a new line. i just put <br> at the end of "topic view format" in the custom field editor.

before:


<if test="authorcfields:|:$author['custom_fields'] != """>

<ul class='custom_fields'>

<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>

</ul>

</if>

after:


<if test="authorcfields:|:$author['custom_fields'] != """>


<foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">

<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">

	 <if test="$field != ''">


	 {$field}


	 </if>

</foreach>

</foreach>

		 </if>



working here:
http://www.electronicmusiciansgroup.com/index.php?/topic/17-my-custom-pc-rebuild/

Link to comment
Share on other sites

If you put display: inline; on the li element of the lists' class/id, you can make the list horizontal without changing the php. custom_fields, the class the before mentioned list code was in, is in ipb_styles.css

Something like this:


.custom_fields li

{

display: inline;

}



display: inline-block; I believe will also work.

If it also changes things you don't want, you'll have to create a new class. That will require editing the php, however, as you will have to assign the list in question to your new class.

I prefer to change the css first if at all possible. CSS mistakes just make the page look off. PHP mistakes can make your site break completely with the White Screen of PHP Fatal Error Death.

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...