Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2] 3 4 ... 8

Author Topic: [ADDON] - sNews Calendar - with Integrated Admin - 1.6  (Read 46021 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #15 on: September 20, 2008, 05:03:55 am »

As I've noted at the top of the first post in this topic... we've solved the problem with the Event Popup... I say "we" because Joost pointed me in the right direction which led me to discover that I erred in replacing a couple of & with its entity equivalent & within one of the javascript functions within the snewscal_js.php file. Joost has reminded me that doing this in javascript is a NO-NO.

The Event Popup is working fine in FF, Safari, Chrome, Opera 9.0 and IE6... and on any sNews page, not just the Home page. The Home page restriction still applies when viewing in IE7. This is still a mystery and Rui has volunteered to help us hunt it down.

The Calendar Module Download zip has also been updated with the changes.

Thanks again to Joost and Rui for their assistance.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #16 on: September 20, 2008, 05:25:35 am »

this calendar not validate xhtml.can you work around to validate this calendar thru w3c?sNews is validate cms so i guess all mode need to be validate too or i m wrnong?
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

Joost

  • Guest
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #17 on: September 20, 2008, 06:04:02 am »

this calendar not validate xhtml.can you work around to validate this calendar thru w3c?sNews is validate cms so i guess all mode need to be validate too or i m wrnong?

Preferably, yes. So far Keyrocks has done a lot of work to make this calendar compatible with sNews and easy to install.
I've noticed you've made great progress on writing valid xhtml and css, so any help on making this calendar pass validation, would be appreciated. :)
However, it won't be easy, since the xhtml code is mixed with php code and javascript.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #18 on: September 20, 2008, 07:37:45 am »

this calendar not validate xhtml.can you work around to validate this calendar thru w3c? sNews is validate cms so i guess all mode need to be validate too or i m wrong?

@ Sasha... I had all the validation errors cleaned up on August 01.08 on this installation and you can check it if you like... there are 8 other validation errors showing but they are not calendar related. However... if you view the home page in this installation in FF and Opera 9.0... you will notice there is absolutely no event data showing in the popup... and this is caused by the validation errors I fixed. Read on to see why.

If you check the validation on the current demo you will get 6 errors and 4 warnings.
All of these are being generated by the win = window.open string in the javascript function popupEvent within function cal_js() in the calendar/snewscal_js.php file. In that string, replacing & with & eliminates the 6 validation errors BUT doing so creates syntax errors that are not acceptable within javascript... thereby causing the PHP function that displays the event data in the Event Popup panel to stop parsing when viewing in FF, Opera and Safari... so no data shows. We just ironed that bug out today. In this case... functionality takes precedent over validation... because we can't use & in javascript.

Also... If you add the Calendar Module to your sNews site and you are using the strict DOCTYPE string in the top of your index.php file, you will need to change it to a transitional string, otherwise you will have 2 validation errors caused by the strict string.
« Last Edit: September 20, 2008, 07:44:18 am by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #19 on: September 20, 2008, 08:01:03 am »

hm interesting....Joost i have vacation time coming up (this thursday) .I m leaving USA for Bosnia (30 days) my home land to visit my family so i do not have time to work on any project but when i finish my vacation i m going to look into this :).Keyrocks do great job with this calendar but i prefer validate page.This problem is cause by java script but hey we going to work on this to make validate :)
« Last Edit: September 20, 2008, 08:03:03 am by Sasha »
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #20 on: September 20, 2008, 11:27:12 am »

Hi guys,

Some references I found:
Character entity references in HTML 4
http://www.owasp.org/index.php/How_to_perform_HTML_entity_encoding_in_Java

JavaScript HTML entity encoding/decoding functions

Quote
DrNoble :
the correct form is -
<script type="text/javascript">
// <![CDATA[
script here
// ]]>
</script>

DrNoble :
I've solved the escape-the-ampersand-problem by going over to ';' instead.
In php you have to change two settings -
arg_separator.output = ";"
arg_separator.input = ";"

If you mark the script as CDATA will not be parsed by w3g...

http://www.evotech.net/blog/2007/08/css-javascript-character-entities/
http://snipplr.com/view/8210/html-encoding/
Logged

Joost

  • Guest
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #21 on: September 20, 2008, 02:55:23 pm »

hm interesting....Joost i have vacation time coming up (this thursday) .I m leaving USA for Bosnia (30 days) my home land to visit my family so i do not have time to work on any project but when i finish my vacation i m going to look into this :).Keyrocks do great job with this calendar but i prefer validate page.This problem is cause by java script but hey we going to work on this to make validate :)

4 weeks in your motherland, meeting family and friends, away from the stress and daily routine. That's great. :)
You come back as a newborn.

Enjoy!
Logged

poppoll

  • Full Member
  • ***
  • Karma: 47
  • Posts: 199
    • Poppoll's sNews playground
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #22 on: September 20, 2008, 03:59:40 pm »

To make it validate transitional in snewscal_js.php add the cdata strings as funwl65 said.

To make it validate strict:
Again add the cdata strings in snewscal_js.php
In showcall line 36/42 remove width="25" and align="center"
In the stylesheet  line 12 replace .dayNamesText with .dayNamesRow leave all settings as is
Bingo valid strict!
Poppoll
 
« Last Edit: September 20, 2008, 04:07:54 pm by poppoll »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #23 on: September 20, 2008, 04:14:40 pm »

Hi guys,

Some references I found:
http://www.evotech.net/blog/2007/08/css-javascript-character-entities/]
http://snipplr.com/view/8210/html-encoding/

These are good references Fun... this one is especially useful - Javascript & CSS Entities Calculator.

As it turns out, the Javascript Hex Value for & = &amp; is \u0026. I replaced the 2 instances of & in the problem string in function popupEvent and - voila - the script now validates 100% as XHTML 1.0 Transitional.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #24 on: September 20, 2008, 04:24:14 pm »

Hi guys,

Some references I found:
http://www.evotech.net/blog/2007/08/css-javascript-character-entities/]
http://snipplr.com/view/8210/html-encoding/

These are good references Fun... this one is especially useful - Javascript & CSS Entities Calculator.

As it turns out, the Javascript Hex Value for & = &amp; is \u0026. I replaced the 2 instances of & in the problem string in function popupEvent and - voila - the script now validates 100% as XHTML 1.0 Transitional.


\u0026: That's how it works in css as well. Good to know. :)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #25 on: September 20, 2008, 04:33:35 pm »

To make it validate strict:
1 - In showcall line 36/42 remove width="25" and align="center"
2 - In the stylesheet  line 12 replace .dayNamesText with .dayNamesRow leave all settings as is
Bingo valid strict!
Poppoll

Right on Poppoll... works like a charm. I've made these changes to the online demo and it now validates 100% as XHTML 1.0 Strict.
This should make Sasha very happy.
I will update the ZIP download shortly.
Now... only bug left to solve is why Event data only shows in the Popup from the Home page in IE7. Rui is looking at this one too.

+Karma for all (Joost, Funl65, Poppoll and Rui)  ;)
« Last Edit: September 20, 2008, 04:36:06 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

poppoll

  • Full Member
  • ***
  • Karma: 47
  • Posts: 199
    • Poppoll's sNews playground
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #26 on: September 20, 2008, 04:49:08 pm »

Glad I could help.

The event manager panel is not displayed correctly in Firefox.
In the css add this in .tableheader height: 25px;

In Add New Event the Add and Cancel buttons are not displayed:
In events_admin.php remove at line 454 an 455 the classes

PP
« Last Edit: September 20, 2008, 07:02:04 pm by poppoll »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #27 on: September 20, 2008, 06:33:01 pm »

Just curious, is the ADD EVENT functionality disabled in the Demo? Check Sept 19th. I needed to add the /event_new/ to the Admin URL in order to get a look at the Add Event page... Damned Hackers... :lol:
« Last Edit: September 20, 2008, 06:36:34 pm by jlhaslip »
Logged
Yes! I have no siggy.

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #28 on: September 20, 2008, 09:50:06 pm »

Add this line to lang list
Quote
$l['events_list'] = 'Calendar Events by month';

breadcrumbs needs this line, when you're in events_list. ;)
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #29 on: September 20, 2008, 10:35:19 pm »

Just curious, is the ADD EVENT functionality disabled in the Demo? Check Sept 19th. I needed to add the /event_new/ to the Admin URL in order to get a look at the Add Event page... Damned Hackers... :lol:

Hehe... no... it is not disabled... It is fixed now... and I've updated both the online demo and the download ZIP. I just needed to add: height: 18px; to .tableheader in the "Admin Only" section of the style.css file. IE7 didn't need a fixed height but it appears FF & Opera did. I must confess... I had not looked at the Admin panels in FF and Opera until now. I'll check it out.

Add this line to lang list
Quote
$l['events_list'] = 'Calendar Events by month';

Thanks Rui. I have added it to the instructions in the first post and updated the online demo.  :)
« Last Edit: September 20, 2008, 11:05:53 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: 1 [2] 3 4 ... 8