• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

new design- rows problem

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
17 posts • Page 1 of 2 • 1, 2

Postby zilveer » Sun Oct 08, 2006 2:14 pm

hi,
i am still working on the new designing to phpfreechat.
It is going well except one problem I got.


I want the rows have different colors so it looks like:
row1: white
row2: gray
row3: white
row4: gray

and so on...

in file: pfcclient.js,
in function "handleComingRequest: function( cmds )", row 738.

I added the following code in the for-loop:
Code: Select all
      if (mid % 2 == 0)
         line += '<div class=pfc_message1>'
      else
         line += '<div class=pfc_message2>'

it seems to work well when I start the chat but when someone writes a message every row becomes white, like in the picture below:

so the question is how can make the rows become white, gray when writing a message?
http://www.gettot.com/rows.png

/thanks for helping, zilveer
Last edited by zilveer on Sun Oct 08, 2006 2:23 pm, edited 1 time in total.
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Sun Oct 08, 2006 6:11 pm

what is the "mid" variable ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Sun Oct 08, 2006 6:13 pm

ok I know what is it.
Try this code :
Code: Select all
      if (id % 2 == 0)
          line += '<div class=pfc_message1>'
      else
          line += '<div class=pfc_message2>'
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Sun Oct 08, 2006 8:09 pm

thanks very much..
I would like to upload the design I have done so people can make even better CSS design. I have added som CSS-class attributes which makes it easier to change the design.

what do you think?I would like to make the design even better but maybe you could implement this code and css design to v1.0 beta7 release?

/thanx, zilveer
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Mon Oct 09, 2006 8:25 am

You can zip and submit your theme in the contribution section.
Then if it's well coded, I will add it to the official code source.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Mon Oct 09, 2006 10:35 am

ok.. but what about the code i implemented in the pfcclient.js-file? should i add it too the zip-file?

by the way, I should upload it in the contribution-section but should i upload the zip-file wherever i want and then give u a link where you can download it?

/thanx
Last edited by zilveer on Mon Oct 09, 2006 10:46 am, edited 1 time in total.
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Mon Oct 09, 2006 10:45 am

If the modifications are pertinent, I prefere a patch for this file. Then I will integrate it to the pfc source code.
Otherwise, if it's very specific code, you must add your customization to the customize.js theme file.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Mon Oct 09, 2006 10:49 am

ok.. by the way,
is it possible to write in my code direct to the customize.js theme -file?
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Mon Oct 09, 2006 10:57 am

yes, as an example, look at demo34
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Mon Oct 09, 2006 11:00 am

ok..
i remove my code from pfcclient.js and add it to customize.js but when i do that it writes:

'id' is undefinied.

so how should I do?

edit: i will include a readme textfile where I explain which code I have implemented in the pfcclient.js-file.
Last edited by zilveer on Mon Oct 09, 2006 11:07 am, edited 1 time in total.
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Mon Oct 09, 2006 12:53 pm

what did you put exactly in customize.js ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Mon Oct 09, 2006 5:45 pm

this is the code i pasted in js-file, how should it look alike?

Code: Select all
if (id % 2 == 0)
          line += '<div class=pfc_message1>'
else
          line += '<div class=pfc_message2>'
Last edited by zilveer on Mon Oct 09, 2006 5:46 pm, edited 1 time in total.
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Mon Oct 09, 2006 6:02 pm

So, it cannot work.
You look at the demo34 to understand how to overload this function.

If you are not a programmer, just send the zip, I will do the customize.js work for you.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby zilveer » Wed Oct 11, 2006 1:22 pm

hi,
sorry for not posting it sooner, i have had a lot of to do in school since i study.

anyway i have uploaded the design and included the pfcclient.js-file and also a readme.txt file where I write what I have done.

link: http://www.gettot.com/default.zip

/thanx, zilveer
Last edited by zilveer on Wed Oct 11, 2006 1:22 pm, edited 1 time in total.
/Isa Acar, the truth is infront of you
zilveer
Member
 
Posts: 38
Joined: Sat Oct 07, 2006 11:35 am
Top

Postby phpfreechat » Sun Oct 15, 2006 7:34 pm

Ok thank you zilveer, I will add this task to my todolist.
How do you want to name your theme ? can I name it zilveer ? :)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Next

Post a reply
17 posts • Page 1 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 14 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub