code change for index.php to remove title and version

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

code change for index.php to remove title and version

Post by jason102178 »

If anyone has a piece of code that would alow users to remove the poweredby-2.6 or powered by then the version number that is displayed in title of the browser then please post it here

Here are 2 images that show the powered by, because when the FAQ is being indexed the poweredby and the version is displaying as part of the link
You do not have the required permissions to view the files attached to this post.
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: code change for index.php to remove title and version

Post by Thorsten »

Hi,

change both lines in index.php from

Code: Select all

$title           = ' -  powered by phpMyFAQ ' . $faqconfig->get('main.currentVersion');
to

Code: Select all

$title           = '';
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: code change for index.php to remove title and version

Post by jason102178 »

There is only 1 line which is like 294 that reads

Code: Select all

$title           = ' -  powered by phpMyFAQ ' . $faqconfig->get('main.currentVersion');
then if you change the 1 line to

Code: Select all

$title           = '';
and if you keep the ending code

Code: Select all

 $faqconfig->get('main.currentVersion');
you will have the version number in your header

so it would be something like this example.com/2.7.0RC the version would remain in the header

at least thats what i thought it would do if you only removed the powered by phpmyfaq and left the current version at the end
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: code change for index.php to remove title and version

Post by Thorsten »

Hi,

there are 2 occurrences:

in 2.7 it's line 289 and line 299.

in 2.6 it's line 271 and line 281.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: code change for index.php to remove title and version

Post by jason102178 »

Hi

Thanks for that information

Jason
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
rayray519
Posts: 18
Joined: Thu Jan 31, 2013 6:12 am

Re: code change for index.php to remove title and version

Post by rayray519 »

So what is the exact code example for each change. I tried it and I got a parse error. Also is it possible to remove the language drop down as well? Our audience will be English speaking by default.
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: code change for index.php to remove title and version

Post by jason102178 »

Hi Ray

If you would like to remove the phpmyfaq and version from title you have to edit the index.php

edit line 297 and 307

Find this code

Code: Select all

$title           = ' -  powered by phpMyFAQ ' . $faqconfig->get('main.currentVersion');
and replace it with this code

Code: Select all

 $title           = '';
you cant simply delete the code since its hard coded or you will get an error

also if you want to remove the language bar go to your template folder and edit file index.tpl

scroll to the bottom and remove this code and it will remove the language bar for ya. hope this helps.

Code: Select all

{switchLanguages}
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: code change for index.php to remove title and version

Post by jason102178 »

also as a note, if you upgrade your phpmyfaq to a new version you will have to replace this again
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
Post Reply