PDA

View Full Version : Styles In Admin Panel


webhost
20 Jul 2001, 14:30
When inside the admin control panel and selecting edit
under styles you can change color options! Under Calendar
colors I would like to add another entry to this say for a
chat event and be able to select different colors for this. Can this be done? If so how please

Mike Sullivan
20 Jul 2001, 15:27
You'd have to hack admin/style.php then, or you can just add a replacement variable for it directly through the replacement system.

webhost
20 Jul 2001, 15:34
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I added the line about chatcolor it shows up; down in cp under styles BUT when i change the color to say #0000ff it does change the block color to the right but when I save and go back and look the 0000ff is not there it is just blank.? color block grey

Mike Sullivan
20 Jul 2001, 15:52
Being a hack, we can't really support any code changes. Especially since the style editor wasn't designed to handle custom replacements it seems. Hence I suggest adding the replacements directly through the replacement system.

webhost
20 Jul 2001, 15:57
I think I might have to do something different. What I am doing is adding chat events to the calendar. I have made 2 templates calendar_chatevent and calendar_chateventbutton and I am in the process of modifing calendar.php so I'm hoping someway the styles.php change could work it would make life easier.

webhost
20 Jul 2001, 19:30
Ed, I got style addition working. I not only
had to add line above to style.php but I also
had to add variable called {chatcolor} once I
did this it worked the way it should. I have
another problem now with calendar.php file.
I added the following code and I get a error
on line 189 below. Can you tell me what I am
doing wrong?




Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------





==========================
This is what it was
==========================


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Freddie Bingham
20 Jul 2001, 19:38
Change the } to a { (on line 189)

webhost
20 Jul 2001, 19:41
I did I will try again I got the same error when I changed it the other way.

webhost
20 Jul 2001, 19:47
I changed it got the same error.

Parse error: parse error, expecting `'('' in /home/realweb/public_html/forums/calendar.php on line 189

Freddie Bingham
20 Jul 2001, 20:05
Well you also have elseif with nothing following it so change that to else or put some equality in there. i.e. elseif (1 == 1 )

webhost
20 Jul 2001, 20:45
ok freddie that worked that also helped with about 4 more lines. Now I am stuck here. On line 544 on 543 I tried like this 1==1) and I also tried on 544 changing } to { no luck.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Freddie Bingham
20 Jul 2001, 20:51
I just used (1 == 1 ) as an example, you don't want to put that in as it always equates to true;

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Perhaps somethins like that would work as I don't know what the $info[] array is coming from or it's purpose.

webhost
20 Jul 2001, 21:31
ok freddie I had 2 other places but I was able to clear those up. The calendar page opens up now but I don't see the extra button I am trying to get there. I changed the style.php and added a color block in the control panel added a variable for it and it works. I then made 2 templates called calendar_chatevent and calendar_chateventbutton, I then modified calendar.php Did I miss something somewhere. Boy for working all day on something this is disappointing. Any ideas?

webhost
21 Jul 2001, 02:56
Ok update all done Having one small problem look at script below you will see it needs to pull from 3 templates. The way the script is now its using the private event for both itself and also for the chat event. This mainly has to do with text color, Can someone tell me how to fix this. I have template for private setup for #880000 and chat event template setup for #669933 but text for both showup as #880000. Public event is setup for #000088 and it works right. I have narrowed it down to this part of calendar.php Hopefully someone can see the problem.





Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------