Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 04:49 pm EST
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>
<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>
7
4
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.
7
9
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
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
5
6
Quote
All times are EST. The time is now 04:49 pm.
- 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