Jump to content

Portal


Michael.J

Recommended Posts

Notice: Undefined index: customOutput in /var/www/xtibia/forum/admin/sources/classes/output/publicOutput.php(1759) : eval()'d code on line 1528

Notice: Undefined index: customOutput in /var/www/xtibia/forum/admin/sources/classes/output/publicOutput.php(1759) : eval()'d code on line 1528

Notice: Undefined index: customOutput in /var/www/xtibia/forum/admin/sources/classes/output/publicOutput.php(1759) : eval()'d code on line 1528

Notice: Undefined index: forceIndex in /var/www/xtibia/forum/ips_kernel/classDb.php on line 1033

Fatal error: Call to a member function articles() on a non-object in /var/www/xtibia/forum/admin/applications_addon/other/portal/sources/blocks.php on line 472

Try rebuilding your skin cache manually in ACP > Look & Feel Tab > Template Tools > Recache Skin Sets. Make sure you rebuild it for all skins.

I got it all working. I see some people mentioning articles. Is there an article addon for this,

Articles are just another name for the "Latest Topics Main" block. Everything is still pulled from the forums as a source, there isn't an actual separate articles section like you'd have in IP.Content.

Link to comment
Share on other sites

That particular text follows the css style "ipsType_textblock".

Thanks Mike - sorry for all the questions. Do I edit that within the main CSS file or within the Portal section of Look and Feel within my skin?

Link to comment
Share on other sites

I can't see! :/

Sem_t_tulo.png

After you copy files to your server, click on OTHER APPS in ACP. On the right rail, there will be a "uninstalled apps" (or something) section. Click there to install Portal. Currently it is not installed on your IPB.

Best,

g

Link to comment
Share on other sites

Thanks Mike - sorry for all the questions. Do I edit that within the main CSS file or within the Portal section of Look and Feel within my skin?

The portal won't have it's on css page to edit. So you either need to edit the main ipb_styles.css file or possible edit the articles section directly. e.g.

<div class='ipsType_textblock' style='color: #fff;'>

I can't see! :/

Can you try a full uninstall then re-install?

Link to comment
Share on other sites

Thanks I worked it out earlier.

One more thing, which I'm sure you've probably answered. What extra code needs to go into a new block if you're entering in the tag from the IP Content created Block to work with portal?

Current mine just shows

{parse block="new_topics"}

Link to comment
Share on other sites

One more thing, which I'm sure you've probably answered. What extra code needs to go into a new block if you're entering in the tag from the IP Content created Block to work with portal?

That code will only work in the templates. You'll need to add any ip.content blocks directly into the portals template bit. See ACP > Look & Feel Tab > select skin > Portal > skeletonTemplate.

Link to comment
Share on other sites

That code will only work in the templates. You'll need to add any ip.content blocks directly into the portals template bit. See ACP > Look & Feel Tab > select skin > Portal > skeletonTemplate.

Is the whole code itself, ie, that custom view that exists when finishing creating a block in Content?

One more thing, is it possible to have more than one 'Portal' page?

Link to comment
Share on other sites

Is the whole code itself, ie, that custom view that exists when finishing creating a block in Content?

One more thing, is it possible to have more than one 'Portal' page?

No just the parse block you referenced above. For example, add it before or after this to have it displayed on the right side. Unfortunately you won't have position placement like a normal block.

{parse template="showBlocks" group="portal" params="$rightBlocks"}

Not really within the existing version. How are you wanting to set this up?

Link to comment
Share on other sites

  • 4 weeks later...

Hi Mike,

Firstly, thanks for the Portal, I totally dig it.

Just a quick optimisation suggestion for you if you want it.

The 'recent posts' block was absolutely destroying my site, so I disabled it and had a dig. What I found was that it was doing this query;

SELECT p.pid, p.post_date, p.post, p.author_id,t.tid, t.title_seo, t.title FROM ibf_posts p  LEFT JOIN ibf_topics t ON ( t.tid=p.topic_id )   WHERE t.approved=1 AND t.forum_id IN (184,17,272,145,182,70,71,33,34,130,112,121,39,36,40,38,144,151,141,41,56,12,61,54,64,82,83,81,77,170,276,159,156,160,102,142,104,132,133,134,180,205,80,7,79,11,85,49,18,63,16,32,143,241,29,161,123,187,211,271,274,275,289,291,292,293,21,100,23,28,24,25,26,27,8,53,59,146,10,157,242,9,57,163,190,14,220,221,222,223,243,253,252) AND  queued=0  ORDER BY p.post_date DESC LIMIT 0,5;

Which, across a table of 7.3 million posts was looking like this; (Explain output)

+----+-------------+-------+------+---------------------------------------------------+----------+---------+------------------------+--------+----------------------------------------------+
| id | select_type | table | type | possible_keys                                     | key      | key_len | ref                    | rows   | Extra                                        |
+----+-------------+-------+------+---------------------------------------------------+----------+---------+------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | t     | ref  | PRIMARY,forum_id,last_x_topics,last_post,approved | approved | 1       | const                  | 215261 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE      | p     | ref  | topic_id,queued                                   | topic_id | 5       | skycom_sau.t.tid,const |     11 |                                              |
+----+-------------+-------+------+---------------------------------------------------+----------+---------+------------------------+--------+----------------------------------------------+

Or, 2,367,871 rows. :o

I don't pretend to be intimate with Invision, but I had a look through the tables and available columns and found 'ibf_forums_recent_posts'

So, when I add an additional JOIN (not a left join) into the query (and formatted it so I could read it);

SELECT p.pid, p.post_date, p.post, p.author_id,t.tid, t.title_seo, t.title 
  FROM ibf_posts p  
       LEFT JOIN ibf_topics t ON ( t.tid=p.topic_id )
       JOIN ibf_forums_recent_posts rp ON rp.post_id = p.pid
 WHERE t.approved=1 
       AND t.forum_id IN (184,17,272,145,182,70,71,33,34,130,112,121,39,36,40,38,144,151,141,41,56,12,61,54,64,82,83,81,77,170,276,159,156,160,102,142,104,132,133,134,180,205,80,7,79,11,85,49,18,63,16,32,143,241,29,161,123,187,211,271,274,275,289,291,292,293,21,100,23,28,24,25,26,27,8,53,59,146,10,157,242,9,57,163,190,14,220,221,222,223,243,253,252) 
       AND queued=0   
 ORDER BY p.post_date DESC LIMIT 0,5; 

And then compared the results;

+---------+
| pid     |
+---------+
| 7311480 |
| 7311479 |
| 7311478 |
| 7311477 |
| 7311476 |
+---------+
5 rows in set (13.00 sec)

+---------+
| pid     |
+---------+
| 7311480 |
| 7311479 |
| 7311478 |
| 7311477 |
| 7311476 |
+---------+
5 rows in set (0.71 sec)

Hurrah!!

Now, I'm not totally sure that joining that table is the right way to do it, but it looks good to me and it might be useful to add it in.

Thanks again.

Link to comment
Share on other sites

Hi i did add this code:

<?php
$classToLoad
= IPSLib::loadLibrary( IPSLib::getAppDir( 'calendar' ) . '/sources/hooks.php', 'app_calendar_classes_hooks', 'calendar' );
$gateway = new $classToLoad( ipsRegistry::instance() );

print $gateway->getUpcomingEvents();

?>

and its again not working ...

see please "לוח אירועים IT"

http://netsystem.org.il/index.php/portal/

i see empty block Although i add code

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