[joomla] Blog content lead story on shows intro
Barrie North
contact at compassdesigns.net
Mon Feb 19 12:06:47 EST 2007
You should probably submit that as a bug....
Regards,
Barrie North
www.joomlashack.com
www.compassdesigns.net
Phone: (802) 291-3973
Fax: (802) 609-0427
****************************
Read the Joomla Blog
www.compassdesigns.net/joomla-blog
Got something to tell us?
www.joomlashack.com/shop/feedback.php
****************************
joomla-request at lists.nyphp.org wrote:
> Send joomla mailing list submissions to
> joomla at lists.nyphp.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.nyphp.org/mailman/listinfo/joomla
> or, via email, send a message with subject or body 'help' to
> joomla-request at lists.nyphp.org
>
> You can reach the person managing the list at
> joomla-owner at lists.nyphp.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of joomla digest..."
>
>
> Today's Topics:
>
> 1. Blog content lead story on shows intro (Hans C. Kaspersetz)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 18 Feb 2007 13:08:50 -0500
> From: "Hans C. Kaspersetz" <hans at cyberxdesigns.com>
> Subject: [joomla] Blog content lead story on shows intro
> To: joomla at lists.nyphp.org
> Message-ID: <45D89632.2040500 at cyberxdesigns.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I am working on a Joomla 1.0.12 stable website today and I seem to have
> run into some unexpected behavior. When I set 1 story to be lead, 1 to
> be intro and 4 of links in a Blog - Content Category, all I get is 2
> intros and 4 links. By the way the number of lead and intro stories is
> arbitrary. If I set it to 2 and 1, I get three intros. The first story
> is not the full text. My expectation is that the lead story is supposed
> to be full text, the intro shows intro and the links are links. Is my
> expectation correct?
>
> An examination of the source shows that Joomla is not selecting the full
> text, it selects the length of it and then stores that in
> $row->readmore. However, down in the show() function, Joomla is
> expecting the $row->fulltext variable to be set. Is this a feature or a
> bug? Anyone else having these problems?
>
> Select from line 801 in content.php.
>
> // Main data query
> $query = "SELECT a.id, a.title, a.title_alias, a.introtext,
> a.sectionid, a.state, a.catid, a.created, a.created_by,
> a.created_by_alias, a.modified, a.modified_by,"
> . "\n a.checked_out, a.checked_out_time, a.publish_up,
> a.publish_down, a.images, a.urls, a.ordering, a.metakey, a.metadesc,
> a.access,"
> . "\n CHAR_LENGTH( a.fulltext ) AS readmore, s.published AS
> sec_pub, cc.published AS sec_pub, u.name AS author, u.usertype, s.name
> AS section, cc.name AS category, g.name AS groups"
> . $voting['select']
> . "\n FROM #__content AS a"
> . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid"
> . "\n LEFT JOIN #__users AS u ON u.id = a.created_by"
> . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id"
> . "\n LEFT JOIN #__groups AS g ON a.access = g.id"
> . $voting['join']
> . $where
> . "\n ORDER BY $order_pri $order_sec"
> ;
>
> From show function expecting full text, ~ line 1718:
>
> // show/hides the intro text
> if ( $params->get( 'introtext' ) ) {
>
> $row->text = $row->introtext . ( $params->get( 'intro_only' ) ?
> '' : chr(13) . chr(13) . $row->fulltext);
> } else {
> $row->text = $row->fulltext;
> }
>
>
> Additionally, for some reason, 'intro_only' is hard coded as 1. So
> there is no way to get the full text in the blog.
>
> As a solution, I patched content.php in two places to make it work.
> First, I have to set 'intro_only' to 0 when I am calling show() in in
> the lead story conditional. Then I set it back to 1.
>
> ------------ Line 1256 in content.php ------------
> $params->set( 'intro_only', 0 ); // We need to set this so that
> show will include full text
>
> show( $rows[$i], $params, $gid, $access, $pop ); // Original and
> unchanged!
>
> $params->set('intro_only', 1); // We need to turn it back off, so that
> intro stories only have intro text.
>
> ------------- End snip ----------------
>
> Then I need to modify the content select to get the full text:
>
> ------------- Line 801 in content.php -----------------
> // Just added a.full text to select. Hans
>
> // Main data query
> $query = "SELECT a.id, a.title, a.title_alias, a.introtext,
> a.sectionid, a.state, a.catid, a.created, a.created_by,
> a.created_by_alias, a.modified, a.modified_by,"
> . "\n a.checked_out, a.checked_out_time, a.publish_up,
> a.publish_down, a.images, a.urls, a.ordering, a.metakey, a.metadesc,
> a.access,"
> . "\n CHAR_LENGTH( a.fulltext ) AS readmore, a.fulltext, s.published
> AS sec_pub, cc.published AS sec_pub, u.name AS author, u.usertype,
> s.name AS section, cc.name AS category, g.name AS groups"
> . $voting['select']
> . "\n FROM #__content AS a"
> . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid"
> . "\n LEFT JOIN #__users AS u ON u.id = a.created_by"
> . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id"
> . "\n LEFT JOIN #__groups AS g ON a.access = g.id"
> . $voting['join']
> . $where
> . "\n ORDER BY $order_pri $order_sec"
> ;
> --------------- End snip ---------------
>
>
> I tried all the settings in Joomla, I think this is a real bug. But I
> would love someone else's opinion on the topic.
>
> Thanks,
> Hans
>
>
> ------------------------------
>
> _______________________________________________
> joomla mailing list
> joomla at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/joomla
>
> End of joomla Digest, Vol 3, Issue 8
> ************************************
>
>
More information about the Joomla
mailing list