Jump to content

Portal


Michael.J

Recommended Posts

Have you checked with the hook author about supporting the Portal? Looking through the listing, it looks like IP.Content is supported so extending support for the Portal should be possible. If it's adding it as a IP.Content block, it should be possible to include support within the Portal template bit itself.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I've been using the Portal add-on for a while, with a three column layout. Middle column has, up until now, been using the "Latest Topics Main" block that has been showing a "Front Page News" forum section that we've got. However, I'd like to start using the Articles system that comes built in with IP.Content, and have a list of the recent articles in that middle column.

If I make a page in IP.Content, I would normally just put

{parse articles}

in the page, and the articles show up nicely on that page. I'd like to be able to get that same display style in a block that I could put in the centre column of my portal page. Any hints? I'm new to the blocks concept.

Link to comment
Share on other sites

Is there no way to use the "parse block" codes inside the Portal Blocks? I mean, this way works, and thanks for that, but it would be a whole lot more convenient if I could rearrange the blocks via drag and drop in the Portal interface.

That's actually solved a few different problems at once for me though. Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

We just upgraded from IPB 3.4.1 to 3.4.6 and now the code in one of our custom blocks no longer works. I asked IPB about it but they said I would need to talk to you. Can you advise at all? I think it's just having trouble accessing one of the cached arrays?

Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/demo/ipboard/admin/applications_addon/other/portal/modules_public/portal/portal.php(149) : eval()'d code on line 6

The relevant code:

$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . '/sources/hooks.php', 'app_calendar_classes_hooks', 'calendar' );
$gateway = new $classToLoad( ipsRegistry::instance() );
$allowedCals = explode( ',','1,4' );
$filteredCalEvents = array();
foreach ( $this->caches['calendar_events'] as $event ) {
Link to comment
Share on other sites

Hello!

I would like to report a problem:

Latest Topics Main Block is awfully slow (loading takes 4-5 seconds). When i disable Main topics block, everything loads just fine (in 1-2 seconds). When i change "Latest topics to show" limit to 2-3, it helps a little bit, but still - something is taking far too much time in Portal code to load main block.

All the other apps (including default Galleries, Blogs etc.. load just fine).

Link to comment
Share on other sites

  • 4 weeks later...

 

A default calendar block shouldn't be included right now but please provide the full block code your using and what version of the Calendar your using and I can take a look. Yes it should just be that the cache isn't loading but I'll check through it anyway.

​Hi Mike, sorry for the delay in getting back to this.  Here is the full block code. The calendar version is 3.3.4.  Much thanks!

<?php
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . '/sources/hooks.php', 'app_calendar_classes_hooks', 'calendar' );
		$gateway	 = new $classToLoad( ipsRegistry::instance() );
			$allowedCals = explode( ',','1,4' );
			$filteredCalEvents = array();
			foreach ( $this->caches['calendar_events'] as $event )
			{
				if ( ! in_array( $event['event_calendar_id'], $allowedCals ) )
				{
					IPSDebug::addMessage( "Skipping event " . $event['event_title'] );
					continue;
				}
				$filteredCalEvents[] = $event;
			}
			$this->caches['calendar_events'] = $filteredCalEvents;
		print $gateway->getUpcomingEvents();
?>

 

Link to comment
Share on other sites

​Hi Mike, sorry for the delay in getting back to this.  Here is the full block code. The calendar version is 3.3.4.  Much thanks!

​Replace it with this and see if that works.

<?php
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . '/sources/hooks.php', 'app_calendar_classes_hooks', 'calendar' );
		$gateway	 = new $classToLoad( ipsRegistry::instance() );
			$allowedCals = explode( ',','1,4' );
			$filteredCalEvents = array();
            if( is_array( $this->caches['calendar_events'] ) AND count( $this->caches['calendar_events'] ) )
            {
    			foreach ( $this->caches['calendar_events'] as $event )
    			{
    				if ( ! in_array( $event['event_calendar_id'], $allowedCals ) )
    				{
    					IPSDebug::addMessage( "Skipping event " . $event['event_title'] );
    					continue;
    				}
    				$filteredCalEvents[] = $event;
    			}
    			$this->caches['calendar_events'] = $filteredCalEvents;                
            }

		print $gateway->getUpcomingEvents();
?>

Hey, I'm very interested in playing with this, similar to portals on phpBB I used to tinker with years ago, however the download link isn't working for me, says the page in not available, is there anywhere else I can download this?

Same thing for me ;)

Looks to be an IPS issue after the upgrade, see here: http://community.invisionpower.com/topic/404265-cant-download-files-from-downloads/ If it's not fixed by tomorrow, let me know and I'll PM you the files.

Link to comment
Share on other sites

<?php
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . '/sources/hooks.php', 'app_calendar_classes_hooks', 'calendar' );
		$gateway	 = new $classToLoad( ipsRegistry::instance() );
			$allowedCals = explode( ',','1,4' );
			$filteredCalEvents = array();
            $this->caches['calendar_events'] = $this->cache->getCache( 'calendar_events' );
            if( is_array( $this->caches['calendar_events'] ) AND count( $this->caches['calendar_events'] ) )
            {
    			foreach ( $this->caches['calendar_events'] as $event )
    			{
    				if ( ! in_array( $event['event_calendar_id'], $allowedCals ) )
    				{
    					IPSDebug::addMessage( "Skipping event " . $event['event_title'] );
    					continue;
    				}
    				$filteredCalEvents[] = $event;
    			}
    			$this->caches['calendar_events'] = $filteredCalEvents;                
            }

		print $gateway->getUpcomingEvents();
?>
Edited by Mike John
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...