Results 1 to 2 of 2

Thread: Trim the length of custom fields?

  1. #1
    Join Date
    Jul 2004
    Location
    Copenhagen
    Posts
    741

    Question Trim the length of custom fields?

    Is there a way to trim the viewing of custom fields?
    Fx, if I have a custom field, and in this field is typed a long URL
    which might break the tables of the site, see example here:
    http://www.europanet.dk/boligannonce...ew/entries/14/

    Fx like the URL in this post is trimmed

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Just trimming the text wouldn't be much of a problem, but of course you wouldn't want to cut off part of the URL. vB's BB code parser already trims URL's like you see here and at the link you posted, but I'm not sure if there's an easy way to change the number of characters it allows. The best thing I can suggest would be to edit your 'adv_dyna_showentry_custombits' template and use an <if> tag to replace the link with text like "Click Here".

    Code:
    <dl class="stats">
    	<dt>{vb:raw field.title}</dt>
    	<dd><vb:if condition="$field['fieldid'] == X"><a href="{vb:raw field.value}">Click here</a><vb:else />{vb:raw field.value}</vb:if></dd>
    </dl>
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Odd TRIM warning when editing page
    By bobbo in forum Bugs From 3.2.1
    Replies: 7
    Last Post: 07-13-2010, 09:47 PM
  2. Custom Fields as Category Fields
    By tavenger5 in forum "How Do I..." Questions
    Replies: 1
    Last Post: 10-16-2009, 10:44 AM
  3. Trim Forum links in Recent Threads Module !!
    By veenuisthebest in forum Troubleshooting & Problems
    Replies: 1
    Last Post: 05-06-2008, 03:10 PM
  4. Replies: 2
    Last Post: 07-10-2005, 05:37 PM
  5. Custom Fields
    By suttercane in forum "How Do I..." Questions
    Replies: 2
    Last Post: 09-28-2004, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •