Support Forums

Making title of featured items on front page links

This is a discussion on Making title of featured items on front page links within the Technical Support forums, part of the Technical Support Forums category; Hi, In my showlistings.tpl i have this code for the title and price: <a href="{$entry.link}" style="text-decoration: none">{$entry.title}</a> This creates a ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 08-05-2008, 03:54 AM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,086
Rep Power: 33
bowers01 is on a distinguished road
Default Making title of featured items on front page links

Hi,
In my showlistings.tpl i have this code for the title and price:
<a href="{$entry.link}" style="text-decoration: none">{$entry.title}</a>
This creates a nice link with no underline. I would like this for my featured ads on the front page. At current the photo is the only thing with a link so i would like to add this code.
Where do i add this to get the title and price to be a link? will i need to change that code?
Cheers,
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 08-05-2008, 08:44 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,382
Rep Power: 135
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

If you are talking about the ads displayed at the bottom of the front page, they are handled by the smarty plugin....

/includes/classes/smarty/plugins/function.feature_listings_horizontal.php
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 08-06-2008, 01:51 AM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,086
Rep Power: 33
bowers01 is on a distinguished road
Default

Hi,
Thanks for that.
In That document the "title" comes up a few times.
Where should i be putting this?
Cheers
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 08-30-2008, 12:47 PM   #4
Member
 
Join Date: Mar 2006
Posts: 26
Rep Power: 21
topbidz is on a distinguished road
Default

Nick

I checked out your site http://www.truckandmachinery.com.au/ and saw that you were able to get the title and price links to work. I would like to be able to do that also. Could you share that code and where you put it?


Thanks
__________________
John W
v4.0.7 Developer
topbidz is offline  
Old 08-30-2008, 08:29 PM   #5
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,086
Rep Power: 33
bowers01 is on a distinguished road
Default

Hi,
I am not sure on what the code was before hands o i copied a whole chunk so you can find where it is.
Code:
if ($x<$loop_count) 
			{
				//format the link
				if(defined('SEO'))
				{
					$listing_title=$loop[$x][title];
					$listing_title=str_replace(' ', '_', $listing_title);
					$listing_title=preg_replace('/\W/e', '', $listing_title);
					$link="listing/".$loop[$x][id]."/".$listing_title.".html";	
				}
				else
				{
					$link="viewlisting.php?view=". $loop[$x][id];
				}
				//start td
				$output .= "<td" . smarty_function_html_table_cycle_68('td', $td_attr, $c) . ">";
					//start image
					$output.="<a href='". $link ."'><img src='".$loop[$x][image]."' border='0' alt='".$loop[$x][title]."' /></a><br />";
				//close td
				//$output.="</td>";
				//new td
				//$output .= "<td" . smarty_function_html_table_cycle_68('td', $td_attr, $c) . ">";
					//text
					$output.="<a href='". $link ."' class=\"showlistings\" style='text-decoration: none'>".$loop[$x][title] ."</a><br />";
					if($show_price=='Y')
					{
					$output.= "<b><a href='". $link ."' style='text-decoration: none'>".$loop[$x][price] ."</a></b>";
					}
				//close td
				$output.="</td>\n";
            } 
			else 
			{
				$output .= "<td" . smarty_function_html_table_cycle_68('td', $td_attr, $c) . ">" . $trailpad . "</td>\n";
				$output .= "<td" . smarty_function_html_table_cycle_68('td', $td_attr, $c) . ">" . $trailpad . "</td>\n";
            }
        }
        $output .= "</tr>\n";
    }
    $output .= "</table>\n";
    return $output;
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 08-30-2008, 08:35 PM   #6
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,228
Rep Power: 66
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

I haven't tested this, but this should work just fine. You must have the developers version to do this.

In the file called "function.feature_listings_horizontal.php" around line 137 find this:
PHP Code:
    $output.=$loop[$x][title] ."<br />";
if(
$show_price=='Y')
{
$output.= $loop[$x][price];

Replace with this:
PHP Code:
    //modification to add link for the title and price
$output.="<a href='"$link ."'>";
$output.=$loop[$x][title] ."<br />";
if(
$show_price=='Y')
{
$output.= $loop[$x][price];
}
$output.="</a>"
Hope that works and helps!
-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 08-30-2008, 08:38 PM   #7
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,086
Rep Power: 33
bowers01 is on a distinguished road
Default

Hi,
You dont need developer to get to function.feature_listings_horizontal.php
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 08-30-2008, 08:45 PM   #8
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,228
Rep Power: 66
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by bowers01
Hi,
You dont need developer to get to function.feature_listings_horizontal.php
Nick
My bad, I was under the impression that all ".php" files were encrypted in the Designer versions.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 08-30-2008, 10:44 PM   #9
Member
 
Join Date: Mar 2006
Posts: 26
Rep Power: 21
topbidz is on a distinguished road
Default

Thanks for the help Nick and Mike. The links are working great now.
__________________
John W
v4.0.7 Developer
topbidz is offline  
Old 08-31-2008, 09:13 PM   #10
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,165
Rep Power: 78
seymourjames is a jewel in the rough
Default

If you want to make it look like this

french property for sale

then PM me. There is a nice function to do it and 3 lines of CSS.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates and list your 68C site on ClassifiedCodes.com
seymourjames is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newest Listing Featured on front Page? newcastledirectory Technical Support 11 05-12-2008 09:38 PM
Getting Google To Re-Index A Page After Title Change? bgordon Site Marketing 9 05-15-2007 12:04 AM


All times are GMT -4. The time now is 09:26 PM.


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