Wanted: core models hack to hide unpubl'shd items from admin

Your code modifications and patches you want to share with others.
Locked
User avatar
JLW
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Tue Jan 02, 2007 5:30 am
Location: U.S.A.
Contact:

Wanted: core models hack to hide unpubl'shd items from admin

Post by JLW » Fri Jun 25, 2010 4:20 am

I need to hack the core models for blogs and tables so that items not visible in the front end (past their expiration, before their start date, or unpublished) are not visible in the front end, even to Publishers and Admins. In other words, I need J 1.5 to work like J 1.0 with respect to not showing unpublished items in the front end.

Before I try to do this myself, I want to make sure I'm not reinventing the wheel
(Has someone already done this?)
nor pre-inventing the wheel
(Will this be a global config preference in a near release of J 1.5.[N+1]?)

Thanks for your attention and any possible guidance.
---Jordan
http://www.UpgradeThat.com -- compare and save on computer upgrades
http://www.Accordionist.org -- the accordion community online

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11624
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Wanted: core models hack to hide unpubl'shd items from a

Post by ooffick » Fri Jun 25, 2010 9:09 am

Hi,

you could do that with some css code, if you want to hide it:

Code: Select all

.system-unpublished {display:none;}
It depends a little bit on your template as well though.

Otherwise you can change that with a template overwrite as well.

Olaf
Olaf Offick - Global Moderator
learnskills.org

User avatar
JLW
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Tue Jan 02, 2007 5:30 am
Location: U.S.A.
Contact:

Re: Wanted: core models hack to hide unpubl'shd items from a

Post by JLW » Fri Jun 25, 2010 7:18 pm

Thank you for letting me know about this CSS class. Unfortunately, this class seems to be applied only to unpublished items. It doesn't help suppress published items that are before their Start Publishing date. Any idea how to do this?

I did go ahead and suppress the unpublished items successfully using this CSS class. Thank you very much for the info. The selector isn't actually "strong" enough by itself to work at my site, but the following "fortified" selectors seem to work:

For a category blog with only one column, I needed:
span.blog div.system-unpublished {display:none;}

For a section blog with three columns, I needed:
div.article_row div.system-unpublished {display:none;}

(And FireFox's Debug "Inspect Element" should enable anyone to figure out the fortified selectors needed for any situation.)

Any ideas about how to hide the out-of-publishing-date-range items? They don't seem to have any distinguishing classes. Do I need to hack the core model files for this? If so, can I hack them to add classes rather than suppress the output? That would be less "invasive" I think.

Thanks for your attention.
---Jordan
http://www.UpgradeThat.com -- compare and save on computer upgrades
http://www.Accordionist.org -- the accordion community online


Locked

Return to “Core Hacks and Patches”