Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / Ordre des annonces du module

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

Ordre des annonces du module

More
7 years 8 months ago #26291 by Minie
Ordre des annonces du module was created by Minie
Bonjour,

je cherche à modifier l'ordre d'affichage des annonces du module horizontal, mais je ne trouve la requête nul part.

J'ai créé un champ ad_agenda, j'aimerais donc un affichage ORDER BY ad_agenda DESC mais je ne trouve pas cette requete, comment puis-je arriver résoudre ce problème svp ?

Merci d'avance
More
7 years 8 months ago #26297 by loic
Replied by loic on topic Ordre des annonces du module
Bonjour,

Il faut modifier le fichier 'adsministrator/components/com_adsmanager/models/content.php', line 544 in the function getLatestContents().

You can change one of the option 'ORDER BY' by ORDER BY a.ad_agenda DESC.

After that select the correct setting in the option of the module.

Best regards.
More
7 years 8 months ago #26300 by Minie
Replied by Minie on topic Ordre des annonces du module
Bonjour,

merci pour votre réponse. Par contre la solution ne fonctionne pas, ou alors j'ai du mal faire quelque chose.

j'ai bien modifié dans 'adsministrator/components/com_adsmanager/models/content.php' la fonction 'getLatestContents()' la partie latest ligne 558 par :

/* Latest */
case 0:
default:
$order_sql = "ORDER BY a.ad_agenda DESC ";
break;

Et l'option 'Dernières annonces' est bien réglée dans le module.

J'ai même du changer le fichier langue FR pour mettre la date au format SQL Y-m-d puis réenregistré toutes les dates, car je ne sais pour quelle raison, lorsque l'on créer un champ date dans AdsManager, cela créer un champ text dans la Bdd. Donc là, toutes les dates du champ ad_agenda sont bien au format Y-m-d dans la Bdd, mais en champ text, et pourtant le tri ne se fait pas.

Cordialement
More
7 years 8 months ago #26307 by loic
Replied by loic on topic Ordre des annonces du module
Bonjour,

Avez vous essayer de faire un echo de la requête pour voir si elle était correcte ?

Cordialement.
More
7 years 8 months ago #26323 by Minie
Replied by Minie on topic Ordre des annonces du module
Voici ce que donne le echo de la requête :

SELECT a.*,p.id as parentid,p.name as parent,c.id as catid, c.name as cat,u.username as user FROM #__adsmanager_ads as a INNER JOIN #__adsmanager_adcat as adcat ON adcat.adid = a.id LEFT JOIN #__users as u ON a.userid = u.id INNER JOIN #__adsmanager_categories as c ON adcat.catid = c.id LEFT JOIN #__adsmanager_categories as p ON c.parent = p.id WHERE 1 AND c.published = 1 and a.published = 1 GROUP BY a.id ORDER BY a.ad_agenda DESC LIMIT 0, 8

On voit bien que le ad_agenda est pris en compte, mais à l'affichage du module horizontal, rien ne change.

Cordialement
More
7 years 8 months ago #26333 by loic
Replied by loic on topic Ordre des annonces du module
Bonjour,

ça devrait fonctionner pourtant. Si vous testez avec un autre champs, le problème est le même ?
Mieux, si vous causez volontairement une erreur, la page s'affiche encore ? Si c'est le cas, ça signifie que je ne vous ai pas donné le bon fichier.

Cordialement.
Time to create page: 0.158 seconds
Powered by Kunena Forum