Welcome to Geeklog, Anonymous Friday, October 18 2024 @ 08:23 am EDT

Geeklog Forums

Authors Drop-Down Box in header?


Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
I saw this in the advanced search template and wanted to put in my header.thtml template so users can go to the writers profile at any given point. But when I put it in the header, it gives me the {lang_authors} code along with the drop-down also with the actual code in it. Here is what I try to put in the header:

<tr>
<td align="right">{lang_authors}:</td>
<td>
<select name="author">
<option selected="selected" value="0">{lang_all}</option>
{author_option_list}
</select>
</td>
</tr>
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
The problem is that those variables have not been set for the header.thtml template file. If you really want to display them, you are going to have to copy code from showForm() in system/classes/search.class.php (the part that sets the variables you need) to COM_siteHeader in lib-common.php.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It's not that easy - not all of the variables are available everywhere (actually, most are not).

You will need to write some PHP code for this (mostly copying from the search class) and then either hack COM_siteHeader to define that new variable or simply call your code in the header (as you can use PHP in header.thtml).

bye, Dirk
 Quote

Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
Thanks for the reply guys. I have it working the way I need it now, thanks again.
 Quote

All times are EDT. The time is now 08:23 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content