Jump to content

Features for the Portal


whuston

Recommended Posts

You can limit the length of the portal news items by going to: Look & Feel > Manage Skin Sets & Templates > Manage Templates in (your skin)

Then go to 'Templates' > 'Portal' > Articles

Find this code:

<div class='post_body'>

                                <div class='post entry-content'>

                                        {$entry['post']}

                                        <!--IBF.ATTACHMENT_{$entry['pid']}-->

                                </div>

                        </div>

Replace with this:

<div class='post_body'>

                                <div class='post entry-content' width='95%' valign='top'>

                                        <div style='height: 250px; overflow: auto;'>{$entry['post']}

                                        <!--IBF.ATTACHMENT_{$entry['pid']}-->

</div>

                                </div>

                        </div>



Change the 250px to whatever height in pixels that you want. To remove the scroll bar change "Auto" to "Hidden".

Hope this helps.

3DKiwi

Link to comment
Share on other sites

  • 1 month later...

Is there a better way of doing this?

Instead of specifying a height, can you specify a certain amount of characters before the article cuts off and adds a "Read More" link? Or is there a way to perhaps be able to manually add a [more] link somewhere in your posts so that the portal cuts off where you specify and then offers a "Read More" link?

Thanks.

Link to comment
Share on other sites

I do this way because in most cases my news items have an image 240 pixels in height. You could easily add a read more link by adding a piece of simple code to the portal articles template.

My guess is you could use IP Content to create blocks for you news items. You can then truncate the text. On my Portal page I have a Recent Replies block done with IP Content. I truncate the text that is displayed.

3DKiwi

Link to comment
Share on other sites

You can easily add a link. In the skin editor open Portal>articles

Find

<div class='moderation_bar'>

<if test="entryHasPosts:|:$entry['posts']">

Add after

<a href='{parse url="showtopic={$entry['tid']}" base="public" seotitle="{$entry['title_seo']}" template="showtopic"}'>Read More</a>&nbsp;&nbsp;



Save and you're done. Change "Read More" to whatever you want it to say. Slightly crude as you're entering text directly rather than use the language replacement system. It's possible to change this code to use the language system but for a simple edit like this I wouldn't bother.

Hope this helps.

3DKiwi

Link to comment
Share on other sites

  • 8 months later...
  • 5 months later...
  • 2 weeks later...
  • 4 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...