Split links.php

Problems installing LinkMan?
Post Reply
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Split links.php

Post 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
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Emm, have you tried setting Show "Add a link form": to NO in Settings?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Post 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
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Post by Joker7 »

form.html hasn't the reciprocal links form..

Chris
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Of course it has, download the original file again if your's edited.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Post 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>
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post 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...
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Post by Joker7 »

Here we go....
Cheers
Chris

Image
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Joker7
Posts: 6
Joined: Sat Jun 28, 2008 4:01 pm

Post 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>
Post Reply