Website Coding

Stuck on a line of code? Find resources and post your coding questions here.

Forum Sponsor (Advertise with us)
Reply
 
Thread Tools Display Modes
    #1 (permalink)  
Old 04-02-2008
Brianna Young's Avatar
Brianna Young Brianna Young is offline
Junior Member
Small Business Design Blog: RescueTime - Indie Business Productivity
 
Join Date: Sep 2007
Location: Oklahoma
Posts: 279
Default Decoding an encoded footer?
I am working on a Wordpress-based site and I need to modify the footer to include copyright information. However, it's all encoded with yucky code and I can't find any support for how to rebuild the PHP file. I'm guessing that's what I will need to do?

I'd rather not share the URL here since the site isn't complete...

Thanks in advance!
__________________
Brianna Young, VA and Graphic Artist
www.virtualsolutionsadmin.com
"It's not the piano that makes beautiful music. It's the person sitting AT the piano!"
Reply With Quote
    #2 (permalink)  
Old 04-02-2008
Codehead Codehead is offline
Contributing Member
 
Join Date: Apr 2007
Location: Portland, Oregon
Posts: 177
Default Re: Decoding an encoded footer?
I know that many of those encoded footers in WP themes are encoded using base 64 algorithm.
If you have access to a host that supports PHP, you can easily decode the code and see how it looks like.
To do this, make a new PHP file like this:
PHP Code:
<?php
echo base64_decode('COPY AND PASTE THE YUCKY ENCODED CODE HERE');
?>
This will decode the code for you, assuming it's encoded using base 64 algorithm.

The other way is to use CSS and absolute positioning to put your copyright notice anywhere you want. I think you know enough CSS to do that but here is a short description.

You will have to wrap the whole page around a DIV which looks like this

HTML Code:
#wrapper {
   /* Code */
   position:relative;
}

#copyright-notice {
   position:absolute;
   top:-100px; /* Use this to move it down */
   left:200px; /* Use this to move it left or right */
}
I hope this makes sense
Reply With Quote
    #3 (permalink)  
Old 04-02-2008
Brianna Young's Avatar
Brianna Young Brianna Young is offline
Junior Member
Small Business Design Blog: RescueTime - Indie Business Productivity
 
Join Date: Sep 2007
Location: Oklahoma
Posts: 279
Default Re: Decoding an encoded footer?
Thank you Hamid, that does help!

I'm going to try this and I'll post back! Thanks!!
__________________
Brianna Young, VA and Graphic Artist
www.virtualsolutionsadmin.com
"It's not the piano that makes beautiful music. It's the person sitting AT the piano!"
Reply With Quote
    #4 (permalink)  
Old 04-02-2008
Brianna Young's Avatar
Brianna Young Brianna Young is offline
Junior Member
Small Business Design Blog: RescueTime - Indie Business Productivity
 
Join Date: Sep 2007
Location: Oklahoma
Posts: 279
Default Re: Decoding an encoded footer?
Ok, so adding the base64_decode did work, but it left this: �XM ѓ�+�W�����-y��r�r�(!�V�N�޽��y��w����y�z� b��z+,����\���bn+^w�

in the sidebar of the theme. Part of the reason I want to get rid of this footer is because it contains links that no longer work. So whatever I can do to remove it without the template going all wacky, I'll do!

Thanks a ton!!
__________________
Brianna Young, VA and Graphic Artist
www.virtualsolutionsadmin.com
"It's not the piano that makes beautiful music. It's the person sitting AT the piano!"
Reply With Quote
    #5 (permalink)  
Old 04-02-2008
Codehead Codehead is offline
Contributing Member
 
Join Date: Apr 2007
Location: Portland, Oregon
Posts: 177
Default Re: Decoding an encoded footer?
This is encoded in some other way, it can be a mix of algorithms, I can't help you decode it without seeing the code, can you post the footer here?

Can you also take a look at the bottom of the index.php in the theme folder and let me know what the last line is?
Reply With Quote
    #6 (permalink)  
Old 04-02-2008
Brianna Young's Avatar
Brianna Young Brianna Young is offline
Junior Member
Small Business Design Blog: RescueTime - Indie Business Productivity
 
Join Date: Sep 2007
Location: Oklahoma
Posts: 279
Default Re: Decoding an encoded footer?
Sure thing!

I couldn't post the code in this post because it said it's too long. If there's another way to get it to you, let me know!

Here's the bottom of index.php:

Code:
<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
		</div>

	<?php else : ?>

		<div class="post">
			<h1 class="title">Not Found</h1>
			<p>You are looking for something that isn't here.</p>
		</div>

	<?php endif; ?>	

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
Thanks, Hamid! You're the best!
__________________
Brianna Young, VA and Graphic Artist
www.virtualsolutionsadmin.com
"It's not the piano that makes beautiful music. It's the person sitting AT the piano!"
Reply With Quote
    #7 (permalink)  
Old 04-02-2008
Codehead Codehead is offline
Contributing Member
 
Join Date: Apr 2007
Location: Portland, Oregon
Posts: 177
Default Re: Decoding an encoded footer?
1 - In WP folder go to:
WP Folder > wp-includes
Then open the file general-template.php and find:
PHP Code:
function get_footer() {
    
/* Some Code */
} 
Copy and paste this in your post.

2 - In the same folder (WP Folder > wp-includes) open the file theme.php and find:

PHP Code:
function load_template($_template_file) {
   
/* Some code here */
} 
Please reply with these 2 bits of code so I can see if I can help you any further without actually seeing the code.
Reply With Quote
    #8 (permalink)  
Old 04-02-2008
Brianna Young's Avatar
Brianna Young Brianna Young is offline
Junior Member
Small Business Design Blog: RescueTime - Indie Business Productivity
 
Join Date: Sep 2007
Location: Oklahoma
Posts: 279
Default Re: Decoding an encoded footer?
This is what is at the bottom of my general-template.php:
Code:
function wp_admin_css_uri( $file = 'wp-admin' ) {
	if ( defined('WP_INSTALLING') )
	{
		$_file = add_query_arg( 'version', get_bloginfo( 'version' ), "./$file.css" );
	} else {
		$_file = add_query_arg( 'version', get_bloginfo( 'version' ), get_option( 'siteurl' ) . "/wp-admin/$file.css" );
	}
	return apply_filters( 'wp_admin_css_uri', $_file, $file );
}

function wp_admin_css( $file = 'wp-admin' ) {
	echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file );
	if ( 'rtl' == get_bloginfo( 'text_direction' ) ) {
		$rtl = ( 'wp-admin' == $file ) ? 'rtl' : "$file-rtl";
		echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $rtl ) . "' type='text/css' />\n", $rtl );
	}
}

?>
This is at the bottom of theme.php:

Code:
function add_custom_image_header($header_callback, $admin_header_callback) {
	if ( ! empty($header_callback) )
		add_action('wp_head', $header_callback);

	if ( ! is_admin() )
		return;
	require_once(ABSPATH . 'wp-admin/custom-header.php');
	$GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback);
	add_action('admin_menu', array(&$GLOBALS['custom_image_header'], 'init'));
}

?>
__________________
Brianna Young, VA and Graphic Artist
www.virtualsolutionsadmin.com
"It's not the piano that makes beautiful music. It's the person sitting AT the piano!"
Reply With Quote
    #9 (permalink)  
Old 04-02-2008
Codehead Codehead is offline
Contributing Member
 
Join Date: Apr 2007
Location: Portland, Oregon
Posts: 177
Default Re: Decoding an encoded footer?
Briana, I meant inside general-template.php search for "function get_footer" and you will see a bit of code that looks like this:

PHP Code:
function get_footer() {
   
/* Some Code */
} 
I want you to copy and paste this code for me.

Also in theme.php search for "function load_template" and copy and paste:
PHP Code:
function load_template($_template_file) { 
   
/* Some code here */ 
} 
In your post
Reply With Quote
    #10 (permalink)  
Old 04-02-2008
Codehead Codehead is offline
Contributing Member
 
Join Date: Apr 2007
Location: Portland, Oregon
Posts: 177
Default Re: Decoding an encoded footer?
Can you also post the first few lines of the footer.php, in your themes folder?
Reply With Quote
Reply

« Previous Thread | Next Thread »
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Forum Rules


All times are GMT -4. The time now is 06:32 PM.

Virtual Assistant Forums Advertising
Featured VA websites:

ActVA!

Solstice Travel

Robin Bellows Consulting
Get featured!
Virtual Assistant Business Retreat
Create a Professional New Client Welcome Packet
Virtual Assistant Forums Advertising
Work from Home | Become A Virtual Assistant

© Virtual Assistant Forums 2013
All content and images are protected under copyright law and may not be reproduced in any way without express written consent.