Would this "Change color of "Today" & "Yesterday" be possible please.
Would this "Change color of "Today" & "Yesterday" be possible please.
Would this be for any specific place[s], or everywhere?![]()
Just for the main page will be fine pleaseand thanks Marc .
Just for the main page will be fine pleaseand thanks Marc .
Just for the "Last Post" column, or in the info center, as well?
you couold always use the switch it code and put in the Yesterday and today text, like this:
Code:
- <script type="text/javascript">
- <!--
- /* Switch-It by Cr0w */
- function switchIt(word,word2){
- var f = document.getElementsByTagName("font");
- for(i=0;i<f.length;i++){
- f[i].innerHTML = f[i].innerHTML.replace(word,word2);
- }
- }
- switchIt("Yesterday","<Font Color=green>Yesterday<font>");
- switchIt("Today","<Font Color=red>Today<font>");
- //-->
- </script>
you would just have to change the color names to what you want them to be or add a # and put in a color hex![]()
you couold always use the switch it code and put in the Yesterday and today text, like this:
Code:
- <script type="text/javascript">
- <!--
- /* Switch-It by Cr0w */
- function switchIt(word,word2){
- var f = document.getElementsByTagName("font");
- for(i=0;i<f.length;i++){
- f[i].innerHTML = f[i].innerHTML.replace(word,word2);
- }
- }
- switchIt("Yesterday","<Font Color=green>Yesterday<font>");
- switchIt("Today","<Font Color=red>Today<font>");
- //-->
- </script>
you would just have to change the color names to what you want them to be or add a # and put in a color hex![]()
Yes, but that would replace it everywhere; in posts, too. That's why I'm asking him exactly where he wants it to be replaced, so that I can check the specific cells only.![]()
lol ya i see, that makes sence.
If it will be easier for you to do like this that will be cool thanks.
Just for the "Last Post" column, or in the info center, as well?
If it will be easier for you to do like this that will be cool thanks.
Just for the "Last Post" column, or in the info center, as well?
What colours would you like them to change to?![]()
For "Today" 336600 and for "Yesterday" FFCC66 please.
For "Today" 336600 and for "Yesterday" FFCC66 please.
Give me a minute.![]()
Ok no worries.
Code:
- <script type="text/javascript">
- <!--
- /* Change "Today" and "Yesterday" Colours
- By Cr0w */
- if(location.href.match(/\.co\.uk(\/$|\/action\/home$|\/action\/home\/$|$)/i)){
- var td = document.getElementsByTagName("td");
- var lpc = document.getElementById("info_center_last_post");
- lpc.innerHTML = lpc.innerHTML.replace(/Today<\/b> at/i, '<font color="#336600">Today</font></b> at');
- lpc.innerHTML = lpc.innerHTML.replace(/Yesterday<\/b> at/i, '<font color="#FFCC66">Yesterday</font></b> at');
- for(t=0;t<td.length;t++){
- if(td[t].className.match(/(window2|lastpost)/) && td[t].width == "25%" && td[t-1].width == "69%"){
- td[t].innerHTML = td[t].innerHTML.replace(/Today<\/b> at/i, '<font color="#336600">Today</font></b> at');
- td[t].innerHTML = td[t].innerHTML.replace(/Yesterday<\/b> at/i, '<font color="#FFCC66">Yesterday</font></b> at');
- }
- }
- }
- //-->
- </script>
Main Footer.![]()
Thank you Marc its working fine my friend , nice code.
No problem.![]()
I'm sorry to say this but when the page reloaded yesterday change back to the default color ?
http://tropolis.virtualforums.co.uk/
Oops, the word "Yesterday" isn't bolded; thought it was.Give me a second.
![]()
EDIT: How's this:
Code:
- <script type="text/javascript">
- <!--
- /* Change "Today" and "Yesterday" Colours
- By Cr0w */
- if(location.href.match(/\.co\.uk(\/$|\/action\/home$|\/action\/home\/$|$)/i)){
- var td = document.getElementsByTagName("td");
- var lpc = document.getElementById("info_center_last_post");
- lpc.innerHTML = lpc.innerHTML.replace(/Today<\/b> at/i, '<font color="#336600">Today</font></b> at');
- lpc.innerHTML = lpc.innerHTML.replace(/Yesterday at/i, '<font color="#FFCC66">Yesterday</font> at');
- for(t=0;t<td.length;t++){
- if(td[t].className.match(/(window2|lastpost)/) && td[t].width == "25%" && td[t-1].width == "69%"){
- td[t].innerHTML = td[t].innerHTML.replace(/Today<\/b> at/i, '<font color="#336600">Today</font></b> at');
- td[t].innerHTML = td[t].innerHTML.replace(/Yesterday at/i, '<font color="#FFCC66">Yesterday</font> at');
- }
- }
- }
- //-->
- </script>
![]()
Ok lol .
Ok lol .
I've edited my previous post.![]()
Cool stuff my friend its perfect thank you.
No worries.![]()