...

View Full Version : Limiting the size of specialized topic titles



CeeN
02-12-2004, 02:11 AM
Hey,

I made a portal for my forum..all custom.

Take a look so you know what I'm reffering too. http://www.volconvo.com


See the last post under each forum catagory? The one with the little arrow to the left of it?

How can I limit how large those titles get on my page? In other words, how can I make it so a LONG BIG FAT TITLE THAT IS BIG

becomes: LONG BIG FAT TITLE...

Is there any way to do this?

Here's my code:


<!--TEMPLATE: FORUM INFO TD--><b><font face="arial" size="2"><a href="{ibf.script_url}showforum={$forumdata['id']}"><span>{$forumdata['name']}</span></a><br /></font></b>

<font face="arial" size="1">{$forumdata['last_post_time']}<b><br />
<a title="Go to the first unread post" href="{ibf.script_url}showtopic={$forumdata['last_post_topic']}&view=getnewpost"> <img alt="Go to the first unread post" border="0" src="http://www.volconvo.com/lastpost.gif" width="10" height="7" /></a><a title="Go to the first unread post" href="{ibf.script_url}showtopic={$forumdata['last_post_topic']}&view=getnewpost" style="color: #000000"><u>{$forumdata['last_title']}</u></a><br />
</b>
</font>
<font face="arial" size="1">by: <a href="{ibf.script_url}showuser={$forumdata['last_poster_id']}" style="color: #000000">{$forumdata['last_poster_name']}</a></font>

The second go to first unread post show topic line is the line of text.


Thanks for any pointers.

CeeN
02-12-2004, 04:36 AM
was I clear and it's just not possible, or unclear?

ronaldb66
02-12-2004, 09:04 AM
I guess it was unclear what you're meaning, at least I couldn't find it.
Anyway, I think a bit of PHP could do something like that: limit a text string to a certain length, breaking it off after the nearest space before the maximum length and substitute the cut off part with three periods. Make sense?

Mhtml
02-12-2004, 09:42 AM
IPB has that option doesn't it?? It should! Anyways if you are up to a bit of modding you could easily make it work like that.

CeeN
02-12-2004, 04:46 PM
well..since I was unclear...I'll attatch an immage to illustrate what I'm saying:

bcarl314
02-12-2004, 05:16 PM
Well, you can do it in PHP,



$var = subsrt($var,0,20)."...";

CeeN
02-12-2004, 05:32 PM
oh cool..how/where do I insert that into the code then, since it's php?

CeeN
02-13-2004, 09:09 PM
Any chance of moving this on to php? I didn't know that would be the way to solve this issue.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum