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 / [SOLVED] Limit Ad title with this [...] at the end

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.

[SOLVED] Limit Ad title with this [...] at the end

More
7 years 10 months ago - 7 years 10 months ago #25787 by kakada
Hello,

How to limit the ads title with this [...] at the end same as the description ?

i have attached picture to show you.
Attachments:
Last edit: 7 years 10 months ago by loic.
More
7 years 10 months ago #25796 by loic
Hello,

You need to custom the code to do that, check the file in components/com_adsmanager/views/list/tmpl/default_list.php or templates/yourtemplate/html/com_adsmanager/list/default_list.php if you are using an override.

You need to custom the code displaying the ad title (ad_headline) to match the one displaying the description (ad_text).

Best regards.
More
7 years 10 months ago #25799 by kakada
Replied by kakada on topic Limit Ad title with this [...] at the end
Hello,

I don't know about Coding PHP. Could you help pointing me what code should i utilize to get it done?

Thanks

Regards,
More
7 years 10 months ago #25804 by loic
Hello,

in the file I've told you in my last message, replace the line:
<?php echo '<a href="'.$linkTarget.'">'?><h3><?php echo htmlspecialchars($content->ad_headline);?></h3></a>

By that:
<?php echo '<a href="'.$linkTarget.'">'?>
										<h3>
										<?php 
											$af_headline = JString::substr($content->ad_headline, 0, 100);
											if (strlen($content->ad_headline)>100) {
												$af_headline .= "[...]";
											}
											echo  htmlspecialchars($af_headline);
										?>
										</h3>
									</a>

Change the number 100 in the two line if you wish to change the length of the string displayed.

Best regards.
More
7 years 10 months ago #25809 by kakada
Replied by kakada on topic Limit Ad title with this [...] at the end
Hello,

Thanks you so much for great support. I replace the code and it working 100%

Best Regards,
More
7 years 10 months ago #25813 by loic
Great news :)

I update the topic to resolved.

Best regards.
Time to create page: 0.147 seconds
Powered by Kunena Forum