PDA

View Full Version : Reciprocal Linking To Pages or Categories not Index


fjean
05-04-2006, 04:08 AM
I've seen adult websites do this. I want the link submitter to link to the category url instead of the sites index/home page.

example: Business To Business (http://www.allwebplaces.com/business-and-economy/business-to-business/)

how to link back to the category where the link is going to be?

Nick Collins
05-04-2006, 04:44 AM
Unfortunately we have no such functional by default. You can do it yourself or order a custom mod by us.

fjean
05-04-2006, 04:56 AM
all it took was a little patience

this is my actual suggested-link.tpl


{include file="header.tpl"}

<h1>{$lang.suggest_link}</h1>

{if $category.locked}
<div class="error">{$lang.error_category_locked}</div>
{else}

{if $msg}
<div class="error">{$msg}</div>
{/if}

<div class="box">
<div class="box-content">

<form action="suggest-link.php?id={$smarty.get.id}" method="post" name="suggest_link" enctype="multipart/form-data" id="suggest_link">

{if $config.sponsored_links AND $plans}
<div class="payment">
<p class="field"><input type="radio" name="plan" value="0" id="p0" {if not $smarty.post.plan}checked="checked"{/if}/>
<label for="p0">{$lang.free}</label></p>
{foreach from=$plans item=plan}
<p class="field"><input type="radio" name="plan" value="{$plan.id}" id="p{$plan.id}" {if $smarty.post.plan eq $plan.id}checked="checked"{/if}/>
<label for="p{$plan.id}">{$lang[$plan.name]} - {$config.currency_symbol}{$plan.cost}</label></p>
{/foreach}
</div>
{/if}

{if $config.categories_list}
<p class="field">{$lang.category}:

<select name="id_category">
{$categories_list}
</select>
</p>
{else}
{$lang.suggest_link_top1}

{$category.title} ({if $config.mod_rewrite}{$category.path}/{else}index.php?category={$category.id}{/if})

{$lang.suggest_link_top2}
{/if}

{foreach from=$fields item=field}
{assign var="key" value=$field.name}

{if ($key eq 'email') AND $editor}
<input type="hidden" name="email" value="{$editor.email}" id="{$key}" />
{else}
<p class="field">
{$lang.$key}:

{/if}

{if $field.type eq 'text'}
{if $key eq 'email' AND $editor}
{else}
<input type="text" name="{$key}" value="{if $link.$key}{$link.$key}{else}{$field.default}{/if}" size="30" id="{$key}" />

{/if}
{elseif $field.type eq 'textarea'}
{if $field.name eq 'description'}
<textarea name="description" cols="60" rows="8" onKeyDown="textCounter(document.suggest_link.description,docu ment.suggest_link.length,{$config.description_max_ chars})" onKeyUp="textCounter(document.suggest_link.description,docu ment.suggest_link.length,{$config.description_max_ chars})">{if $link.$key}{$link.$key}{else}{$field.default}{/if}</textarea>

<input type="text" name="length" size="3" maxlength="3" value="{$config.description_max_chars}" readonly /> {$lang.characters_left}

{else}
<textarea name="{$key}" cols="60" rows="8" id="{$key}">{if $link.$key}{$link.$key}{else}{$field.default}{/if}</textarea>

{/if}



<font size="3" color="red">If you wish to link back, please use the following code on your site</font></p>


<textarea cols="90" rows="4">
Listed @ {$category.title} category on Allwebspiders.com ({if $config.mod_rewrite}http://www.allwebplaces.com/{$category.path}/{else}index.php?category={$category.id}{/if})</textarea></p>
<font size="3" color="red">or link to</font>

{if $config.mod_rewrite}http://www.allwebplaces.com/{$category.path}/{else}index.php?category={$category.id}{/if}</a>

{elseif $field.type eq 'combo'}
<select name="{$field.name}">
{foreach from=$field.values item=combo}
{if $combo eq $field.default}
{assign var="selected" value='selected="selected"'}
{else}
{assign var="selected" value=''}
{/if}
<option value="{$combo}" {$selected}>{$lang.$combo}</option>
{/foreach}
</select>
{elseif $field.type eq 'radio'}
{foreach from=$field.values item=radio}
{if $radio eq $field.default}
{assign var="checked" value='checked="checked"'}
{else}
{assign var="checked" value=''}
{/if}
<input type="radio" name="{$key}[]" id="r{$radio}" {$checked}/><label for="r{$radio}">{$lang.$radio}</label>
{/foreach}
{elseif $field.type eq 'checkbox'}
{foreach from=$field.values item=checkbox}
<input type="checkbox" name="{$key}[]" value="{$checkbox}" id="ch{$checkbox}" {in_array_exist values=$field.default def=$checkbox} {if $result_valid}checked="checked"{/if} /><label for="ch{$checkbox}">{$lang.$checkbox}</label>
{/foreach}
{elseif $field.type eq 'storage'}
<input type="file" name="{$key}" id="{$key}" size="30" />
{/if}</p>
{/foreach}

{if $config.captcha}
<p class="field">{$config.base}{$config.dir}plugins/captcha/image.php
<input type="text" name="security_code" /></p>
{/if}

<input type="submit" name="verify_info" value="{$lang.suggest_link}" />
</form>

</div>
</div>

{literal}
<script type="text/javascript">

function textCounter(field,cntfield,maxlimit)
{
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
cntfield.value = maxlimit - field.value.length;
}
</script>
{/literal}

{/if}

{include file="footer.tpl"}


Getting other sites to link to pages or categories instead of pointing to the index/home page increases your pages PR and more to come. You can always submit your index page to other directories but not pages/or categories

fjean
05-04-2006, 04:57 AM
:D OH yeah, by the way i'm running pro version 1.2

Nick Collins
05-16-2006, 04:36 AM
I have understood you, fjean... but I'm not sure if it's a good idea to post your file code here. Maybe we will include this feature in our next version.