Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 1, 201015 yr 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.
January 1, 201015 yr 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
February 9, 201015 yr 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.
February 9, 201015 yr 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
February 9, 201015 yr 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
February 9, 201015 yr 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.
February 9, 201015 yr 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> 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
October 13, 201014 yr 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!
March 31, 201114 yr I have implimented all of the above code and recached but nothing seems to have changed, have I done something wrong?
April 9, 201114 yr I have implimented all of the above code and recached but nothing seems to have changed, have I done something wrong? Anyone?
August 30, 201113 yr 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.