Support forums : Branches

get rid of "featured post"

Discussion about existing branches and the directions they need to go in, or, for branches that are going to happen. "Quickies" is wide open. "Branches" is more focused.

Moderator: Dracones

get rid of "featured post"

Postby EdB » Wed Aug 25, 2010 6:23 pm

mentioned in the 5 things thread, https://code.launchpad.net/~edb/quam-pl ... tured_post gets rid of featured post but not entirely.

It removes looking for a "featured post" from the routine that puts something up there, and removes all references to that item's ID number as ... heck I already forgot the variable's name. It also removes the checkbox from the write page.

What it doesn't do is remove the field from the database for 2 reasons. First, to do so would be a database change and I don't see removing an unused field as something worthy of un-freezing the dbase. Second, and more importantly, one day we can repurpose that field. Possibly bring back "featured" even though the intro-type routine covers all bases that a featured post tried to cover, but in my mind one day it will be "item_has_attachments". My thinking there is that if the item had a field that said yes or no concerning if any files are attached then we could shave off a shedload of queries on the public side. Currently any permalink page gets queried for the attachments because the existing info ($Item or maybe $edited_Item) simply doesn't know. So it has to check.

Anyway I think that branch is actually ready to R2M given the change made just now but there's already 2 branches in merge which is more than enough.

Edit A new field for has_attachments would also let us put a more specific icon on the Items page in admin that uses a table layout. Empty folder for no attachments, folder with + sign for has attachments. Same thing for the "All" page but it affects a button instead of an icon.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: get rid of "featured post"

Postby Laibcoms » Thu Sep 02, 2010 1:07 am

Ooh O_O

Featured Post is useful in the sense that it "pins" a particular topic, I think that's the only use for it (which I personally like and I do use it). Maybe it can be turned into a plugin?

I haven't played it with since I can't figure out how to make the Featured Post feature to be pulled and "streamed" in a slide-format for some templates with such a design. (You know, a slide show of featured post some templates out there have.) I was thinking of something like that as a use for it but I can't do it yet :p Anyway, if it becomes a plugin, then some templates with a "featured post" in its design will have to ship the template with an embedded plugin (or maybe not, the end-user should just get the Featured Post plugin, it isn't too hard).

As to the Intro-Post, by definition it does do the same thing. But to make an Intro-Post, it should use the "Intro-Post" pagetype, right? The way I understand how it works is that It takes a post out of the flow. If for example I added a new Intro-Post, the old one just sits somewhere hidden and doesn't show up in the "regular" post flow. (I'll test this maybe later just to confirm if that's how Intro-Post works.)

Basic idea is a post gets pinned but when it's superseded by a newer post, the post still shows in the regular post flow, exactly how Featured Post works currently.

Or I'm missing something?
QuamPlures Template: Paninap Themes
Add me: Google+
Blogs: The Hæven of John; gameshogun
Laibcoms
Dracone
User avatar
 
Posts: 111
Joined: Thu Jan 14, 2010 5:29 am
Location: Philippines, Asean

Re: get rid of "featured post"

Postby EdB » Thu Sep 02, 2010 3:45 am

Interesting...

I never considered that "featured" being selectable by anyone and thus over-riding the previous "featured" would be a benefit. I also notice that if there is an intro-type then 'featured' doesn't happen. (OT: intro-all always over-rides every other intro-type as well as featured). So the benefit is that enabling multiple "featured post" items means one could make a little page of "featured posts"? Like show the most recent 3 as a sub-header type of thing maybe?

Just tested and found that if you deprecate all the "intro-type" posts in a default installation, then "featured post" is basically the same as "intro-all" meaning it shows up on the top of every page.

You're right on intro-types: you select that and it never shows up in normal post flow. To me it is a drawback that anyone and their pet dog could effectively delete your "intro-foo" by writing another one. The way it works now is the most recent shows up and all others vanish. I still haven't gone after an effective control mechanism over that, which in my mind would be tied directly to edit permissions. One of each intro-type per application, and if one exists then you can't actually make a new one unless you have permissions to edit the existing one. Just thinking right now, at the same time you actually should edit the existing one (magically behind the scenes) and mark it as 'deprecated' because that's pretty much what just happened.

Maybe as a plugin thing it would make more sense? That way if the installation owner wants such a thing then he/she installs the plugin. Each author then checks the box created by the plugin and the plugin handles displaying them in the manner most appropriate for the plugin. It might be as a widget-maker, or it might expect the installation owner to do some customizing to a template (new container or just adding a custom hook for example).

hmmm... Maybe the whole idea of intro-type and featured should be an installation owner decision on having it or not?

All I know is I got rid of it because intro-foo always takes precedence and intro-all does exactly what it does, even though I also got rid of intro-all. Maybe I should bring intro-all back?
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: get rid of "featured post"

Postby Tblue » Fri Sep 03, 2010 3:05 pm

Ah, so the Featured setting [b]does[/b) have a use. If we decide to keep both features, it probably should be made clear what the differences are...
Well, I guess it could easily be made into a plugin as well, yes. That even looks like a good solution to me!

Maybe I should bring intro-all back?

I think you should if we decide to create a "featured post" plugin. :)
Tblue
Dracone
 
Posts: 340
Joined: Sat Nov 21, 2009 1:35 pm
Location: Berlin, Germany

Re: get rid of "featured post"

Postby EdB » Fri Sep 03, 2010 5:14 pm

Fortunately having intro-all there or not is very easy. All I did to hide it was add it to a small array of 'reserved' type numbers.

The logic behind the whole thing isn't all that hard to figure out until you start getting into "yeah but what about ... " scenarios. Which to me remains "yeah but what about if there already is an intro-this out there". Which just now I'm thinking maybe a query that returns an array - not the DB->query( string ) thing but the one that gives an actual array back - to find the types of intro posts that exist and their associated main cat IDs and somehow tags. For the big picture ones (-all, -main, -sub) if there is one then move the number for it out of one array and into the protected array. For the -cat and -tag ones the only way to be effective is after the fact. Do a check that says "if they are posting with an intro-type that might have more than one but shouldn't have more than one per cat or tag then check if their main cat or tag already has one and if so see if they have edit perms and if so warn them of the other and give a choice to proceed or if not then tell them no you can't".

I was also just now thinking of an "intro-author" type because I'm pretty sure we can still make a list of items based on an author's ID, which means we can have a multipost filter that uses the right disp value to trigger an intro but no intro-type available..

An neither of those goes to the odd relationship between intro-foo and featured checkbox.

Anyway I wiped out the branch I had about wiping out featured posts, although for me I'm still gonna hide the checkbox because it is a poorly executed piece of a poorly executed idea. As a plugin it would be "get rid of it all and let the plugin handle it" but it's core and migrators may or may not have it so better to make that call after a v0 happens than add more in the way of it ever happening. My opinion, others probably have their own ;)
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: get rid of "featured post"

Postby Laibcoms » Sat Sep 04, 2010 5:20 pm

We can make featured post and intro-foo both as plugins, something like a "universal special post". Although that would mean the site owner will have to follow a short guide into how to edit his templates to add some styling for it. (Or maybe we add a default "post" style with the plugin?)

Or how about getting rid of intro-all instead? Intro-tag, Intro-cat, makes sense, but Intro-all doesn't - at least to me, I can't make out any good use for it specially now that you mentioned it has an all-override power.

But even so, Featured Post and Intro-foo shared the same space, it's better to have it separated so if we're viewing Tag1 or Cat1, the Intro-foo is still there as well as the most recent Featured Post for that particular tag or category. Although I think this is overdoing it, but just thinking, someone might find a good use for such a setup in the future. Still I can't shake the thought that Featured Post and Intro-foo sharing the same display space is the very thing that makes the two confusing and useless.

Anyway, for me, at least what I'm visualizing, Featured Post, Intro-Cat, and Intro-Tag are the useful ones as far as customizing limitation is concerned. I mean, I tried before creating an "Intro-Tag" via a container/widget but I can't do it the way Intro-Cat/Intro-Tag works currently, same with Featured Post. For Intro-Main and Intro-Sub, I have to do a refresher...

but I'll sleep for now, these 4 days 12hours shift is killing keeping me from doing anything else I need to finish or write down... my brain wants to sleep *sigh*
QuamPlures Template: Paninap Themes
Add me: Google+
Blogs: The Hæven of John; gameshogun
Laibcoms
Dracone
User avatar
 
Posts: 111
Joined: Thu Jan 14, 2010 5:29 am
Location: Philippines, Asean

Re: get rid of "featured post"

Postby EdB » Tue Feb 19, 2013 5:26 am

https://code.launchpad.net/~edb/quam-plures/qp5_monster gets rid of the checkbox for featured posts, and might do away with all the associated code. Don't really remember right off the top of my head. It also affects how some of the intro posts work, I think by making one intro type go away. Again can't recall all the details about all the changes.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: get rid of "featured post"

Postby leeturner » Tue Feb 19, 2013 8:41 am

Another one to add to the "To Test" list !
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK


Return to Branches

Who is online

Users browsing this forum: No registered users and 3 guests

cron