• 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 (Module Add-Ons)

It would be neat to have GP's Steam Stats on a front page block. I wouldn't even know where to start. =/ Would this be difficult? If someone might be financially incentivized to create a block, I could throw a few dollars your way. Not much, I'm a poor starving student like many of you, but enough for a nice lunch. =)
 
It would be neat to have GP's Steam Stats on a front page block. I wouldn't even know where to start. =/ Would this be difficult? If someone might be financially incentivized to create a block, I could throw a few dollars your way. Not much, I'm a poor starving student like many of you, but enough for a nice lunch. =)
Have you tried the add-on you linked to? Does it work fine except you wish to see the same block on the portal instead of the forums?
 
Have you tried the add-on you linked to? Does it work fine except you wish to see the same block on the portal instead of the forums?

Yes, that's exactly right. I have the add-on working on the forum proper without any issues. Just thinking it would be a good fit for the portalized front page.
 
I want to make a custom iframe on my portal page..
can somebody tell me how to make the xml file for that?

thank you :)
 
I want to make a custom iframe on my portal page..
can somebody tell me how to make the xml file for that?

thank you :)

The instructions are in the second post on page 1 of this thread. They are pretty clear and thorough. How about trying to do it and then if you get stuck asking a specific question.
 
This is my MP3 Popout Player....

Code:
<?xml version="1.0" encoding="utf-8"?>
<module>
    <module_name>PortalMP3PlayerPopout</module_name>
    <module_cache>now</module_cache>
    <module_settings />
    <module_template>
        <![CDATA[
            <div class="baseHtml messageText">
                <script language="JavaScript" type="text/JavaScript" src="../audio/soundpop.js"></script>
                <a href="/audio/miracles.mp3" target="_blank" onClick="javascript:PlayerOpen('Miracles',this.href); return false">Open Popout Player</a>
            </div>
        ]]>
    </module_template>
</module>

Place the following soundpop.js file in your audio folder located just under the root.

Code:
// JavaScript Document
// Pop-Up Embedder Script by David Battino, www.batmosphere.com; Object tag implementation by Mark Levitt, http://digitalmedia.oreilly.com
var UniqueID = 314 // Make each link open in a new window.
var newWinOffset = 0 // Position of first pop-up
function PlayerOpen(soundfiledesc,soundfilepath) {

PlayWin = window.open('',UniqueID,'width=320,height=190,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus();
var winContent = "<HTML><HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY bgcolor='#FF9900'>";
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B>";

winContent += "<OBJECT width='300' height='42'>";
winContent += "<param name='SRC' value='" +  soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>";
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#FF9900'>";
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='300' HEIGHT='42' CONTROLLER='TRUE' BGCOLOR='#FF9900'></EMBED>";
winContent += "</OBJECT>";

winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='"+soundfilepath+"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";

winContent += "<FORM><DIV align='center'><INPUT type='button' value='Close this window' onClick='javascript:window.close();'></DIV></FORM>";
winContent += "</BODY></HTML>";
PlayWin.document.write(winContent);
PlayWin.document.close(); // "Finalizes" new window
UniqueID = UniqueID + 1
// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower.
}

Customize and enhance... it needs playlist configuration. peace. enjjoy!

Sample located at http://www.masterchief.com -- top of left sidebar

UPDATE - Sample moved to Right side of header in Flexile Style.
 
This is my MP3 Popout Player....

Code:
<?xml version="1.0" encoding="utf-8"?>
<module>
    <module_name>PortalMP3PlayerPopout</module_name>
    <module_cache>now</module_cache>
    <module_settings />
    <module_template>
        <![CDATA[
            <div class="baseHtml messageText">
                <script language="JavaScript" type="text/JavaScript" src="../audio/soundpop.js"></script>
                <a href="/audio/miracles.mp3" target="_blank" onClick="javascript:PlayerOpen('Miracles',this.href); return false">Open Popout Player</a>
            </div>
        ]]>
    </module_template>
</module>

Place the following popout.js file in your audio folder located just under the root.

Code:
// JavaScript Document
// Pop-Up Embedder Script by David Battino, www.batmosphere.com; Object tag implementation by Mark Levitt, http://digitalmedia.oreilly.com
var UniqueID = 314 // Make each link open in a new window.
var newWinOffset = 0 // Position of first pop-up
function PlayerOpen(soundfiledesc,soundfilepath) {

PlayWin = window.open('',UniqueID,'width=320,height=190,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus();
var winContent = "<HTML><HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY bgcolor='#FF9900'>";
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B>";

winContent += "<OBJECT width='300' height='42'>";
winContent += "<param name='SRC' value='" +  soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>";
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#FF9900'>";
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='300' HEIGHT='42' CONTROLLER='TRUE' BGCOLOR='#FF9900'></EMBED>";
winContent += "</OBJECT>";

winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='"+soundfilepath+"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";

winContent += "<FORM><DIV align='center'><INPUT type='button' value='Close this window' onClick='javascript:window.close();'></DIV></FORM>";
winContent += "</BODY></HTML>";
PlayWin.document.write(winContent);
PlayWin.document.close(); // "Finalizes" new window
UniqueID = UniqueID + 1
// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower.
}

Customize and enhance... it needs playlist configuration. peace. enjjoy!

Sample located at http://www.masterchief.com -- top of left sidebar

UPDATE - Sample moved to Right side of header in Flexile Style.
I could be wrong but has the file you told users to make called 'popout.js' yet the addon calling for 'soundpop.js' ??

Good concept btw I am interested in using this
 
@ddmmh ooops! good catch .. edited to reflect correct filename. I am still seeking method for utilizing playlist with this concept. peace!
 
Would anyone know how to modify the recent news module to have a post bump up to the top when the post is liked for example?
 
Would anyone know how to modify the recent news module to have a post bump up to the top when the post is liked for example?
Check out ragtek.org

I think there may be a mod that was just released which may do that
 
Would anyone know how to modify the recent news module to have a post bump up to the top when the post is liked for example?
You can control the order of the Recent News articles with the "Promote" feature.

I do like your idea for the Recent Threads module.
 
Check out ragtek.org

I think there may be a mod that was just released which may do that
I checked it out and all I could find was the recent posts forum block. thanks for the recommendation though.

You can control the order of the Recent News articles with the "Promote" feature.

I do like your idea for the Recent Threads module.
Oh yeah I know about the promote feature, but what I've been doing is assigning the recent news module to all of the individual forums on the site because I like the way it shows the post preview. The only problem with this is that it only shows the posts in the order that they are posted, and I'm trying to get the best user content on the first page.
 
Oh yeah I know about the promote feature, but what I've been doing is assigning the recent news module to all of the individual forums on the site because I like the way it shows the post preview. The only problem with this is that it only shows the posts in the order that they are posted, and I'm trying to get the best user content on the first page.

You can do it, but it's a bit counter-intuitive. How will a thread ever be removed from the "recent news" block? If you order the threads by the most liked content, then after a short period only articles with 10+ likes will be on the front page. Your portal page will become static, and newer posts will never be seen.

The current process allows you to keep your portal page fresh. Your newest articles are naturally promoted to the top. If you wish to manually intervene, the "Promote" option allows you to customize the order.

I am sure your request can be done, but it would seem to be a customization for your specific site as opposed to something others might use.
 
Hi all,

Can anyone tell me how can i limit the number of words in the Recent News module?

[Edit] Nevermind. I found the answer
 
Hello guys, I been trying to duplicate the recent news block, but even after renaming the instances needed it only shows up the nav part of the block and not the block it self.

I tried renaming the variables as well but did not work either and than I read that the variables don't need to be changed anymore.

PHP:
<?php

class EWRporta_Block_DiaroRecente extends XenForo_Model
{
    public function getModule(&$options, $page)
    {
        $page = ($page - 1) * $options['limit'];

        $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
            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 (".$options['forum'].") OR EWRporta_promotes.promote_date < ?)
                AND xf_thread.discussion_state = 'visible'
            ORDER BY promote_date DESC
            LIMIT ?, ?
        ", array(XenForo_Application::$time, $page, $options['limit']));

        foreach ($news AS &$post)
        {
            if ($post['attach_count'])
            {
                $post['attachments'] = $this->getModelFromCache('XenForo_Model_Attachment')->getAttachmentsByContentId('post', $post['first_post_id']);
                $post['attachments'] = $this->getModelFromCache('XenForo_Model_Attachment')->prepareAttachments($post['attachments']);
            }

            $post = $this->getThumb($post);
            $post['message'] = str_ireplace('prbreak]', 'prebreak]', $post['message']);

            if ($trimLoc = stripos($post['message'], '[prebreak]'))
            {
                $prbreak = '';

                if (($breakLoc = stripos($post['message'], '[/prebreak]', $trimLoc+10)) && ($length = $breakLoc - $trimLoc-10))
                {
                    $link = XenForo_Link::buildPublicLink('full:threads', $post);
                    $prbreak = " [url='".$link."']".substr($post['message'], $trimLoc+10, $length).'[/url]...';
                }

                $post['message'] = substr($post['message'], 0, $trimLoc).$prbreak;
            }
            else
            {
                $post['message'] = XenForo_Helper_String::wholeWordTrim($post['message'], $options['truncate']);
            }

            $post['message'] = preg_replace('#\n{3,}#', "\n\n", trim($post['message']));
        }

        $options['parseBB'] = true;
        $options['count'] = $this->getCount($options);

        return $news;
    }

    public function getCount($options)
    {
        $count = $this->_getDb()->fetchRow("
            SELECT COUNT(*) AS total
                FROM xf_thread
                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'
        ", XenForo_Application::$time);

        return $count['total'];
    }

    public function getThumb($post)
    {
        if (preg_match('#\[medio\](\d+)\[/medio\]#i', $post['message'], $matches))
        {
            if ($post['medio'] = $this->getModelFromCache('EWRmedio_Model_Media')->getMediaByID($matches[1]))
            {
                $post['message'] = str_ireplace('[medio]'.$matches[1].'[/medio]', '', $post['message']);
                $post['message'] = str_ireplace('[medio=full]'.$matches[1].'[/medio]', '', $post['message']);
                return $post;
            }
        }

        if (!empty($post['attachments']))
        {
            foreach ($post['attachments'] AS $attach)
            {
                if ($attach['thumbnailUrl'])
                {
                    $post['attach'] = $attach;
                    $post['message'] = str_ireplace('[attach]'.$attach['attachment_id'].'[/attach]', '', $post['message']);
                    $post['message'] = str_ireplace('[attach=full]'.$attach['attachment_id'].'[/attach]', '', $post['message']);
                    return $post;
                }
            }
        }

        if (preg_match('#\[img\](.+?)\[/img\]#i', $post['message'], $matches))
        {
            $post['image'] = $matches[1];
            $post['message'] = str_ireplace('[img]'.$matches[1].'[/img]', '', $post['message']);
            return $post;
        }

        return $post;
    }
}

Continued...
 
Code:
<?xml version="1.0" encoding="utf-8"?>
<module>
  <module_name>DiaroRecente</module_name>
  <module_cache>+1 hours</module_cache>
  <module_settings>
    <forum desc="Diário Recente Forum?" format="forums">78</forum>
    <limit desc="Diário Recente Limit?" format="">5</limit>
    <truncate desc="Diário Recente Truncate?" format="">1000</truncate>
    <pagenav desc="Show Page Navigation?" format="check">1</pagenav>
    <social desc="Show Social Options?" format="check">1</social>
  </module_settings>
  <module_template><![CDATA[<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />

<div id="recentNews">
    <xen:foreach loop="$DiarioRecente" value="$news">
        <div class="section sectionMain recentNews" id="{$news.thread_id}">
            <div class="primaryContent">
                <div class="subHeading">
                    <div style="float: right; white-space: nowrap;">
                        <a href="{xen:link threads, $news}"><xen:datetime time="$news.promote_date" /></a>
                        <xen:if is="{$visitor.permissions.EWRporta.canPromote}">
                            &nbsp; (<a href="{xen:link 'threads/edit', $news}" class="OverlayTrigger">{xen:phrase edit}</a>)
                        </xen:if>
                    </div>

                    <a href="{xen:link threads, $news}">{$news.title}</a>
                </div>

                <div class="messageUserBlock">
                    <div class="avatarHolder">
                        <xen:if is="{$news.attach}">
                            <a href="{xen:link threads, $news}"><img src="{$news.attach.thumbnailUrl}" alt="{$news.attach.filename}" /></a>
                        <xen:elseif is="{$news.medio}" />
                            <div style="background: url('data/media/{$news.medio.media_id}.jpg') no-repeat;">
                                <a href="{xen:link 'full:media/popout', $news.medio}" class="OverlayTrigger"><img src="js/8wayrun/EWRmedio_play.png" width="160" height="90" /></a>
                            </div>
                        <xen:elseif is="{$news.image}" />
                            <a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" style="max-height: 150px; max-width: 150px;" /></a>
                        <xen:else />
                            <xen:avatar user="$news" size="m" itemprop="photo" />
                        </xen:if>
                    </div>
                </div>

                <xen:if is="{$option.social}">
                    <xen:if hascontent="true">
                        <div class="messageUserShare">
                            <xen:contentcheck>
                                <xen:if is="{$xenOptions.tweet.enabled}">
                                    <div class="tweet shareControl">
                                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical"
                                            data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
                                            data-url="{xen:link canonical:threads, $news}"
                                            data-text="{$news.title}"
                                            {xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
                                            {xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
                                    </div>
                                </xen:if>
                                <xen:if is="{$xenOptions.facebookLike}">
                                    <div class="facebookLike shareControl">
                                        <xen:container var="$facebookSdk">1</xen:container>
                                        <fb:like href="{xen:link canonical:threads, $news}" layout="box_count" font="trebuchet ms" colorscheme="{xen:property fbColorScheme}"></fb:like>
                                    </div>
                                </xen:if>
                            </xen:contentcheck>
                        </div>
                    </xen:if>
                </xen:if>
 
                <div class="messageContent baseHtml">
                    {xen:raw $news.messageHtml}

                    <div style="text-align: right;">
                        <a href="{xen:link threads, $news}" style="background: transparent url('{xen:property imagePath}/xenforo/icons/redirect.png') no-repeat left bottom; padding-left: 20px;">
                            {xen:phrase continue_reading}
                        </a>
                    </div>

                    <div style="clear: right;"></div>
                </div>
                <div class="sectionFooter">
                    <div style="float: right; white-space: nowrap;">
                        <a href="{xen:link threads, $news}">{xen:phrase replies}: {xen:number $news.reply_count}</a>
                    </div>
                    {xen:phrase discussion_in_x_started_by_y_date_z, 'forum=<a href="{xen:link forums, $news}">{$news.node_title}</a>', 'name=<a href="{xen:link members, $news}" class="username">{$news.username}</a>', 'date=<a href="{xen:link threads, $news}">{xen:datetime $news.post_date, html}</a>'}
                </div>
            </div>
        </div>
    </xen:foreach>

    <xen:if hascontent="true">
    <div class="section sectionMain">
        <xen:contentcheck>
        <xen:if is="{$xenOptions.EWRporta_breakout}">
            <div style="margin: -5px 0px; {xen:if '{$option.pagenav} && {$option.count} > {$option.limit}', 'float: right;'}">
                <xen:include template="EWRporta_Footer" />
            </div>
        </xen:if>
        <xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
            <div style="margin-left: 5px;">
                <xen:pagenav link="portal" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
            </div>
        </xen:if>
        </xen:contentcheck>
    </div>
    </xen:if>
</div>]]></module_template>
</module>

Any help is appreciated, thanks!
 
Is it possible to make the Xenporta modules that I have in my portal sidebar also appear on the forum sidebar?

Having it consistent across portal and forums would be really useful.
 
The slideshow on the top is just a custom block using Joomla's Slideshow plugin with a -45px left margin. It would be very easy to do yourself.
I purchased and use that slideshow for vbulletin and vbadvanced. Works similar to the one you are using with your portal. You referred to a plugin Joomla
s Slideshow has. Is there such a beast?

I could use the stand alone version, but it'd be a pain in the arse to have to manually feed the damn thing.
 
I purchased and use that slideshow for vbulletin and vbadvanced. Works similar to the one you are using with your portal. You referred to a plugin Joomla
s Slideshow has. Is there such a beast?

I could use the stand alone version, but it'd be a pain in the arse to have to manually feed the damn thing.
Wrong thread. I suggest you search google, im sure there would be something out there for Joomla
 
Top Bottom