salut
J'ai deja tout éssayer (forum anglais...) mais perssonne veut me repondre
En fait je n'arrive pas a faire marcher le mod all_article sur mambo 4.51 avec 404sef (url rewritting).
Les url ne sont pas bonne (../content/view/55... alors que sa devrait faire ../section1/categories2/titre-de-larticle..) par contre les categories et tout saffiche bien :
VOici un exemple de ce que sa fait :
Catégorie 1
- article
- article
- article
Catégorie 2
- article
- article
- article
...
Voici le code php du mod :
PHP Code:
<?PHP
// $Id: mod_allarticles.php,v 1.10 2003/02/11 12:43:02 ffab Exp $
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $mosConfig_offset;
$section = @$params->section ? intval($params->section) : 5;
$catlink = @$params->catlink ? intval($params->catlink) : 0;
$catbold = @$params->catbold ? intval($params->catbold) : 1;
$now = date( "Y-m-d H:i:s", time()+$mosConfig_offset*60*60 );
$query = "SELECT id, title"
. "\nFROM #__categories"
. "\nWHERE section = '$section'"
. "\nORDER BY section ASC";
$database->setQuery( $query );
$rows = $database->loadObjectList();
?>
<table cellpadding="1" cellspacing="1" border="0">
<?php foreach ($rows as $row) { ?>
<tr>
<td colspan="2">
<?
if ($catlink == 1) {
?>
<a href="<?php echo sefRelToAbs("index.php?option=content&task=section&id=$section& Itemid=$row->id"); ?>">
<?
}
if ($catbold == 1) {
echo "<b>";
}
echo $row->title;
if ($catbold == 0) {
echo "</b>";
}
if ($catlink == 1) {
echo "</a>";
}
?>
</td>
</tr>
<?
$query2 = "SELECT id, title"
. "\nFROM #__content"
. "\nWHERE sectionid = '$section'"
. "\nAND catid = '$row->id'"
. "\nAND state='1' AND checked_out='0'"
. "\nAND (publish_up = '0000-00-00 00:00:00' OR publish_up <= '$now')"
. "\nAND (publish_down = '0000-00-00 00:00:00' OR publish_down >= '$now')"
. "\nORDER BY ordering ASC";
$database->setQuery( $query2 );
$rows2 = $database->loadObjectList();
foreach ($rows2 as $row2) {
?>
<tr>
<td><a href="<?php echo sefRelToAbs("index.php?option=content&task=view&id=$row2->id"); ?>">- <?php echo $row2->title ?></a></td>
</tr>
<?
}
}
?>
</table>
JE pense qu'il y a juste un petit truc a changer au niveau des codes d'url du mods pour l'adapter a mambo 4.51 (car il etait pour une vieille version)
J'ai essayer de comparer avec les mods latestnews, mostread... mais jai pas réussi
Je serai très content si quelqeun pouvaiut m'aider car j'en ai grand besoin de ce mod
Merci davance
a+
a++