XFileSharing Pro - Changing title tag on static pages

Powerfull XFileSharing version

Moderator: admin

Message
Author
glumbo
Posts: 211
Joined: Mar 11, 2011 6:26 am
Location: US

Changing title tag on static pages

#1 Postby glumbo » May 09, 2011 12:37 am

I would like to change the title tag for the FAQ, ToS, Premium pages and other static pages. How can I do this?

glumbo
Posts: 211
Joined: Mar 11, 2011 6:26 am
Location: US

#2 Postby glumbo » Sep 07, 2011 11:05 pm

Bump

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#3 Postby Jesse202 » Sep 08, 2011 1:09 pm

I believe this should be scattered throughout the language files. /cgi-bin/Languages/

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

#4 Postby PowerChaos » Sep 10, 2011 11:27 pm

open main.html and change above title code with below title code to show File name as tittle

Code: Select all

<Title><TMPL_IF page_title><TMPL_VAR page_title><TMPL_ELSE><TMPL_VAR site_name> - <TMPL_VAR lang_page_title></TMPL_IF></Title>

for meta description use below code

Code: Select all

<TMPL_UNLESS file_descr><META NAME="description" CONTENT="<TMPL_IF meta_descr><TMPL_VAR meta_descr><TMPL_ELSE><TMPL_VAR site_name> - Free file upload service</TMPL_IF>"><TMPL_ELSE><META NAME="description" CONTENT="<TMPL_VAR file_descr>"></TMPL_UNLESS>


open languages to see what code to use

Code: Select all

### Header + Footer
lang_login              => "Login",
lang_signup             => "Sign Up",
lang_forgot_pass        => "Forgot your password?",
lang_page_title         => "Easy way to share your files",
lang_welcome            => "Welcome,",
lang_upload_files       => "Upload Files",
lang_my_files           => "My Files",
lang_renew_premium      => "Renew premium",
lang_buy_premium        => "Upgrade to premium",
lang_logout             => "Logout",
lang_adm_file_mgmt      => "Files",
lang_adm_user_mgmt      => "Users",
lang_adm_server_mgmt    => "Servers",
lang_adm_abuse          => "Abuses",
lang_adm_news           => "News",
lang_adm_settings       => "Settings",
lang_home               => "Home",
lang_news               => "Blog",
lang_catalogue          => "Catalogue",
lang_faq                => "FAQ",
lang_tos                => "Terms of service",
lang_premium            => "Premium",
lang_link_checker       => "Link Checker",
lang_contact_us         => "Contact Us",


open index.cgi and search for line 758 and before

Code: Select all

   $ses->PrintTemplate("Pages/$ses->{language}/$tmpl.html");

add this code

Code: Select all

   $ses->{page_title} = $ses->{lang}->{lang_tos} if $tmpl eq ("tos");
   $ses->{page_title} = $ses->{lang}->{lang_faq} if $tmpl eq ("faq");


to add to link page or any other page you need to use this code (almost same code :D )

Code: Select all

$ses->{page_title} = $ses->{lang}->{lang_links};

be sure to add that link before

Code: Select all

$ses->PrintTemplate('links.html',links => \@links);


to explain it a little quick

if pagetitle is equal to tos.html then show lang_tos (terms of service)
if page title is equal to faq.html then show lang_faq (Frequently asked questions)
more pages can be added on this way

Code: Select all

$ses->{page_title} = $ses->{lang}->{lang_PAGE} if $tmpl eq ("PAGE");

but that only counts for extra pages added in the Page folder ( templates/pages/)

enjoy the release :D

here is a demo

http://www.boosterking.com/tos.html

not all links are done as i am still working on it to do all links :D

Greetings From PowerChaos

glumbo
Posts: 211
Joined: Mar 11, 2011 6:26 am
Location: US

#5 Postby glumbo » Sep 10, 2011 11:38 pm

Thanks PowerChaos!

ptoone
Posts: 21
Joined: Sep 16, 2012 1:48 pm
Contact:

not working for me

#6 Postby ptoone » Jan 28, 2013 11:15 pm

I have followed these steps but it is not working for me. Any ideas why?

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

#7 Postby PowerChaos » Jan 29, 2013 1:52 am

well it depends what version of xfilesharing you use

i use a kinda old version at this moment ( version 1.4 or so , or 1.6 , dont remember :P )

it is possible that the script has changed a lot from the time i posted this
but the system should stay the same , unless the template/sessions got a rewrite

Greetings From PowerChaos

ptoone
Posts: 21
Joined: Sep 16, 2012 1:48 pm
Contact:

#8 Postby ptoone » Jan 29, 2013 1:55 am

I am running 1.8

I wish I could find a way to do this.

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

#9 Postby PowerChaos » Jan 29, 2013 2:25 am

well lets try to explain a easy step then

if the template still contains this code then you can still use it

Code: Select all

<Title><TMPL_IF page_title><TMPL_VAR page_title><TMPL_ELSE><TMPL_VAR site_name> - <TMPL_VAR lang_page_title></TMPL_IF></Title>


if it still works ith TMPL_IF commands then you can still apply the same as you see in my text

only thing you need to do then is to figure out what variable is used instead the old variables

for example , to show ads you use the following code

Code: Select all

<TMPL_IF ads > Ads here</TMPL_IF>


for premium i use the following code

Code: Select all

<TMPL_IF premium> only premium can see this<TMPL_ELSE> Non premiums see this text </TMPL_IF>


if you keep that structure the same then you can also adjust the tittle based on the same system

maybe the variables are changed a bit , but hte system stays the same

Greetings From PowerChaos

ptoone
Posts: 21
Joined: Sep 16, 2012 1:48 pm
Contact:

#10 Postby ptoone » Jan 29, 2013 2:36 am

Thanks, I will play around with these variables and post once I have figured it out.

ptoone
Posts: 21
Joined: Sep 16, 2012 1:48 pm
Contact:

#11 Postby ptoone » Jan 29, 2013 4:08 am

Bingo,

I kept this code:

Code: Select all

<Title><TMPL_IF page_title><TMPL_VAR page_title><TMPL_ELSE><TMPL_VAR site_name> - <TMPL_VAR lang_page_title></TMPL_IF></Title>


I just added the rest the index.cgi


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest