Support Forum
No, that is not quite correct.. the change to the topic expire plugin was such to expose the expiration date in the standard forum and topic view classes so they could be more easily used... in the code I provided previously, you had to do the query yourself... once released, you will just need to do the display code (which will aid page loading times too)...
so to do what you want, easiest thing to do is add the following code to your spFunctions.php file of your them...
add_filter('sph_TopicIndexStatusIconsLast', 'my_expire_status'); function my_expire_status($out) { global $spThisTopic; $topic_expire = spdb_table(SFTOPICS, "topic_id=$spThisTopic->topic_id", 'expire_date'); if ($topic_expire) $out.= sp_paint_icon('spIcon spIconNoAction', SPTHEMEICONSURL, 'sp_DeletePost.png', 'This topic has an expiration date'); return $out; }
as always, you should have a child or custom theme vice editing ours directly...
We can consider adding the capability for the status icon, as well as expiration date, directly into the plugin, but afraid that wont make it into the plugin release due any day.. would take bit more time to implement and test... and with WordPress 4.3 due in about a week, we will be focused on that...
you can customize the tooltip text if you like... and the icon... I just picked on that comes with all our themes...
Visit Cruise Talk Central and Mr Papa's World
If it can help someone else, i have modified a bit the code, now showing the date in the topic list too:
add_filter('sph_TopicIndexStatusIconsLast', 'my_expire_status');
function my_expire_status($out) {
global $spThisTopic;
$topic_expire = spdb_table(SFTOPICS, "topic_id=$spThisTopic->topic_id", 'expire_date');
if ($topic_expire) $out.= sp_paint_icon('spIcon spIconNoAction', SPTHEMEICONSURL, 'sp_DeletePost.png', 'Ce sujet expire le ' .date('d/m/Y', strtotime($topic_expire)));
return $out;
}
yup. nice!
going to open a ticket because that htmlentities conversion should not be happening... might be something has happened in tinymce in wp 4.3 and need to investigate before they release it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)