Jump to content

Features for the Portal

Featured Replies

Posted

Really just 2 quick one.

Could we have a read more [ tag ] so when you put news on the portal you can limit the length it displays.

Also, for the portal of the news forum, can we have categories.

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

  • Author

Kiwi, yes it does.

Thanks a lot :D

  • 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.

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



I made a little change in news section :) Now it`s only shows part of news and not all on portal. If somebody wont`s code...send me PM :) (don`t need IP Content)



[img]

[/img]



[img]

[/img]




Is this better? Not shows "Read more"....but "..." :P

Yeah, that would work, mAxL. It should be easy enough to add a "Read More" link, no?

Would you mind sending me a PM with the code (or posting it here)?

Thanks.

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

  • 8 months later...

3DKiwi, awesome tutorial !!! Thank you very much!!!

The only thing that would be lovely to do it's add a pagination on the bottom of the portal so people can see old news.

You're a life saver!

  • 5 months later...

I have implimented all of the above code and recached but nothing seems to have changed, have I done something wrong?

  • 2 weeks later...

I have implimented all of the above code and recached but nothing seems to have changed, have I done something wrong?



Anyone?

Are you sure you are viewing the same skin which you edited?

Thanks again, 3DKiwi.

  • 4 months later...

Will this still work with 3.2.1?

The portal is no longer available with IP.Board 3.2.x. A community member has taken it over, and it is available now in the marketplace. You would be best advised to ask the modification author if the changes mentioned still apply.

Archived

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

Recently Browsing 0

  • No registered users viewing this page.