XF 1.2 Custom Recent News Block (Xenporta)

Joykiller

Member
So I've been changing, modifying some code to fit for my forum, and was wondering..

Code:
<xen:if is="{$news.promote_icon} != 'disabled'">
            <xen:if hascontent="true">
                <div class="newsImage">
                    <xen:contentcheck>
                    <xen:if is="{$news.attach}">
                        <a href="{xen:link threads, $news}"><img src="{xen:link attachments, $news.attach}" alt="{$news.attach.filename}" /></a>
                         <div class='newsTitle'><h2><a href="{xen:link threads, $news}" title="{$news.title}">{xen:helper threadPrefix, $news}{$news.title}</a></h2></div>
                    <xen:elseif is="{$news.image}" />
                        <a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" /></a>
                         <div class='newsTitle'><h2><a href="{xen:link threads, $news}" title="{$news.title}">{xen:helper threadPrefix, $news}{$news.title}</a></h2></div>
                    <xen:else />
                        <font color="red">Replace with Default Image for each node it comes from if possible. Unless image is posted within the post then will use custom image.</font>
                    </xen:if>
                    </xen:contentcheck>
                        
                </div>
            </xen:if>
            </xen:if>

The Image gets displayed if its attached to the thread. This system works perfectly however, my question is there is about 4 different forum sections that i allow the recent news block to pull news from. Is there a way to make it load a "Default" image from that specific forum section.

For example:
If a news post came from the Game forum news section of Age of Conan. It would display an AOC theme'd image. by default, Unless custom is placed within the $news.attach.

So how do i determine where the post originated from? something like {xen:helper threadnode?}
So I can code this using an else statement?

Thank you for taking the time to help me!
 
Last edited:
But its not really an addon specific question. It's more of a forum question i guess considering thats where the posts are originating from.. But I guess you are right it is loaded from an addon, you mind moving this to the addon thread then?
 
Back
Top Bottom