XFileSharing Pro - How to add a new page

Posts: 91
Joined: May 13, 2010 6:46 pm

How to add a new page

#1 Postby Anturaju93 » Nov 18, 2010 7:00 pm

I need to add a new page, that users can search files.

I added this code on main.html

Code: Select all

<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?


Posts: 12
Joined: Nov 10, 2010 6:37 am

#2 Postby X.Man » Nov 18, 2010 7:17 pm

put your search.html file in /cgi-bin/Templates/Pages/English & then edit you main .htaccess

Posts: 91
Joined: May 13, 2010 6:46 pm

#3 Postby Anturaju93 » Nov 18, 2010 7:23 pm

Okay, but i don`t know much about .htaccess . Can you tell my exactly what to edit in htaccess?

Posts: 91
Joined: May 13, 2010 6:46 pm

#4 Postby Anturaju93 » Nov 18, 2010 7:29 pm

Never mind i got it now, thanks a lot man. It works!

Posts: 91
Joined: May 13, 2010 6:46 pm

#5 Postby Anturaju93 » Nov 18, 2010 8:06 pm

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: Select all

<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> ">
<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>
Marime fisier
<select name="fsize_logic"><option value="gt">&gt;</option><option value="lt">&lt;</option></select>
<input type="text" name="fsize" value="<TMPL_VAR fsize>" size=3> Mb

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?

Posts: 521
Joined: Dec 19, 2009 5:12 pm

#6 Postby PowerChaos » Nov 19, 2010 6:15 pm

in case of wondering

where should the script start displaying the files ??

Code: Select all

<TMPL_VAR paging>

<TMPL_LOOP files>

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

Posts: 135
Joined: May 05, 2011 4:47 pm

#7 Postby RockDiz » May 23, 2011 1:39 am

so yeah..
how do you add a new page??? >_<

Return to “XFileSharing Pro”