View Full Version : Custom Fields, Sign Up Price data
Shannon Hutcheson
11-17-2006, 09:25 PM
I had 2 custom fields and specific prices for sponsored, featured, etc..
Gone now with the upgrade. I see the custom fields in the language file, but how do I get them to show back up on the listings?
Dave Baker
11-17-2006, 11:20 PM
Hello Shannon,
If you created field with name "field2".
***Open link-display.tpl and find line of code***
<div class="description">{if $config.html_tags}{$link.description}{else}{text_h tml aText=$link.description}{/if}</div>
***Below/before add***
<div class="field2">{$link.field2}</div>
***Save file***
Shannon Hutcheson
11-18-2006, 02:24 AM
Thanks for the reply. I did find what I was looking for on view-link.tpl
my old view-link.tpl within the div 'box'
<div class="box">
<div class="box-content">
<table cellpadding="2" cellspacing="0">
<tr>
<td width="150"><strong>{$lang.category}:</strong></td>
<td><a href="{if $config.mod_rewrite}{$category.path}/{else}index.php?category={$category.id}{/if}" class="cat-url">{$category.title}</a></td>
</tr>
{foreach from=$fields item=field}
{assign var="key" value=$field.name}
{assign var="show" value='1'}
{if 'Breeds' == $key && ('' == $link.$key || '' == $link.$key)}{assign var="show" value='0'}{/if}
{if 'Registry' == $key && ('' == $link.$key || '' == $link.$key)}{assign var="show" value='0'}{/if}
{if '1' == $show}
<tr>
<td><strong>{$lang.$key}:</strong></td>
<td>
{if $link.$key}
{if $field.type eq 'textarea' AND $config.esc_codes}
{text_to_html aText=$link.$key aParagraph=true}
{elseif $field.type eq 'checkbox'}
{array_to_lang values=$link.$key}
{else}
{if ($link.$key eq $field.default) AND (($field.type neq 'textarea') AND ($field.type neq 'text'))}
{assign var="lang_key" value=$field.default}
{$lang.$lang_key}
{else}
{if ($field.type neq 'textarea') AND ($field.type neq 'text')}
{assign var="lang_key" value=$link.$key}
{$lang.$lang_key}
{else}
{$link.$key}
{/if}
{/if}
{/if}
{else}
{$lang.not_available}
{/if}
</td>
</tr>
{/if}
{/foreach}
<tr>
<td><strong>{$lang.clicks}:</strong></td>
<td>{$link.clicks}</td>
</tr>
<tr>
<td><strong>{$lang.link_added}:</strong></td>
<td>{$link.date|date_format:$config.date_format}</td>
</tr>
{if $config.pagerank}
<tr>
<td><strong>{$lang.pagerank}:</strong></td>
<td>{print_pagerank pr=$link.pagerank}</td>
</tr>
{/if}
{if $link.rank neq '0'}
<tr>
<td><strong>{$lang.link_rank}:</strong></td>
<td>{section name=star loop=$link.rank}<img src="{$img}star.png" alt="" />{/section}</td>
</tr>
{/if}
</table>
<table cellpadding="2" cellspacing="0">
<tr>
<td valign="top" style="padding: 0 0 0 10px;" >
{if $config.thumbshot}
<div class="preview"><img src="http://open.thumbshots.org/image.pxf?url={$link.url}\" /></div>
{/if}
{if $config.alexa_thumbs}
<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&size=small&url={$link.url}" />
{/if}
</td>
{if $config.alexa_traffic}
<td>
<script type="text/javascript" src="http://xsltcache.alexa.com/traffic_graph/js/g/a/1m?amzn_id=esyndicatfree-20&u={$link.url}"></script>
</td>
{/if}
</tr>
</table>
</div>
</div>
My customized aqua template div 'box'
I can't figure out where to put the custom field portions
<div class="box">
<div class="box-content">
<table cellpadding="2" cellspacing="0">
<tr>
<td width="150"><strong>{$lang.category}:</strong></td>
<td><a href="{if $config.mod_rewrite}{$category.path}/{else}index.php?category={$category.id}{/if}" class="cat-url">{$category.title}</a></td>
</tr>
{foreach from=$fields item=field}
{assign var="key" value=$field.name}
<tr>
{assign var="field_name" value='field_'|cat:$field.name}
<td><strong>{$lang.$field_name}:</strong></td>
<td>
{if $link.$key || ($link.$key eq '0')}
{if ($field.type eq 'text') || ($field.type eq 'textarea')}
{if $config.html_tags}
{$link.$key}
{else}
{text_html aText=$link.$key}
{/if}
{elseif $field.type eq 'checkbox'}
{array_to_lang values=$link.$key name=$field.name}
{elseif $field.type eq 'storage'}
<a href="{$config.base}{$config.dir}uploads/{$link.$key}">{$lang.download}</a>
{elseif $field.type eq 'image'}
<img src="{$config.base}{$config.dir}uploads/{$link.$key}" width="{$field.image_width}" height="{$field.image_height}" />
{elseif $field.type eq 'combo'}
{assign var="field_combo" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_combo}
{elseif $field.type eq 'radio'}
{assign var="field_radio" value="field_"|cat:$field.name|cat:'_'|cat:$link.$key}
{$lang.$field_radio}
{/if}
{else}
{$lang.not_available}
{/if}
</td>
</tr>
{/foreach}
<tr>
<td><strong>{$lang.clicks}:</strong></td>
<td>{$link.clicks}</td>
</tr>
<tr>
<td><strong>{$lang.link_added}:</strong></td>
<td>{$link.date|date_format:$config.date_format}</td>
</tr>
{if $config.pagerank}
<tr>
<td><strong>{$lang.pagerank}:</strong></td>
<td>{print_pagerank pr=$link.pagerank}</td>
</tr>
{/if}
{if $link.rank neq '0'}
<tr>
<td><strong>{$lang.link_rank}:</strong></td>
<td>{section name=star loop=$link.rank}<img src="{$img}star.png" alt="" />{/section}</td>
</tr>
{/if}
</table>
<table cellpadding="2" cellspacing="0">
<tr>
<td valign="top" style="padding: 0 0 0 10px;" >
{if $config.thumbshot}
<div class="preview"><img src="http://open.thumbshots.org/image.pxf?url={$link.url}" /></div>
{/if}
</td>
{if $config.alexa_traffic}
<td>
<script type="text/javascript" src="http://xsltcache.alexa.com/traffic_graph/js/g/a/1m?amzn_id=esyndicatfree-20&u={$link.url}"></script>
</td>
{/if}
</tr>
</table>
</div>
</div>
Shannon Hutcheson
11-18-2006, 02:34 AM
The same fields must be added to suggest-link.tpl
Shannon Hutcheson
11-18-2006, 07:47 AM
Resolved this myself.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.