How to add a new page

Powerfull XFileSharing version

Moderator: admin

Message
Author
Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm
Location: Romania

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?

Thanks

X.Man
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

Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm
Location: Romania

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

Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm
Location: Romania

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

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

Anturaju93
Posts: 91
Joined: May 13, 2010 6:46 pm
Location: Romania

#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> ">
<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">&gt;</option><option value="lt">&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?

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm
Location: belguim
Contact:

#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>
</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

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

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

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


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests