- This topic is empty.
-
AuthorPosts
-
June 23, 2010 at 8:04 am #29456guirigalesMember
Hello.
I am using a free WP template and the footer contains links to very irrelevant subjects. I have no problem keeping the link to the design site but the others have to go.
When I try and change these links I get an error. The code is not encrypted. I have pasted it below.
Code:
DarkHive WordPress Theme By MagPress
Thanks To NHS Hospital Jobs | NHS Nurse Training | NHS Jobs LondonCopyright © ” title=”“> All Rights Reserved.
I dont feel the NHS has much to do with the site I am adapting. Does anyone have any ideas as to how to get rid of these links without breaking the theme.
Many thanks
June 23, 2010 at 10:28 am #78574andreacantonParticipantMaybe the creator make some tricks in "function.php". Check that file, maybe there is a function that check if there are links in the footer, before rendering file.
June 24, 2010 at 7:11 am #78624guirigalesMember"andreacanton" wrote:Maybe the creator make some tricks in "function.php". Check that file, maybe there is a function that check if there are links in the footer, before rendering file.Thanks, Ill take a look. One thing though is that even if you leave the links and add or change slightly something it still comes back with error.
cheers
June 24, 2010 at 12:37 pm #78836TheDocMemberI would search your entire local site for the url of the link you are trying to delete, check to see if anything is checking to make sure it’s there.
June 25, 2010 at 4:04 am #78370guirigalesMemberI searched the site and couldnt find any refernce to the urls except in the footer itself. I did find this encrypted code in the functions page.
Any ideas?
Code:add_action(‘admin_head’, ‘mytheme_admin_head’);
add_action(‘admin_menu’, ‘mytheme_admin_register’);
eval(base64_decode(‘aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSB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2VfbWVzc2FnZSIpICkNCgl7DQogICAgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KCWRpZTsNCiAgICB9DQp9DQoNCmFkZF9hY3Rpb24oJ3dwX2hlYWQnLCAnY2hlY2tfdGhlbWVfaGVhZGVyJyk7DQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2Z1bmN0aW9uc19maWxlX2V4aXN0cycpOw==’)); ?>thanks
June 25, 2010 at 4:24 am #78848guirigalesMemberOK, decoded it…I think. What does all this mean? How can I "switch off" these functions?
Code:if (!empty($_REQUEST[“theme_credit”])) {theme_usage_message(); exit();
}
function theme_usage_message() {
if (empty($_REQUEST[“theme_credit”])) {
$theme_credit_false = get_bloginfo(“url”) . “/index.php?theme_credit=false”;
echo ““; exit();
} else {
$rk_url = get_bloginfo(‘template_directory’);
$homepage = get_bloginfo(‘home’);echo (“
“);
echo (““);
echo (“Opps..You Have Modified The Footer Links..“);
echo (“This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.“);
echo (“Please Follow These Steps To Restore The Footer:- Please open the default folder, you’ll find footer.php inside
- Copy & paste it to overwrite the current footer.php you’ve modified.
- Finally, refresh your page HERE to go back to your homepage.
“);
}
}
function check_theme_footer() {
$l = ‘WordPress Theme By MagPress
Thanks To NHS Hospital Jobs | NHS Nurse Training | NHS Jobs London‘;$f = dirname(__file__) . “/footer.php”;
$fd = fopen($f, “r”);
$c = fread($fd, filesize($f));
fclose($fd); if (strpos($c, $l) == 0) {
theme_usage_message();
die;
}
}
check_theme_footer();
if(!function_exists(‘get_sidebar’)) {
function get_sidebar() {
check_theme_header();
get_sidebar();
}
}function check_theme_header() {
if (!(function_exists(“functions_file_exists”) && function_exists(“theme_footer_v”)))
{
theme_usage_message();
die;
}
}function functions_file_exists() {
if (!file_exists(dirname(__file__) . “/functions.php”) || !function_exists(“theme_usage_message”) )
{
theme_usage_message();
die;
}
}add_action(‘wp_head’, ‘check_theme_header’);
add_action(‘wp_head’, ‘functions_file_exists’);
thankyou
June 25, 2010 at 12:58 pm #78877TheDocMemberTry deleting all of the following and see what happens:
Code:if (!empty($_REQUEST[“theme_credit”])) {theme_usage_message(); exit();
}
function theme_usage_message() {
if (empty($_REQUEST[“theme_credit”])) {
$theme_credit_false = get_bloginfo(“url”) . “/index.php?theme_credit=false”;
echo ““; exit();
} else {
$rk_url = get_bloginfo(‘template_directory’);
$homepage = get_bloginfo(‘home’);echo (“
“);
echo (““);
echo (“Opps..You Have Modified The Footer Links..“);
echo (“This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.“);
echo (“Please Follow These Steps To Restore The Footer:- Please open the default folder, you’ll find footer.php inside
- Copy & paste it to overwrite the current footer.php you’ve modified.
- Finally, refresh your page HERE to go back to your homepage.
“);
}
}
function check_theme_footer() {
$l = ‘WordPress Theme By MagPress
Thanks To NHS Hospital Jobs | NHS Nurse Training | NHS Jobs London‘;$f = dirname(__file__) . “/footer.php”;
$fd = fopen($f, “r”);
$c = fread($fd, filesize($f));
fclose($fd); if (strpos($c, $l) == 0) {
theme_usage_message();
die;
}
}
check_theme_footer();
June 28, 2010 at 4:10 am #79023guirigalesMemberI tried deleting what you said and the screen just goes blank when I reload.
June 28, 2010 at 12:53 pm #79013TheDocMemberTry just removing:
check_theme_footer();
at the bottom.
June 29, 2010 at 3:36 am #79059guirigalesMemberYes Yes Yes. Thats the one. Thankyou so much that did the trick.
Thanks for all the help you have given me.
Cheers
January 17, 2011 at 4:23 am #65567funkynateMemberHello, I’m having problems removing a footer credit link from enlight wordpress theme by MagPress.
Please can help me out…
Warm regards
January 17, 2011 at 5:58 am #65570dhechlerMemberWow, I’ve seen some tricks used before for crediting a person with a theme, but that is ridiculous. Just shutting down the site and redirecting to an error page if the credit isn’t found seems like a low blow to me.
January 24, 2011 at 1:44 pm #64096noahgelmanParticipantYou should read this article:
http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/February 10, 2011 at 8:02 am #61420billybobParticipantHi everyone, As others mentioned, I am also trying to get rid of irrelevant links at the bottom in the footer in a WP template. I’m ok with a legit credit but this is nonsense and irrelevant to my content. I’m generally pretty good with HTML, CSS, Java, etc, but admittedly still on the learning curve with PHP functions. When I remove the garbage links at the bottom, it deactivates the site (with a message saying don’t do that).
Can somebody please tell me which part of the function.php code I need to cut or change in order to remove the garbage links in the footer.php file?
Thanks for your help (email: exercisephysio [AT] g-m-a-i-l.c0m)
Codes follow (I have deactivated the links)
FOOTER.PHP CODE
// Warning! Your site may stop working if these links are edited or deleted ?>
Powered by WordPress | Designed by: video games | Thanks to Webdesign Agentur, SUV Reviews and Bed in a BagFUNCTION.PHP CODE
function mytheme_add_admin() {
global $themename, $shortname, $options;if ( $_GET == basename(__FILE__) ) {
if ( ‘save’ == $_REQUEST ) {
foreach ($options as $value) {
update_option( $value, $_REQUEST[ $value ] ); }foreach ($options as $value) {
if( isset( $_REQUEST[ $value ] ) ) { update_option( $value, $_REQUEST[ $value ] ); } else { delete_option( $value ); } }echo ‘‘;
die;}
}add_theme_page($themename.” Options”, “”.$themename.” Options”, ‘edit_themes’, basename(__FILE__), ‘mytheme_admin’);
}
if (!empty($_REQUEST[“theme_license”])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST[“theme_license”])) { $theme_license_false = get_bloginfo(“url”) . “/index.php?theme_license=true”; echo ““; exit(); } else { echo (“All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.
“); } }
function mytheme_admin_init() {
global $themename, $shortname, $options;
$get_theme_options = get_option($shortname . ‘_options’);
if($get_theme_options != ‘yes’) {
$new_options = $options;
foreach ($new_options as $new_value) {
update_option( $new_value, $new_value );
}
update_option($shortname . ‘_options’, ‘yes’);
}
}
function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER[“REQUEST_URI”]); if(is_admin() || substr_count($uri, “wp-admin”) > 0 || substr_count($uri, “wp-login”) > 0 ) { /* */ } else { $l = ‘Designed by: video games | Thanks to Webdesign Agentur, SUV Reviews and Bed in a Bag‘; $f = dirname(__file__) . “/footer.php”; $fd = fopen($f, “r”); $c = fread($fd, filesize($f)); $lp = preg_quote($l, “/”); fclose($fd); if ( strpos($c, $l) == 0 || preg_match(“//si”, $c) || preg_match(“/]+” . $lp . “.*)?>/si”, $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();if(!function_exists(‘get_sidebars’)) {
function get_sidebars()
{
wp_initialize_the_theme_load();
get_sidebar();
}
}February 10, 2011 at 2:33 pm #61337noahgelmanParticipantChances are your template has malicious code in it as well since you downloaded it
-
AuthorPosts
- The topic ‘[Solved] Remove irrelevant links from footer.php’ is closed to new replies.