• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[8wayRun.Com] XenPorta (Portal)

Status
Not open for further replies.
Text within [PREBREAK] only appears on the portal, it does not appear in the actual thread. As well, the actual text within the break will be linked to the thread. So you would want to do something like:
Code:
[PREBREAK]More after the break[/PREBREAK]
The words, linked to the thread "More after the break" will only appear on the portal, and not in the thread itself.
Hi Jaxel,

Ah ok I got you. Ok well I tested that out and to the same effect the portal is MUCH quicker with prebreak tags.

I guess my question is now, would there be a way for the prebreak tags to be automatically be inserted after the charecter limit cutoff???
 
[Suggestion]

Make the RecentThreads (and any other modules with XX days cutoff) a setting in the XML.
It would reduce the confusion of why threads aren't showing for some with test and slower boards, and also make it a bit more generic for different types of traffic.
 
Promoted Threads are shown in the Recent News block. So if you have a problem with Recent News then you can't get promoted threads either.

What is the problem you are getting with the recent news?
 
Hey all,

Both the Promote Thread and Recent News doesn't work - Recent News comes up with a blank error and the Promote Thread doesn't do a thing.
It works fine, if its not working on your site youll need to provide more info like screenshots/log errors etc etc otherwise no one can really help
 
Latest threads - how do you make it so they fetch posts longer than 24 hours old? as if I post a thread yesterday and one today it would only fetch the today one.
 
Do a search for any template beginning with ad_

Add your Google AdSense code to the template which is in the position you want.
The names of the templates are self explanatory.
 
Hi Jaxel,

Ah ok I got you. Ok well I tested that out and to the same effect the portal is MUCH quicker with prebreak tags.

I guess my question is now, would there be a way for the prebreak tags to be automatically be inserted after the charecter limit cutoff???

Bumpity bump
 
How would I set RecentThreads so it as no time limit?

PHP:
<?php

class EWRporta_Block_RecentThreads extends XenForo_Model
{
    public function getBypass($params)
    {
        $visitor = XenForo_Visitor::getInstance();

        $conditions = array(
            'last_post_date' => array('>', XenForo_Application::$time - 86400),
            'deleted' => false,
            'moderated' => false
        );
        if ($params['option']['recentthreads_forum'])
        {
            $conditions['forum_ids'] = explode(',', $params['option']['recentthreads_forum']);
        }

        $fetchOptions = array(
            'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
            'permissionCombinationId' => $visitor['permission_combination_id'],
            'readUserId' => $visitor['user_id'],
            'watchUserId' => $visitor['user_id'],
            'postCountUserId' => $visitor['user_id'],
            'order' => 'last_post_date',
            'orderDirection' => 'desc',
            'limit' => $params['option']['recentthreads_limit'],
        );

        $threads = $this->getThreads($conditions, $fetchOptions);

        foreach ($threads AS $threadID => &$thread)
        {
            if ($this->getModelFromCache('XenForo_Model_Thread')->canViewThreadAndContainer($thread, $thread))
            {
                $thread = $this->getModelFromCache('XenForo_Model_Thread')->prepareThread($thread, $thread);
                $thread['canInlineMod'] = false;
                $thread['showForumLink'] = true;
            }
            else
            {
                unset($threads[$threadID]);
            }
        }

        return $threads;
    }

    public function getThreads(array $conditions, array $fetchOptions = array())
    {
        $whereConditions = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadConditions($conditions, $fetchOptions);

        $sqlClauses = $this->getModelFromCache('XenForo_Model_Thread')->prepareThreadFetchOptions($fetchOptions);
        $limitOptions = $this->getModelFromCache('XenForo_Model_Thread')->prepareLimitFetchOptions($fetchOptions);

        if (!empty($conditions['forum_ids']))
        {
            $whereConditions .= ' AND thread.node_id IN ('.$this->_getDb()->quote($conditions['forum_ids']).')';
        }

        return $this->fetchAllKeyed($this->limitQueryResults('
                SELECT thread.*
                    ' . $sqlClauses['selectFields'] . '
                FROM xf_thread AS thread
                ' . $sqlClauses['joinTables'] . '
                WHERE ' . $whereConditions . '
                ' . $sqlClauses['orderClause'] . '
            ', $limitOptions['limit'], $limitOptions['offset']
        ), 'thread_id');
    }
}

If I change this line in the above code it eather only gets a week of threads or none.

PHP:
            'last_post_date' => array('>', XenForo_Application::$time - 86400),

Any ideas how to grab all latest threads like the news does where it limits them to what you put in the options mines set to fetch the latest 5 and not 3.
 
How would I set RecentThreads so it as no time limit?

Snip

Any ideas how to grab all latest threads like the news does where it limits them to what you put in the options mines set to fetch the latest 5 and not 3.

As soon as you have alot of threads you will run into problems if you don't limit it by time.

But if you really want to ignore the time then just change the line
PHP:
'last_post_date' => array('>', XenForo_Application::$time - 86400),
to
PHP:
//'last_post_date' => array('>', XenForo_Application::$time - 86400),
 
Re: limiting time
Ideally there might be some dynamic code where it counts how much posting is going on and picks the optimal situation.
Lots of posts / per unit of time = limit by time.
few posts / per unit of time = no limit.
 
[8wayRun.Com] XenPorta (Portal) v1.3.4 CHANGELOG
  • EventsUpcoming Block has been rewritten (needs v1.3.4 of XenAtendo).
    • If you have "streams only" enabled, javascript will try to find the live status of the stream.
    • If you have "show venue" disabled, the time stamp will display a shortened version as well.
  • RecentThreads Block now has an option to define the CUTOFF for thread searching, in days.
  • RecentNews Block has been rewritten to hopefully make it marginally faster.
 
Status
Not open for further replies.
Back
Top Bottom