• 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)

Re- your edit, yes that's what I need. Along with someone to help adjust my actual block code to include the subcategorys.
 
Re- your edit, yes that's what I need. Along with someone to help adjust my actual block code to include the subcategorys.
I can't help that much now (for about 8 hours) but to get to your solution, you need these elements in the template:
Code:
<xen:foreach loop="$articles" value="$article">
<xen:if is="{$article.parent_id} > 0"> code for sub e.g. <li>$article.subcategory_name</li><xen:else /> code for not sub </xen:if>
</xen:foreach>
 
Well this is my current template code it just needs adjusting with the block php once that is done;

HTML:
<xen:if hascontent="true">
<div class="section">
<div class="secondaryContent" id="articles" style="padding-bottom: 5px;">
<h3>Articles</h3>
<xen:contentcheck>
<xen:foreach loop="$Articles" value="$mystuff">
<p>{$mystuff.one}</p>
</xen:foreach>
</xen:contentcheck>
</div>
</div>
</xen:if>
 
Well this is my current template code it just needs adjusting with the block php once that is done;

HTML:
<xen:if hascontent="true">
<div class="section">
<div class="secondaryContent" id="articles" style="padding-bottom: 5px;">
<h3>Articles</h3>
<xen:contentcheck>
<xen:foreach loop="$Articles" value="$mystuff">
<p>{$mystuff.one}</p>
</xen:foreach>
</xen:contentcheck>
</div>
</div>
</xen:if>

Well first something to the php.
you don't need that:
PHP:
        foreach ($mystuff as &$stuff)
        {
            $stuff = array(
            'one' => $stuff['top_name']
            );
        }
because the $this->_getDb()->fetchAll(" already saves all in the $mystuff variable which is also your return value.

You should work with the {$mystuff.top_name} (instead of $mystuff.one)to start with.
Hope this helps for the start.
 
Okay so i changed the template code to this;
Code:
<xen:foreach loop="$Articles" value="$mystuff">
<xen:if is="{$mystuff.parent} == 0">
{$mystuff.top_name}<br />
<xen:else />
{$mystuff.sub_name}<br />
</xen:if>
</xen:foreach>

and the php block code to this;
PHP:
<?php
 
class EWRporta_Block_Articles extends XenForo_Model
{
    public function getModule()
    {
        $mystuff = $this->_getDb()->fetchAll(
        'SELECT 
            top.category_id as top_id,
            top.category_name as top_name,
            top.category_parent as parent,
            sub.category_id as sub_id,
            sub.category_name as sub_name,
            sub.category_parent as parent
        FROM 
            `articles_category` top
        LEFT JOIN 
            articles_category sub ON sub.category_parent = top.category_id
        WHERE
            top.category_parent = 0
        ORDER BY
            top.category_name, sub.category_name
        ');
 
        return $mystuff;
    }
}

My block then gives me this;
Category 1 SUB
Category 2 SUB
Top Category 3

Which is clearly wrong as where is top category 1 & 2 and why are the subs above the top category when my sql clearly sorts them out by top then sub.
 
User Albums Latest Pictures updated - [XFR] User Albums v.1.0.0 Beta 7


If you want the User Albums Latest Pictures on Top-Right, Mid-Right and Btm-Right positions edit EWRblock_UserAlbumsLatestPictures.css

.uathumbnailHolder
{
float: left;
width: 100%;
text-align: center;
}

to other value that suit you.
 

Attachments

ACP (Home) ->(XenPorta) Blocks
+ Create Block


Block ID: BannerSidebar
Title: Sidebar Banner
Version String: 1.5.1
Version ID: 1

Click Save Block

Adjus Block Cache Time to satisfy your needs

View attachment 22368

Appearance -> Styles -> Master Style -> Create New Template

Template Name: EWRblock_BannerSidebar
Template data:

<div class="section">
<div class="secondaryContent" id="BannerSidebar">
<h3>It's Working</h3>
<div>
<p>I am so Happy :)</p>
</div>
</div>
</div>


Save all Changes


View attachment 22367



Go back to ACP (Home) -> (XenPorta) -> (Layouts) -Portal or your layout

The block that you just created is listed under Disabled Blocks in the blocks admin area.


Why do I have no "Create Block" button? Did i miss something during install?
http://cl.ly/2j1b1u3l221k2Z2S0y36
 
Maybe I am a bit confused but when i installed xenporta It did not include all the blocks mentioned above. Also i cant find any link to download the other blocks.

Am i missing something?

For example: I am missing the donations block/module
 
Thank you,

New problem...
When i add the donations module to the layout and save it, when i visit the website i get a HTTP 500 Internal Server Error.

Any ideas?
 
Hi guys

My forum is for photographers and I installed the (xfr)User Album add-on.

I really want to get the newest uploaded photos from the album on the front page like the UserAlbumsLatestPictures block does but just listed side by side instead of one thumb per row like here:

Skærmbillede 2012-01-24 kl. 17.56.08.webp

Would it be possible?

Or do one of you have a suggestion for a better solution for me - an alternative to the (xfr)User Album Add-on or the UserAlbumsLatestPictures block.

I try to avoid manual code changes to make updates less risky.

All the best
Morten Hilmer
 
Is it a bug when you Export (or download through FTP) a modified Addon and when you open it up, it is the default addon. The only way to see the previously modified content is to open the template in the ACP, what gives?

What I'm trying to accomplish is Exporting a heavily modded XML file to rename, retitle etc and duplicate the Addon, similar to the RecentNews2.
 
Is it a bug when you Export (or download through FTP) a modified Addon and when you open it up, it is the default addon.

You have to modify your Master Style.


... but just listed side by side instead of one thumb per row ...

You have to edit your EWRblock_UserAlbumsLatestPictures.css

.uathumbnailHolder
{
float: left;
width: 100%;
text-align: center;
}

5 images per row

.uathumbnailHolder
{
float: left;
width: 19%;
text-align: center;
}
 
You have to modified your Master Style.

Thank you for replying, however I have one custom style marked as my selected style (and it is the default style). The original "default" style is un-selected and users have no choice to select that style. So I don't see why I would have to modify those addon templates, but for s&g's I did anyway and then tried exporting again... same end result. A non-modified default XML file?
 
FYI, just to try to get it to export my modified addons, I redid the entire XML file, re-installed that block, so it was by default my modified file. Tried exporting again, yet still the same original default XML file? Clearing the block cache doesn't help. I just don't get it, it seems like Xenporta has some bugs with updating as well, (for instance when I set a default forum layout [with no id], the forum never updates and even though I deleted that forum layout [and only have the portal layout now] the forum still shows blocks??). I really want to use this and willing to donate if these aren't bugs and I can get it to work as hoped. Thanks again for replying boban.
 
Top Bottom