Category Blog as Full Text

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Category Blog as Full Text

Post by kiteplans » Tue Jul 12, 2011 9:35 am

No Way to Display Category Blog as Full Text

blog_item.php changed in the following way.

Code: Select all

<?php echo $this->item->introtext; ?>
to

Code: Select all

<?php echo $this->item->text; ?>
or adding

Code: Select all

<?php echo $this->item->fulltext; ?>
Should allow me to display only or full text in the category blog view. As it did in the past in 1.5.

Doing a var_dump .. I see that the full content of the story does not seem to be present at all, just the introtext!?

Joomla Version 1.7.0
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Wed Jul 13, 2011 2:28 am

Is anyone looking at these bug reports?
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text - ADDITIONS TO CODE

Post by kiteplans » Wed Jul 13, 2011 3:03 am

I have also gone ahead and fixed a function to make the intro hide and show on the blog view work.

blog_item.php line 56 -58 in my case

Code: Select all

<?php if (!$params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>
Changed to (Notice the
!
removed before the $params to fix this - I have also removed this in templates/[template name]/html/com_content/article/default.php)

Code: Select all

<?php if ($params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>
Then add
<?php echo $this->item->introtext; ?>

Code: Select all

<?php if ($params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php echo $this->item->introtext; ?>
   <?php endif; ?>
Now you can hide the intro text if wanted or show it along.



Now lets get the full text to display

in file - com_content/models/articles.php

Line 162 in my case, find

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext,'
Simply add a
a.fulltext,
behind that like so...

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext,'

Logically – if you have read more shown you wont need full text.

Now open your template override file for category blogs
templates/[template name]/html/com_content/category/blog_item.php
So lets make it work in the following way – if read more is shown, fulltext is not, if read more is hidden fulltext is shown

find and remove

Code: Select all

<?php echo $this->item->introtext; ?> 

Then find /b]

Code: Select all

<?php endif; ?>

<?php if ($this->item->state == 0) : ?>
Add before the
<?php endif; ?>
:

Code: Select all

<?php else : ?>
	<?php echo $this->item->fulltext; ?>
like so

Code: Select all

	<?php else : ?>
	<?php echo $this->item->fulltext; ?>
<?php endif; ?>

<?php if ($this->item->state == 0) : ?>
This will show the full text when read more is hidden, and only the read more link when it is is shown


If you want to always display the Full text do it as follow:

Now open your template override file for category blogs
templates/[template name]/html/com_content/category/blog_item.php
Find

Code: Select all

<?php echo $this->item->introtext; ?> on line 131 in my case
and change the introtext; to fulltext;

Code: Select all

<?php echo $this->item->fulltext; ?>
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

flatpat
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Nov 23, 2011 9:35 am

Re: Category Blog as Full Text

Post by flatpat » Wed Nov 23, 2011 9:43 am

Thank you very much for this. The extended DB query solves my problem with the fulltext not being available.

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Wed Nov 23, 2011 2:11 pm

Cool glad it helped you!
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

BrettVorster
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jan 19, 2012 1:14 pm
Location: South Africa
Contact:

Re: Category Blog as Full Text

Post by BrettVorster » Thu Jan 19, 2012 1:38 pm

Yo Kiteplans - You're a legend! Thank you for the solution. You really helped me out!

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Fri Jan 20, 2012 1:20 am

No problem - I have worked on this a bit more and will post some more info when I get some time!
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

toddb575
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Jan 27, 2012 7:53 am
Contact:

Re: Category Blog as Full Text - ADDITIONS TO CODE

Post by toddb575 » Sun Jan 29, 2012 12:37 pm

kiteplans wrote:I have also gone ahead and fixed a function to make the intro hide and show on the blog view work.

blog_item.php line 56 -58 in my case

Code: Select all

<?php if (!$params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>
Changed to (Notice the
!
removed before the $params to fix this - I have also removed this in templates/[template name]/html/com_content/article/default.php)

Code: Select all

<?php if ($params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>
Then add
<?php echo $this->item->introtext; ?>

Code: Select all

<?php if ($params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php echo $this->item->introtext; ?>
   <?php endif; ?>
Now you can hide the intro text if wanted or show it along.



Now lets get the full text to display

in file - com_content/models/articles.php

Line 162 in my case, find

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext,'
Simply add a
a.fulltext,
behind that like so...

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext,'

Logically – if you have read more shown you wont need full text.

Now open your template override file for category blogs
templates/[template name]/html/com_content/category/blog_item.php
So lets make it work in the following way – if read more is shown, fulltext is not, if read more is hidden fulltext is shown

find and remove

Code: Select all

<?php echo $this->item->introtext; ?> 

Then find /b]

Code: Select all

<?php endif; ?>

<?php if ($this->item->state == 0) : ?>
Add before the
<?php endif; ?>
:

Code: Select all

<?php else : ?>
	<?php echo $this->item->fulltext; ?>
like so

Code: Select all

	<?php else : ?>
	<?php echo $this->item->fulltext; ?>
<?php endif; ?>

<?php if ($this->item->state == 0) : ?>
This will show the full text when read more is hidden, and only the read more link when it is is shown


If you want to always display the Full text do it as follow:

Now open your template override file for category blogs
templates/[template name]/html/com_content/category/blog_item.php
Find

Code: Select all

<?php echo $this->item->introtext; ?> on line 131 in my case
and change the introtext; to fulltext;

Code: Select all

<?php echo $this->item->fulltext; ?>

Hii, kiteplans,

Thank you Very much...! I'm having the same problem.That's OK Now,That solved my problem...! You are Simply GREAT !
The map is not the territory. - Alfred Korzybski clonazepam side effects

BrettVorster
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jan 19, 2012 1:14 pm
Location: South Africa
Contact:

Re: Category Blog as Full Text

Post by BrettVorster » Tue Feb 07, 2012 1:02 pm

I do have one slight issue with this tho. I just upgraded to 2.5.1 and with the upgrade pack it overwrote the articles.php file in Models (com_components) so when I looked at my site > portfolio page: http://www.bgv.co.za/portfolio.html there was space where the content should have been. I just needed to fix the model/articles.php file... I tried copying the models folder to my overides > template/html/com_content but it didnt work only when I overwrote the main one did it work... maybe yall know where I went wrong?

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Wed Feb 08, 2012 1:11 am

I have not been able to find a way to overwrite this as well.

After upgrade I check:

in file - com_content/models/articles.php

Line 162 in my case, find

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext,'
Simply add a

Code: Select all

a.fulltext,
behind that like so...

Code: Select all

'a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext,'
Check also:

components\com_content\views\article\view.html.php

line 113:

Code: Select all

		if ($item->params->get('show_intro','1')=='1') {
			$item->text = $item->fulltext;
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

SwingShoes
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Sep 06, 2010 5:41 am

Re: Category Blog as Full Text

Post by SwingShoes » Thu Feb 09, 2012 4:53 pm

Is there an expectation that Joomla 2.5 will incorporate a way to see either "intro text" or "full text" in a Category Blog format?

Currently, it has been changed from 1.5 (where it showed either using a switch on the administrator side) to now only showing a list of Subcategories.

Please let us know if this bug is being addressed so that we don't have to be altering code (as in the above fixes) for each updated version of Joomla.

Thank you,
Erik

monalh
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Tue Feb 07, 2012 8:33 am

Re: Category Blog as Full Text

Post by monalh » Sat Mar 17, 2012 5:51 am

Thanks for this tip! It works great, but the problem now is that I can't remove the read-more... This solution works like: read-more showing then only intro, read-more hidden then full text (introtext and text under the read-more input).

For example:
This page should show an article blog layout with only the intro-text WITHOUT the "read-more". http://www.wayosi.no/ravenews
This page shows the same articles in an article blog layout with the whole text WITHOUT the "read-more". http://www.wayosi.no/news

Any way to solve this???

Reuss
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Tue Oct 24, 2006 4:28 pm

Re: Category Blog as Full Text

Post by Reuss » Tue Mar 20, 2012 9:08 am

I really hope "show fulltext" will be an implemented option in Joomla 2.5 - I desperately need it and I'm just not any good at coding :S

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Sun Mar 25, 2012 12:59 pm

monalh - I am having some trouble understanding exactly what you want and one of the example pages does not work - could you try to explain this a bit more
monalh wrote:Thanks for this tip! It works great, but the problem now is that I can't remove the read-more... This solution works like: read-more showing then only intro, read-more hidden then full text (introtext and text under the read-more input).

For example:
This page should show an article blog layout with only the intro-text WITHOUT the "read-more". http://www.wayosi.no/ravenews
This page shows the same articles in an article blog layout with the whole text WITHOUT the "read-more". http://www.wayosi.no/news

Any way to solve this???
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

monalh
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Tue Feb 07, 2012 8:33 am

Re: Category Blog as Full Text

Post by monalh » Tue Mar 27, 2012 12:34 pm

Hi! I have found a solution, om Norwegian Forum! But I cant explain how it worked! :-))

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Tue Mar 27, 2012 2:42 pm

monalh, could you send me a link? I would like to have a look!
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me

webdesco
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Wed Oct 07, 2009 12:21 pm

Re: Category Blog as Full Text

Post by webdesco » Thu Apr 12, 2012 10:23 am

Hi All,
for those on J1.5x there is an east solution to the problem of showing intro and full text in a blog layout, you could do a core hack, but why bother when you have overrides. create a blog item override blog_item.php
at the part where you have the if statement to check whether to show readmore

Code: Select all

<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
instead of just closing the if statement, put an elseif then check the feed summary status, if it is set to 1 then echo the item_fulltext as well.
here is the code

Code: Select all

<?php echo JFilterOutput::ampReplace($this->item->text);  ?>
<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<p>
	<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->escape($this->item->params->get('pageclass_sfx')); ?>">
		<?php if ($this->item->readmore_register) :
			echo JText::_('Register to read more...');
		elseif ($readmore = $this->item->params->get('readmore')) :
			echo $readmore;
		else :
			echo JText::sprintf('Read more', $this->escape($this->item->title));
		endif; ?></a>
        
</p>
<?php elseif ($this->item->params->get('feed_summary') == 1): ?>
<?php echo JFilterOutput::ampReplace($this->item->fulltext);  ?>
<?php endif; ?>
Now all you need to do in Joomal administrator to get this to work is to open the menu item that you have set to display the blog layout, click on 'Parameters (Component)' scroll down and change
'Read more... Link' to 'Hide'
and the
'For each feed item show' to 'Full Text'
click save and you're done!

kiteplans
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Jun 28, 2011 6:29 am

Re: Category Blog as Full Text

Post by kiteplans » Thu Apr 19, 2012 1:26 am

I have finally gotten around to writing a Template override for this - now this is no longer a Core Hack but a simple one time template override. Check out the post on my Blog and let me know what you think - http://kiteplans.info/2012/04/18/how-to ... -override/
Dieskim.meThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://dieskim.me


Locked

Return to “Joomla! 2.5 Bug Reporting”