code change for index.php to remove title and version

In this board you can talk about general questions about phpMyFAQ

Moderators: jason102178, Florian, Thorsten, JochenS

code change for index.php to remove title and version

Postby jason102178 » Sun Sep 18, 2011 2:21 pm

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
Attachments
poweredby2.JPG
poweredby2.JPG (13.19 KiB) Viewed 2866 times
poweredby1.JPG
poweredby1.JPG (12.47 KiB) Viewed 2866 times
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
jason102178
 
Posts: 194
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio

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

Postby Thorsten » Sun Sep 18, 2011 4:36 pm

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
Thorsten
 
Posts: 12197
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

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

Postby jason102178 » Sun Sep 18, 2011 5:59 pm

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
jason102178
 
Posts: 194
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio

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

Postby Thorsten » Sun Sep 18, 2011 6:12 pm

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
Thorsten
 
Posts: 12197
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq

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

Postby jason102178 » Sun Sep 18, 2011 7:06 pm

Hi

Thanks for that information

Jason
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
jason102178
 
Posts: 194
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio

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

Postby rayray519 » Wed Feb 06, 2013 2:57 pm

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.
rayray519
 
Posts: 18
Joined: Thu Jan 31, 2013 6:12 am

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

Postby jason102178 » Wed Feb 06, 2013 3:59 pm

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: 194
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio

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

Postby jason102178 » Wed Feb 06, 2013 4:00 pm

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
jason102178
 
Posts: 194
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio


Return to General discussions

Who is online

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