Subrion CMS Support Forums   Follow Subrion on Twitter Join Us on Facebook

Go Back   Subrion CMS Support Forums > Subrion CMS Core Discussion > Subrion Core Discussion

Subrion Core Discussion Here we discuss everything that is related to Subrion CMS core functionality. Additional features related to plugins and templates engines. New features that are related to Manage Pages functionality or anything that's not related to Subrion packages.

Reply

 

LinkBack Thread Tools Display Modes
Old 06-03-2007   #1 (permalink)
Senior Member
 
Join Date: May 2007
Posts: 105
LorenGK is on a distinguished road
Default Home Page ~ Subitems display

I don't see subitems displayed on the home page with articles, is there a button that does shows them?

What I would like is to display Subitems (which I have renamed in mine to News Briefs) above Articles on the home page is it possible to provide me with details?

Also how do i remove from the xooarticles article script from home page 'title'?
LorenGK is offline   Reply With Quote
Old 06-03-2007   #2 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: Home Page ~ Subitems display

To show last subitems on Home Page(this is true for xooArticles v1.1):
1. In file index.php add following lines above $xaSmarty->display('index.tpl');:
PHP Code:
$subitems =& $xaFront->getSubitems(05); // This shows last 5 subitems
$xaSmarty->assign_by_ref('subitems'$subitems); 
2. In the file templates/Default/index.tpl find line
PHP Code:
{include file="box-header.tpl" color="green" caption=$gLang.latest_articles
and insert next code above
PHP Code:
{if $subitems}
    {include 
file="box-header.tpl" color="green" caption="Latest Subitems"}
    {foreach 
from=$subitems item=subitem}
        {include 
file="brief-subitem.tpl"}
    {/foreach}    
    {include 
file="box-footer.tpl" color="green"}
{/if} 
3. In the file classes/xaFront.class.php find function
PHP Code:
    function &getSubitems($aStart 0$aLimit 0$aWhere '')
    {
        
$sql "SELECT t1.*, t2.`title` scategory, t3.`username` owner ";
        
$sql .= "FROM `{$this->mPrefix}subitems` t1 ";
        
$sql .= "LEFT JOIN `{$this->mPrefix}subitem_categories` t2 ";
        
$sql .= "ON t1.`id_subitem_category` = t2.`id` ";
        
$sql .= "LEFT JOIN `{$this->mPrefix}accounts` t3 ";
        
$sql .= "ON t1.`id_account` = t3.`id` ";
        
$sql .= " WHERE t1.`status`='active' ";
        if (
$aWhere)
        {
            
$sql .= $aWhere;
        }
        
$sql .= $aLimit "LIMIT {$aStart}, {$aLimit}" '';

        return 
$this->getAll($sql);
    } 
and change it tho this
PHP Code:
    function &getSubitems($aStart 0$aLimit 0$aWhere '')
    {
        
$sql "SELECT t1.*, t2.`title` scategory, t3.`username` owner ";
        
$sql .= "FROM `{$this->mPrefix}subitems` t1 ";
        
$sql .= "LEFT JOIN `{$this->mPrefix}subitem_categories` t2 ";
        
$sql .= "ON t1.`id_subitem_category` = t2.`id` ";
        
$sql .= "LEFT JOIN `{$this->mPrefix}accounts` t3 ";
        
$sql .= "ON t1.`id_account` = t3.`id` ";
        
$sql .= " WHERE t1.`status`='active' ";
        if (
$aWhere)
        {
            
$sql .= $aWhere;
        }
        
$sql .= " ORDER BY t1.`posted` DESC ";
        
$sql .= $aLimit "LIMIT {$aStart}, {$aLimit}" '';

        return 
$this->getAll($sql);
    } 

Last edited by Sergey Hmelevsky; 06-03-2007 at 11:54 PM.
Sergey Hmelevsky is offline   Reply With Quote
Old 06-04-2007   #3 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: Home Page ~ Subitems display

To change Home Page title find in "Language Manager" phrase by variable name "site_title" (as shown on attached image) and change its value.
Attachment 7

Last edited by Sergey Hmelevsky; 11-12-2009 at 01:53 AM.
Sergey Hmelevsky is offline   Reply With Quote
Old 06-04-2007   #4 (permalink)
Senior Member
 
Join Date: May 2007
Posts: 105
LorenGK is on a distinguished road
Default Re: Home Page ~ Subitems display

Thank You Hun!
LorenGK is offline   Reply With Quote
Old 06-04-2007   #5 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: Home Page ~ Subitems display

don't hesitate to ask for help
Sergey Hmelevsky is offline   Reply With Quote
Old 06-05-2007   #6 (permalink)
Senior Member
 
Join Date: May 2007
Posts: 105
LorenGK is on a distinguished road
Default Re: Home Page ~ Subitems display

That worked a treat! And i have even managed to work out how to put my amazon Iframe ad!

Bless you for that, it's looking gooood!
LorenGK is offline   Reply With Quote
Old 06-05-2007   #7 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: Home Page ~ Subitems display

Well, will be considered that this thread is solved.
Sergey Hmelevsky is offline   Reply With Quote
Old 06-05-2007   #8 (permalink)
Senior Member
 
Join Date: May 2007
Posts: 105
LorenGK is on a distinguished road
Default Re: Home Page ~ Subitems display

Absolutely!
LorenGK is offline   Reply With Quote
Old 06-05-2007   #9 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: Home Page ~ Subitems display

Don't think that i am a strange fellow, I post last message in solved thread in order to faster orientate on forum.
Sergey Hmelevsky is offline   Reply With Quote
Old 06-05-2007   #10 (permalink)
Senior Member
 
Join Date: May 2007
Posts: 105
LorenGK is on a distinguished road
Default Re: Home Page ~ Subitems display

Nah...your just trying to get more posts coz you can see I am catching you up!!LOL
LorenGK is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Subitems ~ What is it? Confused :( LorenGK General Chat 7 06-06-2007 04:35 AM


All times are GMT -6. The time now is 09:39 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0