The Joomla! Forum ™



Forum rules


Please use the official Bug Tracker to report a bug: http://joomlacode.org/gf/project/joomla ... er_id=8103



Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Tue Jul 12, 2011 9:35 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
No Way to Display Category Blog as Full Text

blog_item.php changed in the following way.


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


to

Code:
<?php echo $this->item->text; ?>


or adding
Code:
<?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

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Wed Jul 13, 2011 2:28 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
Is anyone looking at these bug reports?

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Wed Jul 13, 2011 3:03 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
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:
<?php if (!$params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>


Changed to (Notice the
Quote:
!
removed before the $params to fix this - I have also removed this in templates/[template name]/html/com_content/article/default.php)


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


Then add
Quote:
<?php echo $this->item->introtext; ?>


Code:
<?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:
'a.id, a.title, a.alias, a.title_alias, a.introtext,'


Simply add a
Quote:
a.fulltext,
behind that like so...


Code:
'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

Quote:
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:
<?php echo $this->item->introtext; ?>



Then find /b]

Code:
<?php endif; ?>

<?php if ($this->item->state == 0) : ?>


[b]Add before the
Quote:
<?php endif; ?>
:

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


like so

Code:
   <?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

Quote:
templates/[template name]/html/com_content/category/blog_item.php


Find

Code:
<?php echo $this->item->introtext; ?> on line 131 in my case


and change the introtext; to fulltext;

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

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Wed Nov 23, 2011 9:43 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Nov 23, 2011 9:35 am
Posts: 1
Thank you very much for this. The extended DB query solves my problem with the fulltext not being available.


Top
 Profile  
 
PostPosted: Wed Nov 23, 2011 2:11 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
Cool glad it helped you!

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Jan 19, 2012 1:38 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 19, 2012 1:14 pm
Posts: 8
Location: South Africa
Yo Kiteplans - You're a legend! Thank you for the solution. You really helped me out!


Top
 Profile  
 
PostPosted: Fri Jan 20, 2012 1:20 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
No problem - I have worked on this a bit more and will post some more info when I get some time!

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Sun Jan 29, 2012 12:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 27, 2012 7:53 am
Posts: 11
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:
<?php if (!$params->get('show_intro')) : ?>
   <?php echo $this->item->event->afterDisplayTitle; ?>
   <?php endif; ?>


Changed to (Notice the
Quote:
!
removed before the $params to fix this - I have also removed this in templates/[template name]/html/com_content/article/default.php)


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


Then add
Quote:
<?php echo $this->item->introtext; ?>


Code:
<?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:
'a.id, a.title, a.alias, a.title_alias, a.introtext,'


Simply add a
Quote:
a.fulltext,
behind that like so...


Code:
'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

Quote:
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:
<?php echo $this->item->introtext; ?>



Then find /b]

Code:
<?php endif; ?>

<?php if ($this->item->state == 0) : ?>


[b]Add before the
Quote:
<?php endif; ?>
:

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


like so

Code:
   <?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

Quote:
templates/[template name]/html/com_content/category/blog_item.php


Find

Code:
<?php echo $this->item->introtext; ?> on line 131 in my case


and change the introtext; to fulltext;

Code:
<?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


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 1:02 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 19, 2012 1:14 pm
Posts: 8
Location: South Africa
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?


Top
 Profile  
 
PostPosted: Wed Feb 08, 2012 1:11 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
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:
'a.id, a.title, a.alias, a.title_alias, a.introtext,'

Simply add a
Code:
a.fulltext,

behind that like so...
Code:
'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:
      if ($item->params->get('show_intro','1')=='1') {
         $item->text = $item->fulltext;

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 4:53 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 06, 2010 5:41 am
Posts: 12
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


Top
 Profile  
 
PostPosted: Sat Mar 17, 2012 5:51 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 07, 2012 8:33 am
Posts: 42
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???


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 9:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 24, 2006 4:28 pm
Posts: 46
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


Top
 Profile  
 
PostPosted: Sun Mar 25, 2012 12:59 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
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???

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Tue Mar 27, 2012 12:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 07, 2012 8:33 am
Posts: 42
Hi! I have found a solution, om Norwegian Forum! But I cant explain how it worked! :-))


Top
 Profile  
 
PostPosted: Tue Mar 27, 2012 2:42 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
monalh, could you send me a link? I would like to have a look!

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Apr 12, 2012 10:23 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 07, 2009 12:21 pm
Posts: 15
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:
<?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:
<?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!


Top
 Profile  
 
PostPosted: Thu Apr 19, 2012 1:26 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
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/

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group