Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Topic-Status change icon and link colours based on status?
Avatar
B E Thrower
Member
Free Members
sp_UserOfflineSmall Offline
May 16, 2012 - 5:25 pm

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.

Avatar
B E Thrower
Member
Free Members
sp_UserOfflineSmall Offline
May 16, 2012 - 5:37 pm

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

Avatar
B E Thrower
Member
Free Members
sp_UserOfflineSmall Offline
May 16, 2012 - 6:34 pm

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

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 16, 2012 - 10:39 pm

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

but good job!

Avatar
Grind Club
Member
Free Members
sp_UserOfflineSmall Offline
Aug 5, 2014 - 5:21 pm

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?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 5, 2014 - 8:36 pm

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...

Avatar
Grind Club
Member
Free Members
sp_UserOfflineSmall Offline
Aug 13, 2014 - 4:57 pm

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

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 13, 2014 - 8:46 pm

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

Avatar
Grind Club
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2014 - 9:45 am

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.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2014 - 12:53 pm

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'

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79600