|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Hello
I want to add two extra fields to the listings that I can enter an external link in the same way that the Website Field is setup. I tried adding a new extra field and entering the html code for the link but when it showed in the listing it was not clickable the way the Website field is. It only showed the text. Can anyone tell me how to do it. Thanks for any help. Cheers Hugh |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125 ![]() |
Hugh,
I have just recently made this same change. I will see if I can't locate the code tommorow and let you know how I did it.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Cheers Eric
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Hello Eric
Did you come across that code yet Cheers mate Hugh |
|
|
|
|
|
#5 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125 ![]() |
Sorry I got side tracked.
I believe how I did was like this: Code:
{if isset($extras.value)}
{foreach key=key item=item from=$extras.value}
{if $extras.fID==4 || $extras.fID==5}
{$item|linkurl:30}
{else}
{$item}
{/if}
{/foreach}
{/if}
{if $extras.fID==4 || $extras.fID==5} To get these values you should be able to place {$extras.fID} before the {$item}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Hello Eric
Thanks for the code Which file to I find the code in, or do I have to insert this code into a file? Sorry for the dumb question, but I am new to PHP. Cheers Hugh |
|
|
|
|
|
#7 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125 ![]() |
Sorry I should have included that.
It will be the template file viewlistings.tpl.php or viewlistings2.tpl.php the first one is the standard with the images on the side where viewlistings2 has the images on top.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#8 | |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Hello Eric
I am just about to try this. Quote:
I had a look in the administration section but could not find them there. Cheers Hugh |
|
|
|
|
|
|
#9 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125 ![]() |
To get these values you should be able to place the following:
ID: {$extras.fID} Before {$item} In that same file. If nothing is printed then let me know because there might be another step I am missing. Also are you running the developer edition?
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Apr 2006
Posts: 126
Rep Power: 17 ![]() |
Hello Eric
Yes I am running the Developer version. I looked all through viewlisting.tpl.php and there is no mention of id for the extra fields. I inserted {if isset($extras.value)} {foreach key=key item=item from=$extras.value} {if $extras.fID==4 || $extras.fID==5} {$item|linkurl:30} {else} {$item} {/if} {/foreach} {/if} into line 60 before the {$item} but it made no difference. The example page I want to have the clickable field is the Six Generation Pedigree:field on http://www.thoroughbreddiaries.com/v...ing.php?view=3 Any idea where I would find the id for the extra fields, or do I need to do something else. Cheers Hugh |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extra Field | Misiu02 | v3.1 Modules & Modifications | 2 | 10-24-2006 01:33 PM |
| Enabled extra field and pdf file keeps "falling out" of previous listings | sedonagate | v3.1 Questions & Support | 3 | 09-21-2006 09:50 PM |
| Select field problem (extra field --> drop down list) | pat01 | v3.1 Questions & Support | 1 | 08-10-2006 03:05 AM |
| Displaying extra field in Search and category listings | Bucketman | v3.0 Questions & Support | 3 | 04-26-2006 10:48 AM |