Support Forum

Topic-Status change icon and link colours based on status?

BT Ben Thrower
Ben Thrower
Member

Hi 

 

I have just set up the Topic status plugin and would like to do a couple of things

  1. have the icon change depending on topic status type.
  2. change the colour of the link depending on the status of the topic.

I was thinking of doing this based on the value but this is in the URL is there a way I can change the php so that it inserts a class based on the value on the <a> tag?

so in theory could i do something like add in a class “value1 or value2″ based on status so I can then create css to change the image and link colour <a id=”spTopicIndexTopicStatus7” class=”spTopicIndexStatus spButton spLeft vtip value1

Any help around this would be great as I’m looking to use this on a support froum and it would allow for a nice visual representation of the status.

9 Answers

New Answer

BT Ben Thrower
Ben Thrower
Member

Hi Just solved it (I think!)

opened up the sp-topicstatus-template-tags.php file and changed line 37 from;

$out.= “<a rel=’nofollow’ id=’$tagId’ class=’$tagClass vtip’ title=’$toolTip’ href=’$url’>n”;

to;

$out.= “<a rel=’nofollow’ id=’$tagId’ class=’$tagClass vtip statusvalue$spThisTopic->topic_status_flag‘ title=’$toolTip’ href=’$url’>n”;

 

which outputs a class of statusvalue# (#= value key) 

now just testing the css and changing the image – will update post with results once tests are completed

BT Ben Thrower
Ben Thrower
Member

All working 🙂

 

Had to remove if (!empty($icon)) $out.= “<img class=’$iconClass’ src='”.$icon.”‘ alt=”/>n”; fromthe sp-topicstatus-template-tags.php in two places line 38 and 72. this removed the img from the link.

then just created the image(s) and set them as bg images to the relevent class. example below;

#spMainContainer .spForumTopicSection .statusval1 {color:#C90!important; font-size: 100%!important; padding-left:20px; background:url(‘http://www.time4advice.co.uk/community/wp-content/sp-resources/forum-plugins/topic-status/resources/images/NewIssue.png’) no-repeat 0 50%;}

probably a much simpler way to go about this (probably find out the icon selection is built in) but thought it would be useful to post this.

Cheers

MP Mr Papa
Mr Papa
Member

we have an open ticket to build capability into the topic status plugin for custom icons and css… no ETA…

but good job!

GC Grind Club
Grind Club
Member

Mr Papa said
we have an open ticket to build capability into the topic status plugin for custom icons and css… no ETA…

but good job!

Hi, I would like to ask if this functionality is being developed or has it been abandoned?

MP Mr Papa
Mr Papa
Member

abandoned??  not at all…  as mentioned, ticket is open, but no work has started and there is no ETA…  this was first such request, so we prioritize our activities and the more folks that want something, the sooner we work it…  but it is on our list… if its something you need urgently, you can use our custom plugin service (see sidebar) to expedite it…

GC Grind Club
Grind Club
Member

Ok, cool. Maybe not that urgently, but you can treat me as another person interested in this subject :)

MP Mr Papa
Mr Papa
Member

noted… we are getting close to spending some time on updates to plugins, so maybe this will be included…

GC Grind Club
Grind Club
Member

Might not be the best place to post this … or it might be the perfect one, so I’m gonna report it here.

Clicking on a topic status box used to list all topics with the same status. However, this feature seems to be broken now (maybe due to some update to the plugin)

I have at least 10 topics/threads with the same status, but it doesn’t find even one: http://prntscr.com/4xbqux which doesn’t make ANY sense, since I have clicked the status box for a certain topic, and even this one doesn’t get listed.

IK Ike
Ike
Member

I’m not sure how to look in to this right now as the site is not in english.. but a quick look and I can see js errors coming up:

Error: Permission denied to access property ‘toString’