Support Forums


Go Back   68 Classifieds Forums > General > HTML, CSS, and Design Help

 
LinkBack Thread Tools Display Modes
Old 04-09-2006, 07:40 PM   #1
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default Adding an Extra Field that is clickable

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
sporthorsebreeder is offline   Reply With Quote
Old 04-10-2006, 12:02 AM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 04-10-2006, 07:06 AM   #3
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default

Cheers Eric
sporthorsebreeder is offline   Reply With Quote
Old 04-11-2006, 01:12 PM   #4
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default

Hello Eric
Did you come across that code yet
Cheers mate
Hugh
sporthorsebreeder is offline   Reply With Quote
Old 04-11-2006, 01:21 PM   #5
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

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}
You would change this line to the field id of the extra fields.
{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
Eric Barnes is offline   Reply With Quote
Old 04-11-2006, 03:41 PM   #6
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default

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
sporthorsebreeder is offline   Reply With Quote
Old 04-11-2006, 03:57 PM   #7
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 04-11-2006, 06:46 PM   #8
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default

Hello Eric
I am just about to try this.

Quote:
You would change this line to the field id of the extra fields.
{if $extras.fID==4 || $extras.fID==5}
Where do I find the field id for the extra fields.
I had a look in the administration section but could not find them there.
Cheers
Hugh
sporthorsebreeder is offline   Reply With Quote
Old 04-11-2006, 06:48 PM   #9
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,377
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 04-11-2006, 07:24 PM   #10
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 17
sporthorsebreeder will become famous soon enough
Default

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
sporthorsebreeder is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 08:59 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0