[8WR] XenPorta (Portal)

[8WR] XenPorta (Portal) 1.6.0

No permission to download
Not to quote myself but.. No one has tried to change the recent news? Of is willing to give us a tutorial how to change it? I know where to change it, but just looking for styling code.
No one can really help you with specifics as everyone is personal preference and a per site basis. If you don't know how to do it how you want it, hire a coder or post in the http://xenforo.com/community/forums/styling-and-customization-questions.47/ forum.

I remember someone posting a "block" layout as a resource so maybe try finding that.
 
No one can really help you with specifics as everyone is personal preference and a per site basis. If you don't know how to do it how you want it, hire a coder or post in the http://xenforo.com/community/forums/styling-and-customization-questions.47/ forum.

I remember someone posting a "block" layout as a resource so maybe try finding that.

I'm curious why most answers are like this with Xenforo. I see, oh you can hire someone, or oh I have a addon that is only 50 bucks. What happened to a community helping other communities? The whole idea of the blocks is that it's easy to create a template for them. So asking if someone else has done this and could share their template. I don't think this is an outrageous request, and certainly does not imply the need to hire anyone.

To the point, I've tried googling every term I could think of with no results for any blocks. Which is why I came here. Seems like I'm not the only one who would love to see this either as I've seen it requested a couple of times.
 
I'm curious why most answers are like this with Xenforo. I see, oh you can hire someone, or oh I have a addon that is only 50 bucks. What happened to a community helping other communities? The whole idea of the blocks is that it's easy to create a template for them. So asking if someone else has done this and could share their template. I don't think this is an outrageous request, and certainly does not imply the need to hire anyone.

To the point, I've tried googling every term I could think of with no results for any blocks. Which is why I came here. Seems like I'm not the only one who would love to see this either as I've seen it requested a couple of times.
http://xenforo.com/community/resources/xenporta-linux-org-modified-recentnews.2189/
 
@Jaxel or anyone else know how I can put a xenporta block into a custom spot in a template without using the drag and drop layout system? I need to insert it in this template hook: <xen:hook name="forum_list_nodes">
 
Last edited:
Or better yet... My problem is that I have 2 blocks in the same spot on the homepage (forum_list) and they are in the same table. I need to separate them.

Image 2.gif
 
I'm curious why most answers are like this with Xenforo. I see, oh you can hire someone, or oh I have a addon that is only 50 bucks. What happened to a community helping other communities? The whole idea of the blocks is that it's easy to create a template for them. So asking if someone else has done this and could share their template. I don't think this is an outrageous request, and certainly does not imply the need to hire anyone.

To the point, I've tried googling every term I could think of with no results for any blocks. Which is why I came here. Seems like I'm not the only one who would love to see this either as I've seen it requested a couple of times.
If you feel entitled to people sharing there hard work with you for free than please contribute something yourself. I think people would be more likely to help you if you help them. :D For instance maybe sharing the block code you found or making a resource?
 
@Jaxel, Problems with thumbnails, my custom slider for XenPorta.

recenslider.webp

RecentSlider.php
PHP:
<?php

class EWRporta_Block_RecentSlider extends XenForo_Model
{
    public function getModule(&$options)
    {
        $options['forum'] = implode(',', $this->getModelFromCache('EWRporta_Model_Promotes')->getPromoteForums());

        $news = $this->_getDb()->fetchAll("
            SELECT xf_thread.*, xf_post.message, xf_attachment.*, xf_attachment_data.*,
                IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date
            FROM xf_thread
                INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
                INNER JOIN xf_attachment ON (xf_attachment.content_id = xf_thread.first_post_id AND xf_attachment.content_type = 'post')
                INNER JOIN xf_attachment_data ON (xf_attachment_data.data_id = xf_attachment.data_id AND xf_attachment_data.filename = ? AND xf_attachment_data.thumbnail_width > 0)
                LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)
            WHERE (xf_thread.node_id IN (".$options['forum'].") OR EWRporta_promotes.promote_date < ?)
                AND xf_thread.discussion_state = 'visible'
                AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
            ORDER BY promote_date DESC
            LIMIT ?
        ", array($options['filename'], XenForo_Application::$time, XenForo_Application::$time, $options['limit']));
       
        $options['parseText'] = true;

        return $news;
    }
   
}

RecentSlider.template
HTML:
<xen:require css="EWRblock_RecentSlider.css" />

<div class="section sectionMain" id="recentFeatures">
<xen:require js="js/8wayrun/EWRporta_jquery-ui-1.9.0.custom.min.js" />
<xen:require js="js/8wayrun/EWRporta_tabs-rotate.js" />
<script type="text/javascript">
    $(document).ready(function(){
        $("#feature").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    });
</script>

<div id="feature">
<ul class="ui-tabs-nav nav">
<xen:foreach loop="$RecentSlider" value="$news" i="$i">
<li class="ui-tabs-nav-item" id="fragment-{$i}"><a href="#nav-fragment-{$i}"><img alt="{$news.title}" class="featured_thumb" src="{xen:link attachments, $news}" title="{$news.title}" /><span></span></a></li>
</xen:foreach>
</ul>

<xen:foreach loop="$RecentSlider" value="$news" i="$i">
<div id="nav-fragment-{$i}" class="ui-tabs-panel article<xen:if is="{$i}>1"> hide</xen:if>">
<a href="{xen:link threads, $news}"><img alt="{$news.title}" class=" featured" src="{xen:link attachments, $news}" title="{$news.title}" /></a>
<div class="glass">
  <h2><a href="{xen:link threads, $news}">{$news.title}</a></h2>
  <div>{xen:helper wordtrim, $news.messageText, {$option.trimexcerpt}}</div>
</div>
</div>
</xen:foreach>

<div class="clear"></div>
</div>
</div>

How to define "thumbnailUrl"? when finished I will share to all.
 
Ok so I solved my problem with separating xenporta blocks that are in the same area on the frontpage. If you look up a couple posts from this you'll see what I'm talking about. So here's what I did...

in the EWRporta_custom_top template add a line break like you see in here...
Code:
<xen:require css="EWRporta.css" />

<xen:if is="{$blocks.top-left}">
<div class="sidebar topLeftBlocks">
    <xen:foreach loop="$blocks.top-left" value="$block">
        {xen:raw $block}
    </xen:foreach>
</div>
</xen:if>

<xen:if is="{$blocks.top-right}">
<div class="sidebar topRightBlocks {xen:if '{$blocks.top-left}', 'centerShift'}">
    <xen:foreach loop="$blocks.top-right" value="$block">
        {xen:raw $block}
        <br>
    </xen:foreach>

</div>
</xen:if>

Also in the EWRporta.css add this anywhere...
Code:
.topRightBlocks { border: none; }

And now we have this...

Image 3.gif
 
Hey @russoroni I wish I new how to do this! It looks great. Is the 'latest gear reviews' an article add on? I'm using Xenzine and trying to do this. Any pointers would me greatly appreciated!

Thanks!
 
Hey @russoroni I wish I new how to do this! It looks great. Is the 'latest gear reviews' an article add on? I'm using Xenzine and trying to do this. Any pointers would me greatly appreciated!

Thanks!
It's @Bob B 's awesome addon called Showcase. http://xenforo.com/community/resources/showcase.1208/

He's about 2 weeks away from releasing the next version which is a complete rebuild so you may want to wait till he releases it before installing it. But it works right out of the box and is incredibly easy to figure out and customize. Best money you can spend on xenforo
 
  • Like
Reactions: Bob
if i try to install XenPorta (Portal) v1.6.0 on XenForo 1.3.0 Beta 4 i get the error: "provided_file_is_not_a_block_xml_file"
 
Hello everyone. I had a read through the thread and couldn't really find an answer to my question.
Could someone please explain to me what the recent features block does and how I can use it? From what I can gather it is some sort of sliding images block but I really have no idea how to use it.

I understand this might be quite annoying for some people but I really am a novice when it comes to xenforo or coding etc. I'm just learning as I go along, basically, usually with the help of people answering my dumb questions!

EDIT: Upon further inspection I think maybe recent features is just another version of recent sliders?

If so, I'll just use that info on the FAQ.
 
Hello everyone. I had a read through the thread and couldn't really find an answer to my question.
Could someone please explain to me what the recent features block does and how I can use it? From what I can gather it is some sort of sliding images block but I really have no idea how to use it.

I understand this might be quite annoying for some people but I really am a novice when it comes to xenforo or coding etc. I'm just learning as I go along, basically, usually with the help of people answering my dumb questions!

EDIT: Upon further inspection I think maybe recent features is just another version of recent sliders?

If so, I'll just use that info on the FAQ.

Recentfeatures is an image slider that displays stuff from the recentnews block. So, you need to set up the recentnews block first i.e permissions and which forums to monitor. Then, recentfeatures will display threads that have an image attached that's named slide.jpg (you can change it to whatever you want. Mine is frontpage.jpg) So basically you need to go into the xenporta admin cp --> blocks and configure recentnews, then configure recentfeatures and then go into the layout menu and drag the recentfeatures slider wherever you want and then create a new thread and upload an image thats named slide.jpg to it and it should work. Theres also a recentfeatures.css that you can mess with to change the look.
 
Recentfeatures is an image slider that displays stuff from the recentnews block. So, you need to set up the recentnews block first i.e permissions and which forums to monitor. Then, recentfeatures will display threads that have an image attached that's named slide.jpg (you can change it to whatever you want. Mine is frontpage.jpg) So basically you need to go into the xenporta admin cp --> blocks and configure recentnews, then configure recentfeatures and then go into the layout menu and drag the recentfeatures slider wherever you want and then create a new thread and upload an image thats named slide.jpg to it and it should work. Theres also a recentfeatures.css that you can mess with to change the look.
Fantastic! Thanks, man. Much appreciated!
 
Is there no way to make this query better?

Code:
SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
    IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
    IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
    EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
FROM xf_thread
    LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
    INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
    INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
    LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)

WHERE ( xf_thread.node_id IN ('109') OR EWRporta_promotes.promote_date < ? )
    AND xf_thread.discussion_state = 'visible'
    AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
ORDER BY  promote_date DESC
LIMIT ?, ?
Params: 1393070876, 1393070876, 0, 10
Run Time: 0.916767
Select Type    Table    Type    Possible Keys    Key    Key Len    Ref    Rows    Extra
SIMPLE    xf_thread    ALL    node_id_last_post_date,node_id_sticky_state_last_post                   262728    Using where; Using temporary; Using filesort
SIMPLE    xf_node    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.node_id    1   
SIMPLE    EWRporta_promotes    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.thread_id    1    Using where
SIMPLE    xf_user    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.user_id    1   
SIMPLE    xf_post    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.first_post_id    1

It takes over 1 second to load the xenPorta Portal page compared to .03 seconds on the forum home page.

I am only pulling from a forum that currently has less than 20 threads in it. Why is it scanning every single thread?
 
Ok got this query down to 0.003 seconds with two simple edits:

Code:
SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
    IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
    IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
    EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
FROM xf_thread
    LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
    INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
    INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
    LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)

WHERE ( xf_thread.node_id IN ('109') )
    AND xf_thread.discussion_state = 'visible'
    AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
ORDER BY  promote_date DESC
LIMIT ?, ?
Params: 1393072334, 0, 10
Run Time: 0.003232
Select Type    Table    Type    Possible Keys    Key    Key Len    Ref    Rows    Extra
SIMPLE    xf_node    const    PRIMARY    PRIMARY    4    const    1    Using temporary; Using filesort
SIMPLE    xf_thread    ref    node_id_last_post_date,node_id_sticky_state_last_post    node_id_last_post_date    4    const    27    Using index condition; Using where
SIMPLE    EWRporta_promotes    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.thread_id    1    Using where
SIMPLE    xf_user    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.user_id    1  
SIMPLE    xf_post    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.first_post_id    1

If you do not use the xenPorta Promote feature, which I don't, then open library/EWRporta/Block/RecentNews.php and change the following:

PHP:
        $news = $this->_getDb()->fetchAll("
            SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
                IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
                IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
                EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
            FROM xf_thread
                LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
                INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
                INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
                LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)
            $fromWhere
            WHERE ( xf_thread.node_id IN (".$this->_getDb()->quote($options['forum']).") OR EWRporta_promotes.promote_date < ? )
                AND xf_thread.discussion_state = 'visible'
                AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
            ORDER BY $fromOrder promote_date DESC
            LIMIT ?, ?
        ", array(XenForo_Application::$time, XenForo_Application::$time, $page, $options['limit']));

to:

PHP:
        $news = $this->_getDb()->fetchAll("
            SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
                IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
                IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
                EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
            FROM xf_thread
                LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
                INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
                INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
                LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)
            $fromWhere
            WHERE ( xf_thread.node_id IN (".$this->_getDb()->quote($options['forum'])."))
                AND xf_thread.discussion_state = 'visible'
                AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
            ORDER BY $fromOrder promote_date DESC
            LIMIT ?, ?
        ", array(XenForo_Application::$time, $page, $options['limit']));
 
Last edited:
Ok got this query down to 0.03 seconds with two simple edits:

Code:
SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
    IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
    IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
    EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
FROM xf_thread
    LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
    INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
    INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
    LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)

WHERE ( xf_thread.node_id IN ('109') )
    AND xf_thread.discussion_state = 'visible'
    AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
ORDER BY  promote_date DESC
LIMIT ?, ?
Params: 1393072334, 0, 10
Run Time: 0.003232
Select Type    Table    Type    Possible Keys    Key    Key Len    Ref    Rows    Extra
SIMPLE    xf_node    const    PRIMARY    PRIMARY    4    const    1    Using temporary; Using filesort
SIMPLE    xf_thread    ref    node_id_last_post_date,node_id_sticky_state_last_post    node_id_last_post_date    4    const    27    Using index condition; Using where
SIMPLE    EWRporta_promotes    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.thread_id    1    Using where
SIMPLE    xf_user    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.user_id    1  
SIMPLE    xf_post    eq_ref    PRIMARY    PRIMARY    4    mus37_xenforo.xf_thread.first_post_id    1

If you do not use the xenPorta Promote feature, which I don't, then open library/EWRporta/Block/RecentNews.php and change the following:

PHP:
        $news = $this->_getDb()->fetchAll("
            SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
                IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
                IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
                EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
            FROM xf_thread
                LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
                INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
                INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
                LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)
            $fromWhere
            WHERE ( xf_thread.node_id IN (".$this->_getDb()->quote($options['forum']).") OR EWRporta_promotes.promote_date < ? )
                AND xf_thread.discussion_state = 'visible'
                AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
            ORDER BY $fromOrder promote_date DESC
            LIMIT ?, ?
        ", array(XenForo_Application::$time, XenForo_Application::$time, $page, $options['limit']));

to:

PHP:
        $news = $this->_getDb()->fetchAll("
            SELECT xf_thread.*, xf_user.*, xf_post.message, xf_post.attach_count, xf_node.title AS node_title,
                IF(xf_user.username IS NULL, xf_thread.username, xf_user.username) AS username,
                IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) AS promote_date,
                EWRporta_promotes.promote_icon, EWRporta_promotes.promote_data
            FROM xf_thread
                LEFT JOIN xf_user ON (xf_user.user_id = xf_thread.user_id)
                INNER JOIN xf_post ON (xf_post.post_id = xf_thread.first_post_id)
                INNER JOIN xf_node ON (xf_node.node_id = xf_thread.node_id)
                LEFT JOIN EWRporta_promotes ON (EWRporta_promotes.thread_id = xf_thread.thread_id)
            $fromWhere
            WHERE ( xf_thread.node_id IN (".$this->_getDb()->quote($options['forum'])."))
                AND xf_thread.discussion_state = 'visible'
                AND IF(EWRporta_promotes.promote_date IS NULL, xf_thread.post_date, EWRporta_promotes.promote_date) < ?
            ORDER BY $fromOrder promote_date DESC
            LIMIT ?, ?
        ", array(XenForo_Application::$time, $page, $options['limit']));
You mean "Auto Promote in certain node"?
 
Top Bottom