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 / [RESOLVED] Code dont work anymore

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

[RESOLVED] Code dont work anymore

More
7 years 8 months ago - 7 years 8 months ago #26416 by raph17
[RESOLVED] Code dont work anymore was created by raph17
You provided me a code for router.php like this
function getAdsmanagerRouteModel($id)
{
	$db =JFactory::getDBO();
	$sql = "SELECT ad_model, ad_motomodel FROM #__adsmanager_ads WHERE id = ".(int)$id;
	$db->setQuery($sql);
	$result = $db->loadResult();
	        $url = TText::_($result->ad_model);
        if ($result->ad_model != "")  {
            $url .= "-".TText::_($result->ad_model );
        }
        if ($result->ad_motomodel != "")  {
            $url .= "-".TText::_($result->motomodel );
        }	
	$result= TTools::stringURLSafe($result);
	$result = JString::substr($result,0,30);
	return $result;
}

But after updates this code dont work anymore.Is a way to make him work again?
Last edit: 7 years 8 months ago by loic.
More
7 years 8 months ago #26424 by loic
Replied by loic on topic Code dont work anymore
Hello,

When you say that it doesn't wrk anymore after update.
Did you do an update of AdsManager or Joomla ?
What is the error exactly ?

Best regards.
More
7 years 8 months ago - 7 years 8 months ago #26427 by raph17
Replied by raph17 on topic Code dont work anymore
Adsmanager.
Dont get the url anymore from ad_motomodel or ad_model.

I changed url to result but still dont work.
Last edit: 7 years 8 months ago by raph17.
More
7 years 8 months ago #26442 by juloaadmin
Replied by juloaadmin on topic Code dont work anymore
Dont get the url anymore from ad_motomodel or ad_model.

=> What do you mean by "don't get" ?

The URL don't contains your custom dev it's the original URL ?
More
7 years 8 months ago #26449 by raph17
Replied by raph17 on topic Code dont work anymore
I mean this part dont work anymore
$url = TText::_($result->ad_model);
        if ($result->ad_model != "")  {
            $url .= "-".TText::_($result->ad_model );
        }
        if ($result->ad_motomodel != "")  {
            $url .= "-".TText::_($result->motomodel );
        }

The ad_model is loaded to url but if ad_model is not and instead is ad_motomodel the ad_motomodel is not loaded in url.
More
7 years 8 months ago #26451 by loic
Replied by loic on topic Code dont work anymore
Hello,

As I understand that code, the ad_model is always loaded with the first line :
$url = TText::_($result->ad_model);

Then you check the variable that you've already inserted in $url.

Also, the second condition is a simple if, did you check if the variable $result->ad_motomodel is correctly filled ?

Best regards.
Moderators: perry
Time to create page: 0.219 seconds
Powered by Kunena Forum