Page 1 of 1

Split links.php

Posted: Sat Jun 28, 2008 4:08 pm
by Joker7
Hi-
This is what I've been looking for .but I have one small problem :( Is it possible to split the add link form on "links.php" so this can be called by a link.Ie so it only shows the links and not links and add links form.

I hope someone understands that :) LOL


Chris

Posted: Sat Jun 28, 2008 5:13 pm
by Klemen
Emm, have you tried setting Show "Add a link form": to NO in Settings?

Posted: Sat Jun 28, 2008 5:34 pm
by Joker7
Klemen wrote:Emm, have you tried setting Show "Add a link form": to NO in Settings?
Great thanks for the fast reply.

Yes have tried this but then theres no link to add a new link..

Chris

Posted: Sat Jun 28, 2008 5:54 pm
by Klemen
Well you can use the form.html as the add a link form (you can modify the look as much as you want) and then simply add a link to header.txt or footer.txt, something like:

Code: Select all

<p><a href="form.html">Add your link</a></p>
Or in links.php below

Code: Select all

require_once('header.txt');
add something like

Code: Select all

?>
<p><a href="form.html">Add your link</a></p>
<?php

Posted: Sat Jun 28, 2008 6:11 pm
by Joker7
form.html hasn't the reciprocal links form..

Chris

Posted: Sat Jun 28, 2008 7:49 pm
by Klemen
Of course it has, download the original file again if your's edited.

Posted: Sat Jun 28, 2008 8:13 pm
by Joker7
I can't see it maybe I have missed something...

Chris

Code: Select all

<html>

<head>
<title>Add a link</title>
<style type="text/css">

body, td, p {
        background-color : #FFFFFF;
        color : #000000;
        font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
        font-size : 12px;
}

</style>
</head>

<body>

<p>Use the form below to submit your link. All fields are required.</p>

<p><i>Please add a link to our website to your links page before
submitting this form!</i></p>

<form method="POST" action="addlink.php">

<table border="0">
<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>
</table>

<p><b>Website description:</b><br>
<input type="text" name="description" maxlength="200" size="60"></p>

<p><input type="submit" value="Add link"></p>

</form>


</body>

</html>

Posted: Sun Jun 29, 2008 9:13 am
by Klemen

Code: Select all

<form method="POST" action="addlink.php"> 

<table border="0"> 
<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> 
</table> 

<p><b>Website description:</b><br> 
<input type="text" name="description" maxlength="200" size="60"></p> 

<p><input type="submit" value="Add link"></p> 

</form> 
This is the reciprocal links form. You probably have something else in mind, but I don't know what. Post an example/screenshot...

Posted: Sun Jun 29, 2008 11:02 am
by Joker7
Here we go....
Cheers
Chris

Image

Posted: Sun Jun 29, 2008 2:28 pm
by Klemen
Oh, you mean the generated code. You will have to create that manually on the form.html page, you can simply copy the html code from your links.php file when opened in browser and paste it to form.html.

Posted: Sun Jun 29, 2008 6:34 pm
by Joker7
This seems to work ok if anyone else needs it.

Chris

Code: Select all

<html>

<head>
<title>Add a link</title>
<style type="text/css">

body, td, p {
        background-color : #FFFFFF;
        color : #000000;
        font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
        font-size : 12px;
}

</style>
</head>

<body>
<?php

define('IN_SCRIPT',1);
require('settings.php')

	?>
<p>Use the form below to submit your link. All fields are required.</p>

<p><i>Please add a link to our website to your links page before
submitting this form!</i></p>

<p><textarea rows="4" cols="60" onfocus="this.select()"><a href="<?php echo $settings['site_url']; ?>"><?php echo htmlspecialchars($settings['site_title']); ?></a> - <?php echo htmlspecialchars($settings['site_desc']); ?></textarea></p>

    <p><b>&raquo; Step 2: Submit your link</b></p>

    <p>All fields are required. Please finish <b>Step 1</b> before submitting this form.

    <form method="post" action="addlink.php">

    <table border="0">
    <tr>
    <td class="comb"><b>Your name:</b></td>
    <td><input type="text" name="name" size="40" maxlength="50"></td>
    </tr>
    <tr>
    <td class="comb"><b>E-mail:</b></td>
    <td><input type="text" name="email" size="40" maxlength="50"></td>
    </tr>
    <tr>
    <td class="comb"><b>Website title:</b></td>
    <td><input type="text" name="title" size="40" maxlength="50"></td>
    </tr>
    <tr>
    <td class="comb"><b>Website URL:</b></td>
    <td><input type="text" name="url" maxlength="100" value="http://" size="40"></td>
    </tr>
    <tr>
    <td class="comb"><b>URL with reciprocal link:</b></td>
    <td><input type="text" name="recurl" maxlength="100" value="http://" size="40"></td>
    </tr>
    </table>

    <p><b>Website description:</b><br>
    <input type="text" name="description" maxlength="200" size="60">
	<br>Max characters 200</p>

    <p><input type="submit" value="Add link"></p>

    </form>

</body>

</html>