XF2 [8WR] XenPorta 2 (Portal) PRO

XF2 [8WR] XenPorta 2 (Portal) PRO [Paid] 2.2.0.7

No permission to buy ($40.00)
1. Create Categories

Category
Category-1
Category-2
Category-3
Category-4


2. Setup > Options > [8WR] XenPorta 2 (Portal) PRO

Articles per page: 16 (Category index)

3. Appearance > Styles > Style properties > [8WR] XenPorta 2 (Portal) PRO

✅ Enable masonry grid
Masonry columns 2
Masonry columns (wide) 2
Masonry columns (medium) 1

4. Default article widget setting. It is not recommended that you change any of PHP files. File health check will detect unexpected content.

Edit /src/addons/EWR/Porta/Pub/Controller/Article.php

Find:
Code:
$perPage = $this->options()->EWRporta_articles_perpage;

Replace with:

Code:
//$perPage = $this->options()->EWRporta_articles_perpage;
$perPage = 4;

5. Appearance > Widgets

General layout

XenPorta > Articles list: Above (full)

Here's the default XenPorta Articles widget position (Setting Step 4)

XenPorta > Articles list: Below (full)


My index page settings:

XenPorta > Articles list: Above (full)

Features
Order: 1

XFMG: Media slider
Order: 2

HTML widget
Order: 3

XenPorta > Articles-1
Maximum entries:3
Category: Category-1
Order: 4

XFMG: Media slider (Latest_video)
Order: 5


HTML widget
Order: 6

Default XenPorta Articles widget

XenPorta > Articles list: Below (full)

HTML widget
Order: 1

XenPorta > Articles-2
Maximum entries: 3
Category: Category-2
Order: 2

HTML widget
Order: 3

XenPorta > Articles-3
Maximum entries: 2
Category: Category-3
Order: 4
Enable masonry grid




6. Article promotion

Categories: Add article to category
Exclude categiries 1,2 and 3 from article index.

The default XenPorta articles widget display articles from category-4 (Do not exclude them from article index)

All articles are multicategory, Category and one of Category(1,2,3,4)



Template: EWRporta_articles_index

Add:

<xf:css>

.porta-article-pager {
display: none;
}
.message-attribution {
display: none;
}

.block-footer {
display: none;
}
</xf:css>

My template EWRporta_articles_category

Code:
<xf:css>
.message-attribution  {
display: none;
}
.block-footer  {
display: none;
}
</xf:css>
<xf:description>{$category.category_description}</xf:description>

<xf:comment>XFMG Random media</xf:comment>
<div>
    <xf:widget key="xfmg_random_slide" />
</div>
<xf:comment>
<div class="porta-articles-above-full">
    <xf:widgetpos id="ewr_porta_articles_above_full" context-page="{$page}" context-category="{$category}" />
</div>
 
<h3 class="block-minorHeader">{$category.category_name}</h3>
<div class="porta-articles-above-split porta-widgets-split">
    <xf:widgetpos id="ewr_porta_articles_above_split" context-page="{$page}" context-category="{$category}" />
</div>
</xf:comment>
<div>
    <center><h3 class="block-minorHeader">{$category.category_name}</h3></center>
</div>
<xf:macro template="EWRporta_articles_macros" name="articles_block"
    arg-link="ewr-porta/categories"
    arg-data="{$category}"
    arg-articles="{$articles}"
    arg-catlinks="{$catlinks}"
    arg-attachments="{$attachments}"
    arg-page="{$page}"
    arg-perPage="{$perPage}"
    arg-total="{$total}" />
<xf:comment>
<div class="porta-articles-below-full">
    <xf:widgetpos id="ewr_porta_articles_below_full" context-page="{$page}" context-category="{$category}" />
</div>

<div class="porta-articles-below-split porta-widgets-split">
    <xf:widgetpos id="ewr_porta_articles_below_split" context-page="{$page}" context-category="{$category}" />
</div>
</xf:comment>
<xf:widgetpos id="ewr_porta_articles_sidenav" context-page="{$page}" context-category="{$category}" position="sidenav" />
<xf:widgetpos id="ewr_porta_articles_sidebar" context-page="{$page}" context-category="{$category}" position="sidebar" />


I hope this will help you :)

Thanks man..
 
You should NEVER edit templates directly...

Use the template modification system and EXTRA.less.
 
1. Create Categories

Category
Category-1
Category-2
Category-3
Category-4


2. Setup > Options > [8WR] XenPorta 2 (Portal) PRO

Articles per page: 16 (Category index)

3. Appearance > Styles > Style properties > [8WR] XenPorta 2 (Portal) PRO

✅ Enable masonry grid
Masonry columns 2
Masonry columns (wide) 2
Masonry columns (medium) 1

4. Default article widget setting. It is not recommended that you change any of PHP files. File health check will detect unexpected content.

Edit /src/addons/EWR/Porta/Pub/Controller/Article.php

Find:
Code:
$perPage = $this->options()->EWRporta_articles_perpage;

Replace with:

Code:
//$perPage = $this->options()->EWRporta_articles_perpage;
$perPage = 4;

5. Appearance > Widgets

General layout

XenPorta > Articles list: Above (full)

Here's the default XenPorta Articles widget position (Setting Step 4)

XenPorta > Articles list: Below (full)


My index page settings:

XenPorta > Articles list: Above (full)

Features
Order: 1

XFMG: Media slider
Order: 2

HTML widget
Order: 3

XenPorta > Articles-1
Maximum entries:3
Category: Category-1
Order: 4

XFMG: Media slider (Latest_video)
Order: 5


HTML widget
Order: 6

Default XenPorta Articles widget

XenPorta > Articles list: Below (full)

HTML widget
Order: 1

XenPorta > Articles-2
Maximum entries: 3
Category: Category-2
Order: 2

HTML widget
Order: 3

XenPorta > Articles-3
Maximum entries: 2
Category: Category-3
Order: 4
Enable masonry grid




6. Article promotion

Categories: Add article to category
Exclude categiries 1,2 and 3 from article index.

The default XenPorta articles widget display articles from category-4 (Do not exclude them from article index)

All articles are multicategory, Category and one of Category(1,2,3,4)



Template: EWRporta_articles_index

Add:

<xf:css>

.porta-article-pager {
display: none;
}
.message-attribution {
display: none;
}

.block-footer {
display: none;
}
</xf:css>

My template EWRporta_articles_category

Code:
<xf:css>
.message-attribution  {
display: none;
}
.block-footer  {
display: none;
}
</xf:css>
<xf:description>{$category.category_description}</xf:description>

<xf:comment>XFMG Random media</xf:comment>
<div>
    <xf:widget key="xfmg_random_slide" />
</div>
<xf:comment>
<div class="porta-articles-above-full">
    <xf:widgetpos id="ewr_porta_articles_above_full" context-page="{$page}" context-category="{$category}" />
</div>
 
<h3 class="block-minorHeader">{$category.category_name}</h3>
<div class="porta-articles-above-split porta-widgets-split">
    <xf:widgetpos id="ewr_porta_articles_above_split" context-page="{$page}" context-category="{$category}" />
</div>
</xf:comment>
<div>
    <center><h3 class="block-minorHeader">{$category.category_name}</h3></center>
</div>
<xf:macro template="EWRporta_articles_macros" name="articles_block"
    arg-link="ewr-porta/categories"
    arg-data="{$category}"
    arg-articles="{$articles}"
    arg-catlinks="{$catlinks}"
    arg-attachments="{$attachments}"
    arg-page="{$page}"
    arg-perPage="{$perPage}"
    arg-total="{$total}" />
<xf:comment>
<div class="porta-articles-below-full">
    <xf:widgetpos id="ewr_porta_articles_below_full" context-page="{$page}" context-category="{$category}" />
</div>

<div class="porta-articles-below-split porta-widgets-split">
    <xf:widgetpos id="ewr_porta_articles_below_split" context-page="{$page}" context-category="{$category}" />
</div>
</xf:comment>
<xf:widgetpos id="ewr_porta_articles_sidenav" context-page="{$page}" context-category="{$category}" position="sidenav" />
<xf:widgetpos id="ewr_porta_articles_sidebar" context-page="{$page}" context-category="{$category}" position="sidebar" />


I hope this will help you :)

Can this ordered by a specific category?

Code:
<div class="porta-articles-above-full">
    <xf:widgetpos id="ewr_porta_articles_above_full" context-page="{$page}" context-category="{$category}" />
</div>
 
Absolutely right:)

You have to create the article widget for every categories you want to display other then default article widget.

So you have default article widget and just put other widget above or below as you wish. Widget positions are determined by order numbers.
 
One of our admins is wondering about the following:

Server error log
  • ErrorException: [E_NOTICE] Trying to get property of non-object
  • src/addons/EWR/Porta/Repository/Author.php:21
  • Generated by: Unknown account
  • Oct 18, 2018 at 6:55 AM
Stack trace
#0 src/addons/EWR/Porta/Repository/Author.php(21): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/hobbymac/...', 21, Array)
#1 src/addons/EWR/Porta/Pub/Controller/Thread.php(38): EWR\Porta\Repository\Author->fetchAuthorByUser(NULL)
#2 src/addons/Andy/StaffActivity/XF/Pub/Controller/Thread.php(12): EWR\Porta\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(249): Andy\StaffActivity\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(Andy\StaffActivity\XF\Pub\Controller\Thread), NULL)
#5 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#7 src/XF.php(329): XF\App->run()
#8 index.php(13): XF::runApp('XF\\Pub\\App')
#9 {main}
Request state
array(4) {
["url"] => string(55) "/threads/a-head-alignment-process-for-a-pm1340gt.60052/"
["referrer"] => string(58) "http://www.hobby-machinist.com/forumdisplay.php/151-Dumore"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
I'm running XF 2 in domain.com/forum. I'd like to have this portal at domain.com, but keep the forum at domain.com/forum. Is this possible? If so, how can I do this? Thanks.
 
I checked that earlier but don't see the question/answer there. I see:
Admin CP: Setup > Options > Basic Board Information
Index Page Route: ewr-porta/
---
But that refers to the forums index. I want my forum to remain at domain.com/forum, as it's installed in the forum subdirectory. I then want domain.com (not the forum index) to show the Portal. Is this possible or does the forum need to be moved to domain.com first? I'd like to leave the XF 2 install at /forum and have the Portal show at domain.com. Thanks.
 
In Basic Board Information.. Find
Index page route

and add:
ewr-porta/
I'm yet to install this, but doesn't that make the /forum the portal then since the XF 2 is installed in /forum? I want the XF 2 forum at /forum and the Portal at domain.com.
 
I'm yet to install this, but doesn't that make the /forum the portal then since the XF 2 is installed in /forum? I want the XF 2 forum at /forum and the Portal at domain.com.

So install it and follow the method I just shared and find out for yourself.
 
So install it and follow the method I just shared and find out for yourself.
I'm yet to purchase as I wanted to see if this was possible prior to buying it. How does making the Index page route ewr-porta/ point the portal to show in the root, a different directory from the XF 2 install?
 
I'm yet to purchase as I wanted to see if this was possible prior to buying it. How does making the Index page route ewr-porta/ point the portal to show in the root, a different directory from the XF 2 install?

It is possible, I would not have suggested it otherwise. Take a look at my website in my signature for proof.
 
  • Like
Reactions: PJK
One question, the videos in the featured slider are not playing. Is that known or something which I miss?
 
Last edited:
Top Bottom