The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Need code to make EVENT dates on Calendar widget a different color.

5 posters

Go down

Solved Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 6:38 am

Hello.Hello  

This code was given to another user to make the event dates on the Calendar widget a different color:  

   #calendar a {
       background: red;
   }

It worked for them but it didn't work for me.  I changed "red" to the hex color for crimson and also to the word crimson, but neither worked.  I also tried adding !important, but there was no change.

Is my code wrong?  I added it to the bottom of the CSS.  My site is phoBB2.

Thanks!
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Sir. Mayo August 21st 2013, 3:04 pm

Try this one
Code:

 gen,gen, b
{
 background-color: #DC143;
}


Last edited by Sir. Mayo on August 21st 2013, 3:21 pm; edited 1 time in total (Reason for editing : Code fix)
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 978
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 5:02 pm

No, thank you for replying but this is not what I want at all.  

The code you supplied turns the whole box (the little square box) containing the date to crimson and also the percentage blocks in the POLL widget turn crimson.  (crimson = #DC143C.)  

Only the numerals of the date, of the event, in the Calendar widget should turn crimson (or the color I choose.)  For example, this month 23, 24, and 28 should be crimson.

But thanks for trying to help.  

I think the code in my first post is right, but maybe not for phpBB2?
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by runawayhorses August 21st 2013, 5:23 pm

Try this in your css:

Code:
a.gen, a.genmed, a.gensmall {
color: #DC143C !important;
text-decoration: none;
}
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Sir. Mayo August 21st 2013, 6:19 pm

runawayhorses wrote:Try this in your css:

Code:
a.gen, a.genmed, a.gensmall {
color: #DC143C !important;
text-decoration: none;
}
I tried that on mine as well before i posted at first the issue with that is it turns most of the text  in the portal red! Very Happy

but idk if this helps but i know the code to change all the events but the set ones!?

What about this topic you opened here?
https://help.forumotion.com/t126308-calendar-able-to-show-different-events-in-different-colors?highlight=Calendar
I thought this was answered once for you!
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 978
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 6:53 pm

Read post No #6.
https://help.forumotion.com/t102407-
It should do the trick you're asking Castellana. If you end up in problems post your forums URL.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Sir. Mayo August 21st 2013, 7:03 pm

I belive that code is for Phbb3 not phbb2 here forum is Phbb2!
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 978
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 7:13 pm

BB2::

Code:
$(document).ready(function() {
$('#calendar_container td.quote:has("a")').css('background-color', 'red');
});
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 7:37 pm

Thanks to all. Very Happy 

First, let me clear up two things:

@ Sir Mayo - No, that post of mine that you linked is for an entirely different problem.  That one is solved, as you point out!  

@ Nera - The post you linked in reply #6 above, is the very post that I borrowed the code from.  In my first post here, I show some code that you wrote from the topic you linked. Hello I used it because it looked like it would do the trick for me.  

So now we are up to the codes offered after that.  
Nera's BB2 code is last so I'll try that one and thWho is Online? box.en post back here.

..... a few minutes later .....

@ Runaway horses - your code worked fine, except it also changed the "Today's active topics" and "Administrators, Moderators, Members" colors at the very bottom of the Who is Online box.
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 8:06 pm

It was not CSS but JS, that's why it has $ signs. And you were suposed to put it in AP > Modules > JS managment and before it enable JS managment and it would work.

(Saw you edited your post now) Take that code I posted here and add it like I explained.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 8:09 pm

Okay, thanks. Will do.
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 8:10 pm

Okies.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 8:22 pm

Okay, now I am in javascript and this is my first time with it.  

Should I add the code on to the end of the existing Javascript?  

If I don't like it, is Javascript easy to change like CSS?  Or will it be a big deal and mess up my forum?

Just have a lot of questions for you because I have never done anything in javascript!

Thanks!!! Very Happy
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 8:27 pm

Create a new JS by clicking on Create new JS button, mark all pages and save. After it if you don't like it you can just delete the whole new JS. Before that make sure your JS is enabled. On the top of it when you arrive in it press enable JS: YES and save it.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 8:39 pm

Okay, thanks for the directions.  

I did all like you said but there is no color change at all.  Nothing has changed.  I refreshed the forum but no change.

What now?  
(Thanks for helping me!)
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 8:44 pm

Do you have any non working JS that would make this one not to work? Cause I've tried it on a BB2 forum and works completely normal.
Example::
http://i.imm.io/1fHP6.png
If you don't have any than you did not enable JS. It has to work on your side too if it work on a default BB2 forum like mine.


Completely my bad Castellana, didn't check your forum first.

This will work, tried it on your forum:

Code:
$(document).ready(function() {
$('#calendar_container .forumline td:has("a")').css('background-color', 'red');
$('#calendar_container .forumline td:has("a")').css('background-color', 'red');
});
Procedure to set it up is the same.

Example of it working on your forum.

Need code to make EVENT dates on Calendar widget a different color. 1fHUq
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 9:11 pm

Thank you but I don't want the whole box to be the color.  

Only the numerals of the date, of the event, in the Calendar widget should turn crimson (or the color I choose.)  I mean only the numerals such as 23, 24, and 28 should be crimson - not the whole little square box.    

Runaway Horses' code came the closest to doing the job but it also changed some other text on the Index page so I could not use it.  

Any ideas?  
Thanks you so much for continuing to work on this with me. Very Happy  I value your help.  

Oh, yes - I definitely DID enable the JS

..... a few minutes later .....

Even though it was not exactly what I thought I wanted, I tried your code and you know what - I like it!  I changed the color a couple of times and settled on a "ghost white."  I think I will keep this code and use it.  :wouhou: 

It might still be fun to learn the code for changing the color of ONLY the numerals. but for now I like the code you gave me.  

So, thanks once again to you Nera, and to Runaway and Mayo for all your help!  
I would be NOWHERE without FM support. Very Happy 

I still can't find the icons to mark this "solved."  I will have to make a topic about it.


Last edited by Castellana on August 21st 2013, 9:34 pm; edited 1 time in total
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Nera. August 21st 2013, 9:17 pm

Code:
$(document).ready(function() {
$('#calendar_container a.gen').css('color', 'red');
});
It will do this::

Need code to make EVENT dates on Calendar widget a different color. 1fHZI

Code:
It might still be fun to learn the code for changing the color of ONLY the numerals.
Edit: Glad you solved it but you should really stop editing your messages and you'd find what you are looking for exactly in the next post since I posted it lol

Take care (:
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by Castellana August 21st 2013, 9:58 pm

Sorry! I thought we were supposed to edit our posts or else it would be called double-posting.
I'll get it right one day! *lol*

Anyway, this is solved now and I found the "solved icon," too. Will miracles never cease?

Both of your codes work great and both are good options for my forum.
Thanks!
Castellana
Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Need code to make EVENT dates on Calendar widget a different color.

Post by SLGray August 21st 2013, 11:47 pm

Topic Solved & Locked


Need code to make EVENT dates on Calendar widget a different color. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51526
Reputation : 3523
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum