Fork me on GitHub

Rapport de message :*
 

Re: News 1.67

Titre du sujet : Re: News 1.67
par mtriclin sur 24/06/2012 20:36:18

Bonsoir,

Pour ma part, j'ai modifié le fichier news/templates/blocks/news_block_top.html à partir de la ligne 852 car j'avais des décalages (genre poupée russe) avec les articles affichés en mode spotlight.Apparament le pb était dû à des balises <li>. J'ai créé à la place un tableau pour afficher mes articles et rajouter un lien en savoir à chaque article affiché.


<{* ************************************** Tabs creation ************************************** *}>
<
ul id="tabNavigation">
<{foreach 
item=onetab from=$block.tabs}>
    <{if 
$block.current_tab == $onetab.id}>
    <
li class="selectedTab"><a href='#'><{$onetab.title}></a></li>
    <{else}>
    <
li><a href="<{$block.url}>NewsTab=<{$onetab.id}>"><{$onetab.title}></a></li>
    <{/if}>
<{/foreach}>
    <
li class="fixTabsIE"><a href="javascript:void(0);">&nbsp;</a></li>
</
ul>

<{if 
$block.current_is_spotlight}>
    <
div style="border-top: 1px solid rgb(0, 0, 0); background: <{$block.color1}> none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><{$block.spotlight.author}> <{$block.lang_on}> <{$block.spotlight.date}> <{if $block.use_rating}> - <{$block.spotlight.rating}>/10 (<{$block.spotlight.number_votes}>)<{/if}>, <{$block.spotlight.hits}> <{$block.lang_reads}><br /></div>
<{else}>
    <
div style="border-top: 1px solid rgb(0, 0, 0); background: <{$block.color1}> none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;">
    <{foreach 
item=onesummary from=$block.smallheader}>
        <{
$onesummary}>&nbsp;
    <{/foreach}>
    <
br /></div>
<{/if}>
    <{* ************************************** 
Body of the current tab ************************************** *}>
<
div id="fullSupport">
    <{if 
$block.current_is_spotlight && $block.tabs.id==0}>
        <
table border='0'>
        <
tr>
            <
td colspan='2'>
                <
table border='0'>
                <
tr><td><img src='<{$block.spotlight.topic_image}>' border='0' alt='' /></td><td align='left'><{$block.spotlight.topic_description}></td></tr>
                </
table>
            <
div class="itemBody"><ul><li><{$block.spotlight.title_with_link}></li></ul></div></td>
        </
tr>
        <
tr>
            <
td><{$block.spotlight.image}>&nbsp;</td><td><class="note"><{$block.spotlight.text}></p></td>
        </
tr>
        </
table>
        <
br /><center><hr width='85%' /></center>
        <
ul>
            <{foreach 
item=onenews from=$block.spotlight.news}>
                <
li><{$onenews.date}> - <{$onenews.title_with_link}></li>
            <{/foreach}>
        </
ul>
    <{else}>
        <
table border='0'>
        <
tr><td><img src='<{$block.topic_image}>' border='0' alt='' /></td><td align='left'><{$block.topic_description}></td></tr>
        </
table>
        <{foreach 
item=onenews from=$block.news}>
            <
div class="itemBody"><ul><li><{$onenews.title}></li></ul><span class="itemStats">&nbsp;&nbsp;<{$onenews.author}> <{$block.lang_on}> <{$onenews.date}> - <{if $block.use_rating}> <{$onenews.rating}>/10 (<{$onenews.number_votes}>)<{/if}>, <{$onenews.hits}> <{$block.lang_reads}></span></div>
            <
class="note"><{$onenews.text}></p>
        <{/foreach}>
    <{/if}>
</
div>
<{else}>    <{* ************************************** 
Classical view ************************************** *}>
<
table>
    <{if 
$block.spotlight}>
    <
tr>
        <
td><table>
        <
tr>
            <
td colspan='2'>
                <
table border='0'>
                <
tr><td><img src='<{$block.spotlight.topic_image}>' border='0' alt='<{$block.spotlight.title}>' /></td><td align='left'><{$block.spotlight.topic_description}></td></tr>
                </
table>
                <
font color="#FF6600"><b><{$block.spotlight.title}></b></font> <{$block.spotlight.author}>
            <{if 
$block.sort=='counter'}>
                (<{
$block.spotlight.hits}>)
            <{elseif 
$block.sort=='published'}>
                (<{
$block.spotlight.date}>)
            <{else}>
                (<{
$block.spotlight.rating}>)
            <{/if}>
            </
td>
        </
tr>
        <
tr>
            <
td><{$block.spotlight.image}></td><td><{$block.spotlight.text}></td>
        </
tr>
        <
tr>
            <
td colspan='2'>
            <{if 
$block.spotlight.read_more}>
                <
hr width='98%' />
                <
div align='right'><a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$block.spotlight.id}>"><{$block.lang_read_more}></a> &nbsp;&nbsp;&nbsp;</div>
                <
hr width='98%' />
            <{/if}>
            </
td>
        </
tr>
        </
table></td>
    </
tr>
    <{/if}>
    <
tr>
        <
td>

            <
table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
                <
tbody>
                <{foreach 
item=news from=$block.stories}>
                    <
tr>
                    <
td style="vertical-align: top;">
                        <{if 
$news.id != $block.spotlight.id}>
                            <!-- 
modification xoosp -->
                            <!-- <
li> -->
                            <
h2>
                               <
span>
                                <{if 
$block.sort=='counter'}>
                                    [<{
$news.hits}>]
                                <{elseif 
$block.sort=='published'}>
                                    <!-- [<{
$news.date}>] -->
                                <{else}>
                                    [<{
$news.rating}>]
                                <{/if}>
                                </
span>
                                <
a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$news.id}>" <{$news.infotips}>><{$news.title}></a>
                            </
h2>
                            <{if 
$news.teaser}><p><{$news.teaser}></p><{/if}>
                            <!-- 
modification xoops -->
                            <!-- </
li> -->
                        <{/if}>
                        <
div align='right'><a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$news.id}>"><{$block.lang_read_more}></a> &nbsp;&nbsp;&nbsp;</div>
                    </
td>
                    </
tr>
                <{/foreach}>
                </
tbody>
            </
table>    

        </
td>
    </
tr>
</
table>
<{/if}>

*/


EDIT Cesag : mise sous code et non sous quote
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

56 Personne(s) en ligne (34 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 56 | Plus ...