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 / Shorten content text

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.

Shorten content text

More
11 years 2 months ago - 11 years 2 months ago #3878 by studiomat
Shorten content text was created by studiomat
Hello, I have one problem.
I found this code online to view the content of ads

echo "". $ row-> ad_text. '"

everything works fine but I would like to shorten the content, as it has to look like this code example, has displayed 40 words or 100 characters, not all of the text content?

Please help me.
Last edit: 11 years 2 months ago by studiomat.
The following user(s) said Thank You: adarr
More
11 years 2 months ago #3894 by studiomat
Replied by studiomat on topic Shorten content text
I found this code in the file list but something did not work .. as replacing the code that I gave earlier

echo "". $ row-> ad_text. '"

is anything you do not see ..
Can somebody help me and tell me what's wrong ..?

thank you

<?php
$content->ad_text = str_replace ('<br />'," ",$content->ad_text);
$af_text = JString::substr($content->ad_text, 0, 100);
if (strlen($content->ad_text)>100) {
$af_text .= "[...]";
}
echo $af_text;
?>
The following user(s) said Thank You: adarr
More
11 years 2 months ago #3896 by studiomat
Replied by studiomat on topic Shorten content text
Already running overlooked content and exchanged for row and is already running.
The following user(s) said Thank You: adarr
More
11 years 2 months ago #3920 by tompap
Replied by tompap on topic Shorten content text
Not sure to understand your last post. Is it working finally ?
The following user(s) said Thank You: adarr
Time to create page: 0.114 seconds
Powered by Kunena Forum