Thread subject: muscapaul's PHP-Fusion website :: Version @ FOOTER HAND-MOD - howto

Posted by vlip on 27-03-2007 21:22
#1

Code
 A small howto about getting your version info HardCoded into your footer

this way switching THEME Does not REMOVE your VERSION


<exp> v6.01.9 ? 2007 </exp>


vlip.freelinuxhost.com/roel/versionATfooter.PNG


- go to php files -
  root of fusion -
  - BACKUP
Code
 footer.php



  - OPEN
Code
 footer.php



-
*Search String*

 
*searching for text by pressing Control+F inside the document

----------------------------------------------------------
search for:
Code
    $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time()-86400)."'");




-Press END on your keyboard to get to the end of the rule - string
-press Return on your keyboard to create a new emty rule under this string

now you are between this string and the *next string  

this
*next string is
 
Code
 }




Paste the Next - PhpCode
between these 2 strings

Code
 
//smallmod by: VLiP
//http://VLiP.nl.tt
if ($license == false) {
echo "v".$settings['version']." ? 2007";






when the end of code has double
Code
 }



under each other, it's correct.
So the end of the new code looks like


}
}

Than it's correct,
When you don't now exactly what your doing
don't change more of this footer.php or you lose your footer completely


---------------
Complete DONE footercode looks like this




[code] <?php
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }
render_footer(false);
echo "</body>\n</html>\n";
if (iADMIN) {
   $result = dbquery("DELETE FROM ".$db_prefix."flood_control WHERE flood_timestamp < '".(time()-360)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE notify_datestamp < '".(time()-1209600)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."vcode WHERE vcode_datestamp < '".(time()-360)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time()-86400)."'");
//smallmod by: VLiP
//http://VLiP.nl.tt
if ($license == false) {
echo "v".$settings['version']." ? 2007";

}
mysql_close();
ob_end_flush();
?>





afther uploading this footer, your footer has a new border looks like this



v6.01.9 ? 2007



Under the Original Footer


it wil stay after changing to other theme that does not have version info

and
normaly it will be updated whit version


-------
nog wat te verbeteren aan de code?? Quote to better or explain


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by vlip on 27-03-2007 23:01

Posted by vlip on 27-03-2007 22:22
#2

Example Picture
view as when not loaded


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by vlip on 27-03-2007 22:25

Posted by vlip on 28-03-2007 00:31
#3

Not Visible for internet Explorer :o:p:D

Posted by muscapaul on 28-03-2007 00:39
#4

FYI: The removal of the version number from the footer was done on purpose to reduce the chance of hacker being able to find PHP-Fusion sites with vulnerabilities via thier version numbers. The version number will be stored in the search engine's cache.
Webmasters can easily find the version number of their site by going to the admin panel.
Still, if you want the version number to be visible in all themes at all times, the above is a way to do it. :)

Posted by vlip on 28-03-2007 01:37
#5

Some theme's have version number inside,
some theme's hide version number,
so you change Theme,
Your version numer is gone??
This way it's HardCoded into the Footer.php on main,
so it won't switch anymore,
but Rightnow its visible on
*Mozilla Firefox Visible
*Internet Explorer Not Visible or hidden


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by vlip on 28-03-2007 06:03

Posted by vlip on 28-03-2007 10:10
#6

CMOD your footer.php to 600 and only when admin login : they see
Code
 version ? 2007


will be visible.
Member does see footer but does not see version.
Then its switching theme again


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by vlip on 28-03-2007 10:12