Author Topic: Regarding result_user.html  (Read 101 times)

happy

  • Prime Member
  • ****
  • Posts: 117
  • Karma: +0/-1
Regarding result_user.html
« on: December 14, 2017, 12:48:42 AM »
Hi
As result_user.html displays members on index.html and search.html.

I want to show different profile fields on member widget on index.html and different profile fields on search.html

How can i make two different result_user.html files one for index.html and one for search.html

How to achieve this, please guide.

Thank you

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 3025
  • Karma: +210/-7
    • Maverick Webworks
Re: Regarding result_user.html
« Reply #1 on: December 14, 2017, 10:36:33 AM »
You can't have two different result_user.html files.

What you do is add all the profile fields you want to display in the result_user.html files for both the index and search results. Then you hide the profile fields you don't want displayed on the index page using display:none in the skins_site/def/styles/index.css file. This is how it works now.

For example;

In the result_user.html file you have a list of profile fields something like this:

Code: [Select]
<p class="info gender"><span>{profile.f1_label}:</span> {profile.f1}</p>
<p class="info age"><span>{profile.f3_label}:</span> {profile.f3}</p>
<p class="info seek"><span>{profile.f2_label}:</span> {profile.f2}</p>
<p class="info locale"><span class="f4">{profile.f4_label}:</span> {profile.f4}</p>

You add more profile fields but make sure you give each one a unique class name.
<p class="info gender">

Then go to your skins_site/def/styles/index.css file and look for lines of code that look something like this:

Code: [Select]
.list_small li p.last {
display: none;
}

.list_small span.f4  {
display: none;
}

.list_small li p.gender {
display: none;
}

.list_small li p.locale {
font-size:10px;
}

.list_small li p.seek {
display: none;
}

Notice the ones with display: none, these profile fields won't display in the member widget on the index page.

You just add a new css code for the profile field you added in your result_user.html file but don't want to display in your index page.


For example;

.list_small li p.new {
   display: none;
}

and replace the "new" class name with the one you gave it in your result_user.html file.


Note: the above snips of code are from the default template, if you are using a 3rd party template the code could be slightly different but the principal will still be the same.

Also remember that any time you make edits to the result_user.html file you must regenerate your skin in order for the changes to take affect.

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.

happy

  • Prime Member
  • ****
  • Posts: 117
  • Karma: +0/-1
Re: Regarding result_user.html
« Reply #2 on: December 14, 2017, 11:27:08 PM »
Thanks a lot!