Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about Hot Joomla Carousel Pro module

Topic-icon Read More button.

More
6 years 6 months ago #4608 by peterson
peterson created the topic: Read More button.
I have a small issue with the Carousel Pro module and I was wondering if I'm missing something, or if what I need could be built into the next release.

If I select "Show Read More Links" in the CONTENT MODE SETTINGS, I ALWAYS get the "read more" link, even if there is not a "<hr id="system-readmore" />" within the article.

This will be rather confusing to customers if they click the read more and there's nothing "more" to read.

Some of our Articles will have "read more" and some will not. It would be nice to have the "read more" only show up if there is a <hr id="system-readmore" />

Does that make sense???

If the module already does this, then I must be missing something. Please help!

Thanks,
Pete

Please Log in to join the conversation.

More
6 years 6 months ago - 6 years 6 months ago #4621 by ivan.milic
ivan.milic replied the topic: Re: Read More button.
Hi,

Carousel Pro does not work as you described, <hr id="system-readmore" /> does not change anything. But if you want to make it work like that you cam make this simple change:

Open file modules\mod_hot_joomla_carousel_pro\mod_hot_joomla_carousel_pro.php for editing.

Locate the following code (bottom):
// Item introtext
if ($display != 0 || $more) {
if ($display != 0) {
$html .= '<div>'.$row->text.'</div>';
$html .= "\n"; //line break
}
if ($more) {
$html .= '<a class="readon" href="'.$link.$customItemIDHTML.'">'.JText::sprintf('Read more...').'</a>';
$html .= "\n"; //line break
}
}

/* Single item output - END HERE */


Replace that code with the following:

// Item introtext
if ($display != 0 || $more) {
if ($display != 0) {
$html .= '<div>'.$row->text.'</div>';
$html .= "\n"; //line break
}
if ($more) {
$rm_pos = strpos($row->text ,'system-readmore');
if($rm_pos === false)
{
// there is no tag with class system-readmore, you can change string system-readmore to //any other valu that you want to use as flag for existence of read more...
}
else
{
$html .= '<a class="readon" href="'.$link.$customItemIDHTML.'">'.JText::sprintf('Read more...').'</a>';
}
$html .= "\n"; //line break
}
}

/* Single item output - END HERE */
Last Edit: 6 years 6 months ago by ivan.milic.

Please Log in to join the conversation.

More
6 years 6 months ago #4624 by peterson
peterson replied the topic: Re: Read More button.
Thank you... I will give that a try here shortly and let you know if i have any issues or questions... Thanks again for your reply, template, modules and Forum. The Sportal Template is going to make my life much easier!

Cheers,
Pete

Please Log in to join the conversation.

More
6 years 5 months ago #4867 by peterson
peterson replied the topic: Re: Read More button.
Thanks again for the code to make this change. I made the changes about a week ago but have been busy with other issues not pertaining to the website. I am just now getting back to working on the site again today.

I have not been able to get the carousel to work the way I'd like even with the code you sent.

I'm having a little trouble with understanding this portion of the code...

if($rm_pos === false)
{
// there is no tag with class system-readmore, you can change string system-readmore to
//any other valu that you want to use as flag for existence of read more...
}
else

I believe what you're saying is that there is not a tag that has id="system-readmore" in it. If there is another value that you want to use instead of "system-readmore"...

Unfortunately i want to use the "system-readmore" value. That's the point and beauty of Joomla. They already have the "read more" button in the WYSIWYG Editor. :)

Hopefully you can help me understand what i need to change, modify, or add into the code in order to get the "system-readmore" value to work.

Thank you for your time... I really do appreciate it.

Regards,
Pete

Please Log in to join the conversation.

More
6 years 5 months ago #4889 by ivan.milic
ivan.milic replied the topic: Re: Read More button.
That works like this:

If string 'system-readmore' is not located in content then do nothing , otherwise add read more link.


You can change that search pattern to whatever you need.

Please Log in to join the conversation.

Time to create page: 0.139 seconds

Links, Partners and Social Media