68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > Text too long
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#1)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default Text too long - 02-20-2007, 10:36 PM

How do you control the feature title text length on the front page? By either making it wrap (I guess this would be controlled by the TD width) or by giving it a limit withe the ... at the end.
Reply With Quote
(#2)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,827
Join Date: Mar 2006
Location: Belmont, NC
Default 02-20-2007, 10:47 PM

You could use the Smarty truncate function to accomplish this:
http://smarty.php.net/manual/en/lang...r.truncate.php


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#3)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default 02-21-2007, 06:45 PM

Where do I edit this? in the home.tpl.php
Reply With Quote
(#4)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default 02-23-2007, 09:54 PM

Humn, nobody knows this answer above?

PHP Code:
{feature_listings_horizontal number=8 cols=3 table_attr='width="100%" style="border: 1px solid #000;"' td_attr='valign="middle" align="center"'}
Reply With Quote
(#5)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,827
Join Date: Mar 2006
Location: Belmont, NC
Default 02-23-2007, 11:02 PM

If that is the portion you are wanting to change you will have to truncate it through the Smarty plugin and will not be able to do it through the template file.

This file will not be encrypted however you will need to be familiar with php to alter it.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#6)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default 02-25-2007, 05:15 PM

Quote:
Originally Posted by suzkaw View Post
If that is the portion you are wanting to change you will have to truncate it through the Smarty plugin and will not be able to do it through the template file.

This file will not be encrypted however you will need to be familiar with php to alter it.
I am familiar with PHP. Well since you did not tell me what and where to edit. After several days of tracking it down going through what code that is not encrypted, I finally found it. Now is it possible for you to tell me what to add to this line, to limit the text output?

Code:
$output.=$loop[$x][title] ."<br />";
Reply With Quote
(#7)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default 02-28-2007, 06:35 PM

I'm gonna keep asking until somebody answers me, sorry.

Where in the functions.feature_listings_horizontal.php is this done to make the title text limited?
Reply With Quote
(#8)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,827
Join Date: Mar 2006
Location: Belmont, NC
Default 02-28-2007, 08:18 PM

I thought you found the answer?

You the code you posted is the title so you will need to use some type of php function to trim it to the amount of characters you want.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#9)
Old
fmuscia fmuscia is offline
Junior Member
fmuscia is on a distinguished road
 
Posts: 11
Join Date: Feb 2007
Default 02-28-2007, 08:53 PM

Quote:
Originally Posted by suzkaw View Post
I thought you found the answer?

You the code you posted is the title so you will need to use some type of php function to trim it to the amount of characters you want.
Looking at my above posts. I never said I found the answer. I said I found where the code should be MODDED and asked for help. Still no help...
Reply With Quote
(#10)
Old
gregbatch gregbatch is offline
Senior Member
gregbatch is on a distinguished road
 
Posts: 121
Join Date: Jun 2006
Default 02-28-2007, 09:02 PM

Replace:

$output.=$loop[$x][title] ."<br />";

With:

$limit = '25'; // Set to your preference
$textin = $loop[$x][title];
if(strlen($textin)>$limit){
$textin = substr($textin,0,$limit);
$textout = substr($textin,0,-(strlen(strrchr($textin,' '))) )."…";}
else{$textout = $textin;}
$output.=$textout ."<br />";


This shortens the string to whatever you specify as the limit, drops any word fragment, and ads the ellipsis (…)


Greg
3.1.4 Designer
www.valleywantads.com

Last edited by gregbatch : 02-28-2007 at 09:33 PM. Reason: correction
Reply With Quote


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Test message above extra text on catagory breda v3.1 Questions & Support 1 12-01-2006 08:44 AM
Renewal E-mails... HTML or Plain Text? flyingpylon v3.1 Questions & Support 2 11-01-2006 03:24 PM
How do I make it so people can input text in the price field...... sbuell20 v3.1 Questions & Support 1 08-05-2006 06:24 PM
Text above page build Template Design Questions 7 04-21-2006 08:31 AM
Text to Long build v3.0 Questions & Support 15 04-20-2006 02:11 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com