Jump to content

Portal


Michael.J

Recommended Posts

yes i am using truncate in my blocs, i'd used the above code, i missed somle thing purhapse !!?
i have the last version installed !


The bitter sweet of using the truncation feature is that it was originally written to handle just raw text. It was never designed and has not been updated to support the rich text editor which is used in forum posts. This does not mean you can't use it, in fact I do use it, but it requires constant watching over. You need to adjust the settings in the truncation feature to suit your needs. The truncation feature is hard set to however many characters you want to show before truncation happens. In your examples above the number 300 corresponds to 300 characters and then truncate. The problem, as you're seeing, is that the truncation feature counts characters as it was designed for raw text, your articles are in markup and bbc code so sometimes the truncation feature works well and other times it just fails. This all depends on where it's used, how it's used, its settings, and what you're feeding into it to be truncated. Here's is a more in depth example.

Given: You have truncation set to 25 characters by using.

{IPSText::truncate($topic['post'],25)}
 

Article Text: This is the text you write in your articles or posts.

This is a great looking text.


Expected Output: What you expect the truncation feature to do (count 25 letters and truncate).

This is a great looking t...

What the truncation feature actually sees: Because the the markup and bbc language added to posts with the rich text editor.

This is a great looking text. 


What the truncation actually does: Counts 25 hard characters and truncates.

This is a [url=http://com...
 

As you can see the break actually happens inside markup language or bbc language. Since the opened tag never gets closed properly everything that gets parsed after that is not displayed, displayed incorrectly, or randomly displayed. You'll notice this to be true after a strong or bold tag is opened and never closed. All the text behind the truncation is bold. There are many other examples of how it breaks but you get the idea.

You have to watch the truncation feature actively in marked up text like articles. You have to set this high enough or low enough so it always breaks in text body, no links, formatting, image tags, etc. You should design a format for you and your editors to use so you can write articles knowing this condition exists, post articles, check them on the portal that they are displayed correctly and carry on.

Otherwise you can see if Invision wants to rewrite the core feature to exclude markup languages or even crazier write a bit to check if there's an opened tag, and then close the tag and markup gracefully before adding the truncation dots ...

Good luck hope this helps explain what you're seeing.

Link to comment
Share on other sites

1) Do you have any other applications installed? Might be a cache issue, try rebuilding your cache in Admin CP > System Tab > Cache Management.

2) Some basic docs have been added here. I'm putting together a list of more I can add, if there is something you want to see in there, let me know.

Clicking on Cache Management yields the following error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3932 bytes) in /ips_kernel/classDbMysqliClient.php on line 471

I reported this to IPB support. Any chance these two things are related?

Another question: if I uninstall and reinstall the Portal application will my content and setting still be there?

Link to comment
Share on other sites

I thought Mike was running 3.4.1 on INDMAS already so basically you upgraded a maintenance release and you had this problem? Odd. Make sure you recache both the site Tools & Settings > Cache Management > Recache All and Applications & Modules > Manage Applications & Modules > Recache Apps & Modules.

It should be managed the same way you're used to managing the portal, nothing has changed that I'm aware of.

Did you also upgrade the portal application?

I virgin-installed the latest Portal on 4.3.1. Then Mike upgraded to 4.3.2. Now I can't admin the app. However the content is still on the front page. Clicking on Cache Management yields the following error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3932 bytes) in /ips_kernel/classDbMysqliClient.php on line 471

Link to comment
Share on other sites

Options:

1. Turn off caching.

2. If 1GB is a hard limit set by your hosting provider you could buy more resources.

Without knowing your hosting situation (dedicated, shared, virtual) and the resources you're entitled to it's hard to advise you.

Re-Installing the Portal won't affect the content. My suggestion is that you resolve the memory issue first.

Link to comment
Share on other sites

Options:

1. Turn off caching.

2. If 1GB is a hard limit set by your hosting provider you could buy more resources.

Without knowing your hosting situation (dedicated, shared, virtual) and the resources you're entitled to it's hard to advise you.

Re-Installing the Portal won't affect the content. My suggestion is that you resolve the memory issue first.

Thanks for the guidance. However, the memory Fatal Error is caused by clicking on "Cache Management," so I can't turn it off. Is there another way to access the cache settings?

Link to comment
Share on other sites

Last time I saw this error, was due to an overload of the cache database table by the calendar app.

http://community.invisionpower.com/resources/bugs.html/_/ip-calendar/enormus-growing-size-of-cache-store-table-r38219

http://community.invisionpower.com/resources/bugs.html/_/ip-calendar/minical-cache-growth-r35374

Check your cache_store table for "minical" entries, you should normally only have a few to several pages in this table.

Link to comment
Share on other sites

Last time I saw this error, was due to an overload of the cache database table by the calendar app.

http://community.invisionpower.com/resources/bugs.html/_/ip-calendar/enormus-growing-size-of-cache-store-table-r38219

http://community.invisionpower.com/resources/bugs.html/_/ip-calendar/minical-cache-growth-r35374

Check your cache_store table for "minical" entries, you should normally only have a few to several pages in this table.

Mike, that's exactly what it is. Thanks, all.

Link to comment
Share on other sites

Clicking on Cache Management yields the following error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3932 bytes) in /ips_kernel/classDbMysqliClient.php on line 471

I reported this to IPB support. Any chance these two things are related?

Another question: if I uninstall and reinstall the Portal application will my content and setting still be there?

I thought Mike was running 3.4.1 on INDMAS already so basically you upgraded a maintenance release and you had this problem? Odd. Make sure you recache both the site Tools & Settings > Cache Management > Recache All and Applications & Modules > Manage Applications & Modules > Recache Apps & Modules.

It should be managed the same way you're used to managing the portal, nothing has changed that I'm aware of.

Did you also upgrade the portal application?

Recache per the instructions above did not work. Portal still not showing up in "Other Apps." Anything else to try?

Link to comment
Share on other sites

Recache per the instructions above did not work. Portal still not showing up in "Other Apps." Anything else to try?

Open ACP > System Tab > Cache Management. Can you see a reference to the "portal" in either app_cache or app_menu_cache?

please how i can add an IP content bloc to my portal ?

regards

IP.Content blocks that work in the template bits, can just be added into the Portals main template bit. In acp > look & feel tab > select skin > Portal > skeletonTemplate.

Link to comment
Share on other sites

The Portal has been updated to v1.4 and includes several new features and minor bug fixes. A full list of the changes can be found below:

  • Ability to truncate posts to X amount of characters.
  • Option to import or export custom portal blocks.
  • Option to add pagination to main topics block.
  • Option to sort main topics by last post or topic start dates.
  • Option to override title with setting input.
  • Option to set meta keywords or description for Portal page.
  • New PHP and HTML example blocks added.
  • Permission fix for newest posts block.
  • Option to auto hide empty right/left columns.
  • Affiliates block has been phased out.
  • Support for new automatic copyright removal, see here.
Link to comment
Share on other sites

Mike, When someone posts a large image (inline) it appears within the posts as it should on the portal page but since upgrading the picture is overstretching? (going outside the posting area) how would I force it to resize or at least not over stretch?

Mike, I'm getting this same problem. I've just updated everything to latest builds & what's weird is that Chrome is displaying things properly, but Firefox is allowing pictures to over-stretch way beyond what they should. Any way to just not allow images to feed into the portal?

Link to comment
Share on other sites

Well, I fixed it by limiting the number of characters fed into the portal to 100. That cleans up the look quite a bit, so I'm content with that.

Quick question: is there a template bit where I can make some edits to the html for that center "latest_topics_main"? I'd like to make a couple of stylistic changes to that block to match up with my skin, but I can't find the bit to do it.

Link to comment
Share on other sites

Mike, I'm getting this same problem. I've just updated everything to latest builds & what's weird is that Chrome is displaying things properly, but Firefox is allowing pictures to over-stretch way beyond what they should. Any way to just not allow images to feed into the portal?

Just out of curiosity, were they remote images or attachments?

Well, I fixed it by limiting the number of characters fed into the portal to 100. That cleans up the look quite a bit, so I'm content with that.

Quick question: is there a template bit where I can make some edits to the html for that center "latest_topics_main"? I'd like to make a couple of stylistic changes to that block to match up with my skin, but I can't find the bit to do it.

See acp > look & feel tab > select skin > portal > articles. If you need help with locating something specific, just let me know.

Link to comment
Share on other sites

Just out of curiosity, were they remote images or attachments?

See acp > look & feel tab > select skin > portal > articles. If you need help with locating something specific, just let me know.

Hey Mike,

I didn't get a chance to test with attachments, this was just a very large picture that someone had linked from a remote location into a post, & when pulled into that block on the portal it totally borked the look in Firefox. Chrome displayed it perfectly though, pretty weird issue.

Got the template bit, thanks!

Link to comment
Share on other sites

Hi Mike, sorry to bother you but I was wondering if there would be an easy way to pull blogs onto the portal ?

I don't have a blog subscription, so it makes it harder to write a block for it. Does it have any hooks you like? Might be able to adapt it to display in the Portal.

Hey Mike,

I didn't get a chance to test with attachments, this was just a very large picture that someone had linked from a remote location into a post, & when pulled into that block on the portal it totally borked the look in Firefox. Chrome displayed it perfectly though, pretty weird issue.

Got the template bit, thanks!

Ok will take a look.

Link to comment
Share on other sites

Hi Mike just installed the Portal and installed OK no problems I have changed the home tab in the header menu to the portal but I have a portal tab in the menu how do I get rid of this please ?

Admin CP > System Tab > Manage Applications & Modules > edit the Portal application. You'll see options for tab restrictions and hiding the tab.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

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