Jump to content

Recommended Posts

Hello, I've tried asking around on the gallery2 support boards but no one is replying to my queries thus far. I am trying to alter a subcomponent of the gallery search function. Currently when I search for photos it displays various file information along with the photo, one of the fields is the owner field which I would like to remove. I have tried some solutions/hacks that I found but they don't work for me. I do not consider myself a PHP coder, rather just a hack so any help would be appreciated.

 

This is the code where the search results are displayed on the results page:

 

<ul class="giInfo">
	  {foreach from=$result.fields item=field}
	    {if isset($field.value)}
	    <li>
	      <span class="ResultKey">{$field.key}:</span>
	      <span class="ResultData">{$field.value|default:" "|markup}</span>
	    </li>
	    {/if}
	  {/foreach}
	</ul>
      </td>
    {/foreach}
  </tr></table>

 

I have figured out that the variables for each field are named 'description', 'keywords', 'summary', 'title', and 'owner'. How do I change this line to display only the first 4 fields instead of all of them.

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.