| View previous topic :: View next topic |
| Author |
Message |
Anturaju93
Joined: 13 May 2010 Posts: 83 Location: Romania
|
Posted: Nov 18, 2010 7:00 pm Post subject: How to add a new page |
|
|
I need to add a new page, that users can search files.
I added this code on main.html
| Code: |
<a href="<TMPL_VAR site_url>/search.html" title="Cautare de Fisiere" >Cauta Fisiere</a>
|
And i added a search.html file in cgi-bin/Templates folder , but i cant make it work.
Admin can you help my here?
Thanks |
|
| Back to top |
|
 |
X.Man
Joined: 10 Nov 2010 Posts: 12
|
Posted: Nov 18, 2010 7:17 pm Post subject: |
|
|
| put your search.html file in /cgi-bin/Templates/Pages/English & then edit you main .htaccess |
|
| Back to top |
|
 |
Anturaju93
Joined: 13 May 2010 Posts: 83 Location: Romania
|
Posted: Nov 18, 2010 7:23 pm Post subject: |
|
|
| Okay, but i don`t know much about .htaccess . Can you tell my exactly what to edit in htaccess? |
|
| Back to top |
|
 |
Anturaju93
Joined: 13 May 2010 Posts: 83 Location: Romania
|
Posted: Nov 18, 2010 7:29 pm Post subject: |
|
|
| Never mind i got it now, thanks a lot man. It works! |
|
| Back to top |
|
 |
Anturaju93
Joined: 13 May 2010 Posts: 83 Location: Romania
|
Posted: Nov 18, 2010 8:06 pm Post subject: |
|
|
I`m trying to create a page with a search box from with users can search files, just like in catalogue page, but only the search box to appear on that page. I have added this code in to the search.html page:
| Code: |
<Form method="GET" action="">
<input type="hidden" name="op" value="catalogue">
<input type="text" name="k" value="<TMPL_VAR k>" size=16>
<input type="submit" value=" <TMPL_VAR lang_search> ">
<br>
<a href="#" onClick="this.style.display='none';$$('advs').style.display='block';return false;" class="txt12">Cautare avansata</a>
<div id="advs" style="display:none;width:450px;">
Tip fisier:
<select name="ftype">
<option value="">Any</option>
<option value="vid">Video</option>
<option value="aud">Audio</option>
<option value="img">Image</option>
<option value="arc">Archive</option>
<option value="app">Application</option>
</select>
<br>
Marime fisier
<select name="fsize_logic"><option value="gt">></option><option value="lt"><</option></select>
<input type="text" name="fsize" value="<TMPL_VAR fsize>" size=3> Mb
</div>
</Form>
|
Code that i have copy from catalogue.html, the search box appears okay, but when i search for files nothing is displayed , so i copy all code from catalogue.html and still not working.
What to do next? |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Nov 19, 2010 6:15 pm Post subject: |
|
|
in case of wondering
where should the script start displaying the files ??
| Code: |
<TMPL_VAR paging>
<TMPL_LOOP files>
</TMPL_LOOP>
|
using those codes can help you a lot more , as it got a place to show the files then
best way to figure out what each TMPL command does is by looking into the .pm or .cgi files ( index.cgi and index_dl.pm can help a lot)
Greetings From PowerChaos |
|
| Back to top |
|
 |
RockDiz
Joined: 05 May 2011 Posts: 59
|
Posted: May 23, 2011 1:39 am Post subject: |
|
|
so yeah..
how do you add a new page??? >_< |
|
| Back to top |
|
 |
|