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 / Public Forum / Main Forum / url de l'annonce

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.

× OLD Forum post could be checked here : forum.joomprod.com

url de l'annonce

More
11 years 5 months ago #11880 by boost
url de l'annonce was created by boost
Bonjour

j'ai un champ supplémentaire a mettre dans les url de annonces ...
j'au trouvé ou modifier pour le title TAG page mais je ne sais plus et comment modifier pour rajouter dans l'url pour récupérer le champ ad_headlinetag en plus du champ ad_headline

je crois que c'était dan router.php ....mais je dois avoir un probleme de code
$sql = "SELECT ad_headlinetag , ad_headline FROM #__adsmanager_ads WHERE id = ".(int)$id;

c'est important car représente le champ fabricant, le champ normal étant le type

merci d'avance pour vos lumières :)

www.bretweb.net
Editeur de : www.bateaux-doccasion.com
Toutes les annonces du nautisme
More
11 years 5 months ago #11887 by loic
Replied by loic on topic url de l'annonce
Bonjour,

La requête SQL me semble correcte, par contre vous devez aussi rajouter le nouveau champ dans la variabe qui est retourné par la fonction.

Vous pouvez essayer quelque chose comme ça:
$db =JFactory::getDBO();
$sql = "SELECT ad_headlinetag, ad_headline FROM #__adsmanager_ads WHERE id = ".(int)$id;
$db->setQuery($sql);
$result = $db->loadObject();
$tag = TTools::stringURLSafe($result->ad_headlinetag);
$headline= TTools::stringURLSafe($result->ad_headline);
$result = JString::substr($tag ,0,30).'-'.JString::substr($headline,0,30);
return $result;

A noter que la fonction substr tronque la chaine au bout de 30 charactères, vous êtes libre de changer la valeur si vous le souhaitez.

Cordialement.
Moderators: perry
Time to create page: 0.071 seconds
Powered by Kunena Forum