Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 6:00 am (All times are UTC )

 


Forum rules

Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2
Author Message
Posted: Thu Nov 15, 2007 7:11 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 6423
Location: Nebraska
So .... Now that these are both named "Parameters" properly, and since these have been moved out of the Global Configuration, what do we can these? If we call these Article Parameters, then, how do we differentiate between the Article Parameters for an individual article and the Article Parameters that provide default values for blog menu items *and* articles? If we call them Global Parameters, maybe we should label it Global? But, if it's Global Parameters, shouldn't it go back to the Global Configuration Utility?

Don't kill me, I just wonder if the Global Configuration Utility was the better place for these. These parameters are as much for defaults for the Article Manager as they are defaults for the Menu Manager for menu items that create blogs. In fact, I'm not so certain this is not directly related to the confusion with (specific) article parameters incorrectly overriding menu item parameters.

I am not asking for an answer - and I'm fairly certain we already have one ;) - just consider it in the broader discussion on Article (Global) - Menu - Article Parameter issue.

Amy :)

_________________
http://Twitter.com/AmyStephen
Unofficial Joomla Developer and Site Builders Network http://AllTogetherAsAWhole.org


Last edited by AmyStephen on Thu Nov 15, 2007 7:13 pm, edited 1 time in total.

Top
   
 
Posted: Thu Nov 15, 2007 8:19 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York





item->params->get('show_create_date')) : ?>







But maybe I don't really get the item reference?  Why is it going to the item?
_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


I think the problem is in views/category/tmpl/blog_item.php.


item->params->get('show_author')) && ($this->item->author != "")) : ?>


item->created_by_alias ? $this->item->created_by_alias : $this->item->author) ); ?>

  

item->created, JText::_('DATE_FORMAT_LC2')); ?>
Top
   
 
Posted: Fri Nov 16, 2007 3:13 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 6423
Location: Nebraska
OK. Home from work; had dinner with the family; nephews have come and gone; looked at some easy posts and saved the fun one for later!  8)

Yes, I think you are correct in that there is no reason to look at the item params on the blog page. So, I backed up in the logic to see how the item parameters were extracted from the database.

In com_content/views/category/view.html.php, there is a function called &getItem. For the category blog, that appears to be how the data for the article and the parameters are assembled in preparation for the blog_item.php code you are showing.

I saw this section that clones the $params (I assume it already contains the menu item parameters we really want used), and then it merges in the article parameters into the $item->$params you are showing. 

So, I left the line that copies the parameters ($item->params = clone($params) ; ) since that is what the code snippet you are showing is depending on. But, I commented out the new two lines that appear to merge in the article parameter values. And, it works the way I would like to see it work.

Give it a try and see what you think.  Just comment out the two lines marked "//amy" below in com_content/views/category/view.html.php.
Code:
      
      // Get the page/component configuration and article parameters
      $item->params = clone($params);
//amy      $aparams = new JParameter($item->attribs);

      // Merge article parameters into the page configuration
//amy      $item->params->merge($aparams);


Thanks for working with this,
Amy :)

_________________
http://Twitter.com/AmyStephen
Unofficial Joomla Developer and Site Builders Network http://AllTogetherAsAWhole.org


Top
   
 
Posted: Fri Nov 16, 2007 3:34 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Yes, works perfectly I think as does the same change to the section view.

update:

and front page.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Last edited by mcsmom on Fri Nov 16, 2007 3:36 am, edited 1 time in total.

Top
   
 
Posted: Sun Nov 18, 2007 6:22 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Oct 05, 2005 7:25 am
Posts: 1012
Location: Amsterdam
Too right, Amy.
I had a read of this thread again and used your changes in the code and that what the discussion was about. This is what should happen to individual changes to an article in fact overriding the global.

And again, this lady did it :)
Should be taken into consideration for the next build, IMHO.

_________________
Joomla Bug Squad

Note: Sending me private messages for personal support, without this been requested, would lead to ignoring any of your posts in future!


Top
   
 
 Post subject: Re: Setting
Posted: Fri Feb 13, 2009 12:50 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Aug 31, 2007 3:30 am
Posts: 27
ok, I know this is an ancient thread but it seems closest to what I am trying to figure out/fix. I apologize now if I missed the answer somewhere else as I HAVE searched, browsed, etc.

I was using 1.5.0 for quite awhile and just upgraded to 1.5.9 this week. My articles were showing up just as I wanted them to, now they're not.

I want each article on the front page to follow the individual article's attribute selection. I have 22 content items on my frontpage currently. I like most articles to be linkable but I have just a few (like disclaimer/tou - which is the first front page item, visitor map and a picture slider from myspace) that I like to just sort of hover there without the title being viewable.

The weird thing is it is using the "linkable" setting according to the individual article, just going with the "show" option from somewhere else.

so I went to view.html.php in the view/frontpage folder and tried to edit it according to this discussion and I can tell it is the right area but commenting out the mentioned lines makes all the articles titled AND linkable (now the three I'm trying to "fix" are titled but NOT linkable - even though all the rest are titled AND linkable).

Anybody know what I could edit here to make it follow the individual article permissions, not the category or frontpage (menu/home) parameters?


Top
  E-mail  
 
 Post subject: Re: Setting
Posted: Fri Feb 13, 2009 8:28 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Aug 31, 2007 3:30 am
Posts: 27
alrighty, so luckily I renamed the old folder and I was able to dig back out the old 1.5.0 files I was using and edited this 1.5.9 file:
/components/com_content/views/frontpage/view.html.php
from about halfway through to the end back to the old version. It appears to be working back as I liked.

If any other initiate might be looking for the version that makes the front page articles use the individual article parameter settings and was stumped like me, but didn't have or know about this old one...then here you go. To be clear this is just a reversion to an older J! coding, not anything I did.

Code:
      // Get the page/component configuration and article parameters
      $params    = clone($params);
      $aparams = new JParameter($item->attribs);

      // Merge article parameters into the page configuration
      $params->merge($aparams);

      // Process the content preparation plugins
      JPluginHelper::importPlugin('content');
      $results = $dispatcher->trigger('onPrepareContent', array (& $item, & $params, 0));

      // Build the link and text of the readmore button
      if (($params->get('show_readmore') && @ $item->readmore) || $params->get('link_titles'))
      {
         // checks if the item is a public or registered/special item
         if ($item->access <= $user->get('aid', 0))
         {
            $linkOn = JRoute::_("index.php?view=article&id=".$item->slug);
            $linkText = JText::_('Read more...');
         }
         else
         {
            $linkOn = JRoute::_("index.php?option=com_user&task=register");
            $linkText = JText::_('Register to read more...');
         }
      }

      $item->readmore_link = $linkOn;
      $item->readmore_text = $linkText;

      $item->print_link = $mainframe->getCfg('live_site').'/index.php?option=com_content&view=article&id='.$item->id.'&tmpl=component';

      $item->event = new stdClass();
      $results = $dispatcher->trigger('onAfterDisplayTitle', array (& $item, & $params,0));
      $item->event->afterDisplayTitle = trim(implode("\n", $results));

      $results = $dispatcher->trigger('onBeforeDisplayContent', array (& $item, & $params, 0));
      $item->event->beforeDisplayContent = trim(implode("\n", $results));

      $results = $dispatcher->trigger('onAfterDisplayContent', array (& $item, & $params, 0));
      $item->event->afterDisplayContent = trim(implode("\n", $results));

      return $item;
   }
}


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2

Quick reply

 



Who is online

Users browsing this forum: No registered users and 16 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 © 2000, 2002, 2005, 2007 phpBB Group