Support Forum

Plugin: Topic Status — Please review pending Codex page

KW Ken Wilson
Ken Wilson
Member

Please review the pending Plugin: Topic Status page. Please indicate it is ready to publish or list changes that are required to be made.

The initial reason from the update was to satisfy codex ticket 4433 by adding ‘statusClass’ to sp_TopicIndexTopicStatusTag().

1. The entire plugin page has been modified to provide a “strawman” format for codex plugins of the future.  The Template Tags are contained at the bottom of the page and have been expanded to resemble the Common View Template Tags format.

2. The main body of the page discusses admin setting and use in detail.  It may be too much. The format of the sections may not be what is desired. Let me know.

3. Links have been added in the main body to the Template Tags and to their “Hooks and Actions”.

4. I have a Plugin Source Code section.  I tried to indicate where the plugin and all its files should be located.  If this section should be modified or JUST PLAIN REMOVED, let me know.

 

I do have a couple of questions: 

Throughout I have used sp_TopicIndexTopicStatus() and sp_TopicStatus(). 

Q1. Where if any place should sp_TopicIndexTopicStatusTag() and sp_TopicStatusTag() be used?

Q2. Everything worked well in my local forum when I made the initial Topic Status Set and assigned it to a forum. I made a 2nd and a 3rd Topic Static Set.  I assigned them to different forums of mine, but the statuses did not automatically show up on the new posts after the assignment.  I could use the “forum toolset” to modify the status in the forum view and get it to show up.

Thanks.

14 Answers

New Answer

MP Mr Papa
Mr Papa
Member

a few comments…

in couple places, namely the template tags section, you have a lot of duplicate blank lines… those wont show up when displayed… so, to me, they make it hard to read for no value on front end… but might just be me…

administrative options…  the components of each element should be indented one more level for readability…  I have done the “Configuring Topic Status Sets” so you can see what the markup for that would look like…

same indentation comment for ‘plugin usage’…  also within plugin usage, pick either bullets or numbers, but not both…

template tags used in plugin… nice use of anchor! 

actions and hooks used in the plugin… is this correct?  you only listed the ones in the template functions… but the plugin may very well have additional actions and filters outside of the template functions…  might be complete for this plugin – dont know without looking – but it should probably be a complete list…  best way is to search the plugin root directory and lower for ‘apply_filters’ and ‘do_action’…  think its okay to list ones outside the template functions then link to the tags ones like you do…

recommend deleting the plugin source code section.. not really value added and the location you reference can be wrong…  the plugin is not required to be located in that location – users can move it to where they like..

why two hr tags before template tags?  looks odd and you have one after each one, they seem to stand out…

not sure we need a change log for each template tag…  could be confusing with the overall plugin one…  lol, and need to be somewhat synced…  know what you were trying to do, but not sure its clear and or lots of value… others may think differently…

remove source code section too in the template tags section…

overall, looks pretty good!

as to the topic status question at end, did you look in the options section for it? ie click on the options button…

KW Ken Wilson
Ken Wilson
Member

Steve,

Did you change the permissions on the file with your edits? 

I can no longer view the pending file with your changes.  The title is greyed-out and my only option with it is “Trash” , not “Edit/Trash/Preview” as before and with the other pending files.

MP Mr Papa
Mr Papa
Member

No… didnt touch anything short of an update to the revision…  but will check it out tonight…

MP Mr Papa
Mr Papa
Member

not sure I see any problem… permissions look right… can you post screenshot?

KW Ken Wilson
Ken Wilson
Member

No need.  I just when to get the screenshot and I can Edit.  Something changed.

Thanks

MP Mr Papa
Mr Papa
Member

really?  lol, love it when a plan comes together! ;)

KW Ken Wilson
Ken Wilson
Member

Mr Papa said
a few comments…

in couple places, namely the template tags section, you have a lot of duplicate blank lines… those wont show up when displayed… so, to me, they make it hard to read for no value on front end… but might just be me…

administrative options…  the components of each element should be indented one more level for readability…  I have done the “Configuring Topic Status Sets” so you can see what the markup for that would look like…

same indentation comment for ‘plugin usage’…  also within plugin usage, pick either bullets or numbers, but not both…

template tags used in plugin… nice use of anchor! 

actions and hooks used in the plugin… is this correct?  you only listed the ones in the template functions… but the plugin may very well have additional actions and filters outside of the template functions…  might be complete for this plugin – dont know without looking – but it should probably be a complete list…  best way is to search the plugin root directory and lower for ‘apply_filters’ and ‘do_action’…  think its okay to list ones outside the template functions then link to the tags ones like you do…

recommend deleting the plugin source code section.. not really value added and the location you reference can be wrong…  the plugin is not required to be located in that location – users can move it to where they like..

why two hr tags before template tags?  looks odd and you have one after each one, they seem to stand out…

not sure we need a change log for each template tag…  could be confusing with the overall plugin one…  lol, and need to be somewhat synced…  know what you were trying to do, but not sure its clear and or lots of value… others may think differently…

remove source code section too in the template tags section…

overall, looks pretty good!

as to the topic status question at end, did you look in the options section for it? ie click on the options button…

Steve,

Please review the pending Plugin: Topic Status codex page as I have edited it and let me know what further changes are needed.

I did not make all the changes exactly as you specified and have provided my rationale below. Please specify in your response how to proceed with each.

P.S. I didn’t understand your answer to my 2 questions? Was it meant to cover both? 

Rationale

1. I reduced some the of the duplicate blank lines, but I like space between sections in the text mode of editing.

2. Admin options: I have indented components of each element.

3. Plugin Usage: I removed the numbers and references to them.  I have used several levels of indenture.

4. Actions and Hooks:

A. I searched for those items in my local site under …/sp-resources/forum-plugins/topic-status and no others showed up. Is that not where you meant to search?

B. I agree with the approach you discussed if there are ‘apply_filters’ and ‘do_action’ in other than the template tags.

5. Plugin Source Code: section removed.

6.Two hr tags: I used them to separate the Plugin Section from the Template Tag section.  I used the single hr tag to separate the Template Tag heading/discussion from the Template Tags themselves.  I used a single hr tag to separate the 2 Template Tags.

If you have a preferred technique, please edit the file appropriately and I will use that in future Plugin codex pages.

7. Template Tag Changelog: Changed “Plugin Changelog” to “Plugin and Template Tag Changelog” so changes to Plugin and Template Tags can be listed in one place. I updated the section with recent Template Tag changes and codex ticket info.

Left the boilerplate “Changelog” in the Template Tag but changed wording under it to: “See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.” This would be the same in all Template Tags in all Plugins if you agree.

8. Source Code: I disagree with removing the “Source Code” section from Template Tags in Plugins, but tell me to remove it (one more time) and I will. 

It is there to help the users, correct?  Having the filename where the template tag can be found should be helpful.

Why is listing the file where these template tags can be found less important than for the Display Template Tags?

I also like consistency in the codex sections regardless of the type of template tag.

9. I asked 2 questions.  I don’t understand which your answer is for.  Let’s focus on the first question because it affects the codex.

Q1. Where if any place should sp_TopicIndexTopicStatusTag() and sp_TopicStatusTag() be used?

I am asking if sp_TopicIndexTopicStatusTag() and sp_TopicStatusTag() should replace sp_TopicIndexTopicStatus() and sp_TopicStatus() in the Plugin codex page. 

Is …Tag() the real name of each the Template Tag?

I am uncertain which ones to use because:

A. In sp-topicstatus-template-tags.php,  the template tags are

function sp_TopicIndexTopicStatusTag($args=”, $toolTip=”)

function sp_TopicStatusTag($args=”, $toolTip=”, $label=”)

 

B. Then in sp-topicstatus-plugin.php, relationships are shown as:

# ======================================
# TEMPLATE TAGS
# ======================================

# ———————————————-
# ForunView – In row Topic Status
# ———————————————-
function sp_TopicIndexTopicStatus($args=”, $toolTip=”) {
    include_once(SPTSLIB);
    include_once(SPTSTAGS);
    sp_TopicIndexTopicStatusTag($args, $toolTip);
}

# ———————————————-
# TopicView – Anywhere
# ———————————————-
function sp_TopicStatus($args=”, $label=”, $toolTip=”) {
    include_once(SPTSLIB);
    include_once(SPTSTAGS);
    sp_TopicStatusTag($args, $label, $toolTip);
}

 

Have a safe Business Trip!

MP Mr Papa
Mr Papa
Member

yikes…  replies getting difficult… :)

4a… not sure what you mean… yes, proper place to search… I only said if there are more actions/filters than in the template tags, they should be listed too… I do not know if this one has others, but other plugins will have more than just in the template tags… if you are saying this one does not, then good…

6… can live with whatever… just wasnt sure if intentional as it wasnt obvious to me…  long page ;)

8…  still think the source code in template tags is overkill, but at least with the changes you have made, its not potentially pointing to wrong spot…  so better with it like that…  core template tags will ALWAYS be in the same spot, plugins can be just be anywhere… but like I said, since you removed the potentially incorrect part, fine now..

9.1…  sp_TopicStatus() and sp_TopicIndexTopicStatus() are the right ones to use…  the lower level functions (ie with Tag at end) are note directly callable unless the user manually includes the files they are located in…  the ones I said to use reside in the plugin main file which is always loaded and available…  hence why they exist, sort of as a wrapper for users to use…  the large actual files are then only included if they are called… keeps memory footprint smaller…  so…  the template tags, for any plugin, must be the ones defined in the main plugin file…

9.2…  I was asking if you opened up the options button when making the post to set the topic status…

KW Ken Wilson
Ken Wilson
Member

Is more work needed before it can be published and the general format/structure used for future Plugin pages?

 

Do have a safe trip!!!

MP Mr Papa
Mr Papa
Member

looks good to me…

Andy and Ike, any feedback or issues?

YS Yellow Swordfish
Yellow Swordfish
Member

Wouldn’t it be nice to be able to include images? I don’t propose it by the way as maintenance can be so annoying and some of these things change over time – but wouldn’t it make it easier! Anyway – nit looking bad at all to me,. Just one or two points I think.

Plugin Features: The last few words in this sentence need some fixing…

Once the sets of status lists are setup, the forums you select can have a topic status set and changed for each topic.

Plugin requirements: Not really sure i follow this sentence. It makes it sound a little like there is something else the user needs to install before they can use the plugin. Perhaps just that use of ‘requires’ maybe?

This plugin requires the installation of it’s special Admin functions which allow the Forum Admin to activate / deactivate the plugin and set up the various topic status options.

In this part…:

‘If template tag changes are going to be made, it is recommended that a Child Theme is created first before installing this plugin. Information on installing themes is located on our Creating a Theme page.

…it might be worth stating that we do include the plugin template tags in all current themes and of they are happy with the default position and layout then there is no need to change anything.

Setting the Keys: And finally smile might be worth just mentioning that the reason for setting up the keys allows for extra status entries to be inserted at a later date if needed – or even re-ordered – while maintaining the integrity of the data assigned to topics.

And then personally I would say publish.

KW Ken Wilson
Ken Wilson
Member

Yellow Swordfish,

Thanks for the input.  I believe I have modified/added the items you noted.  A few other updates were also made attempting to make things more clear than they were.

I was not able to find a way to get access so I could change the page’s progress from “Being Worked On” to “Complete.” This page was in the “Pending” group on the Codex Entries and pages listed there do not have an icon shown under the “Progress” column.  When editing the “pending” pages, the Publish, Codex Tags, Attributes, and Content Progress sections are NOT shown on the right side of the page text.  The “WishList Member” section is NOT shown at the bottom.

Going to the “Draft” list of Codex Entries being modified have icons shown under the “Progress” column.  When editing the “draft” pages, the Publish, Codex Tags, Attributes, and Content Progress sections are shown on the right side of the page text.  The “WishList Member” section is shown at the bottom.

Any idea what I have to do to get the sections to show up when editing “pending” pages.  I thought these were available in the old Codex, but maybe not.

I have Published the page.

UPDATE:

After I published the page, I edited it and was given access to the Content Progress section.  The page has been marked as “Complete” and re-published.

YS Yellow Swordfish
Yellow Swordfish
Member

Well thats a bit of a pain isn’t it? Mind you – until you came along I didn’t even know there WERE such things as ‘pending changes’ that could be reviewed :)