Support Forum
I would like to highlight or change colour of the Watch/Subscribe and PM Inbox buttons when content is present. What would you suggest the easiest way to do that would be?
I was thinking of both a subtle colour change to the button background as well as a thicker border/glow effect.
Just looking for some pointers but it might be a nice feature for the future.
Conrad
not sure what you mean by spWatchCountRead... not really a variable though you could read it from the DOM using jQuery (or js)...
if you are asking about doing it in the template file, you could check the watch count by:
$newPM = spdb_count(SPPMMESSAGES, "to_id=$spThisUser->ID AND inbox=1 AND message_status=0");
and then call the template tag with a different button based on the value of $newPM
Visit Cruise Talk Central and Mr Papa's World
in your template file (spHead.php for PM) find:
if (function_exists('sp_PmInboxButton')) sp_PmInboxButton('tagClass=spButton spRight', 'Inbox:', 'Go to PM inbox');
and replace with:
$newPM = spdb_count(SPPMMESSAGES, "to_id=$spThisUser->ID AND inbox=1 AND message_status=0"); if ($newPM > 0) { if (function_exists('sp_PmInboxButton')) sp_PmInboxButton('tagClass=spButton2 spRight', 'Inbox:', 'Go to PM inbox'); } else { if (function_exists('sp_PmInboxButton')) sp_PmInboxButton('tagClass=spButton spRight', 'Inbox:', 'Go to PM inbox'); }
now, I 'think' I know what you are trying to do... so you will have to define in your sp theme a new spButton2 class which is what the altered button will look like (vs spButton standard)...
Visit Cruise Talk Central and Mr Papa's World
That is marvellous thanks very much Steve.
I'll hopefully get chance to have a go at this tomorrow otherwise it will be Friday because I am travelling for work a little this week
So much to do, so little time - er you're probably not the best person to say that to though are you?
Conrad
so, that's what you wanted? cool...
Visit Cruise Talk Central and Mr Papa's World
Just one anomaly.
As a PM inbox indicator of unread PMs when in any forum view everything works perfectly in all browsers.
However if you have 1 unread PM and then select the inbox botton and go and read the PM, the PM count goes to 0 but the button background remains as specified in the spButton2 class. Refreshing the page corrects the problem so I suspect that a little tweak is necessary. How can I correct this?
I was astonished to see that IE8 doesn't do gradients! How rubbish is that?
1 Guest(s)