1
irmtfan
help needed to add hegira calendar in xoops
  • 2006/11/23 6:40

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i barely know about js code.
i try to add this hegira calendar in XOOPS but i failed.
http://hoomb.dnsalias.com
the sample html page works fine:
<HTML>
<
HEAD>
<
TITLE>Persian Calendar TestTITLE>
HEAD>

<
Script Language="JavaScript" Src="dateScript.js">Script>
<
Script Language="JavaScript" Src="persianPopupCalendar.js">Script>

<
BODY>

<
Form Name="myForm" Method="Post" Action="">

<
input type="text" name="myFirstDate" size="30" Value="">
<
a href="javascript:void(0)" onclick="showCal('calFirstDate'); return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="calbtn.gif" border="0" alt="Select Date">a>

<
br>

<
input type="text" name="mySecondDate" size="30" Value="">
<
a href="javascript:void(0)" onclick="showCal('calSecondDate'); return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="calbtn.gif" border="0" alt="Select Date">a>

Form>

<
Script Language="JavaScript">
addCalendar("calFirstDate""Select Date""myFirstDate""myForm");
addCalendar("calSecondDate""Select Date""mySecondDate""myForm");
Script>

BODY>

HTML>


but i dont know how to implement this in xoops.

in XOOPS 2.2 i think i find the correct line in this file:
class/xoopsform/formcalendar.php

line 119:
$code  = ( 'Calendar.setup({' .
                   
$js_options .
                   
'});' );

and i try to edit it like this but its not work:
$code  = ( 

addCalendar({' 
.
                   
$js_options .
                   
'});' );

i think there is an issue in $js_options

in XOOPS 2.0 i still dont know how and where to add.

any help/suggestion would be really appreciated.this is very needed for all Persian community

just follow me in a correct way if im totally wrong in this

2
m0nty
Re: help needed to add hegira calendar in xoops
  • 2006/11/23 7:04

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i think but not certain.

Quote:




needs to be place in the tag of theme.html

then in the block/template you would have >

Quote:




Select Date





Select Date






replace (tammairanslip) with java script: (remove the space)

3
irmtfan
Re: help needed to add hegira calendar in xoops
  • 2006/11/23 7:09

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


yes but for example i want to add that to "news" module in submit.php and news module using the xoopsform and i cant put the code in any templates.

also i want a way to add that in XOOPS core and use it for any module

4
m0nty
Re: help needed to add hegira calendar in xoops
  • 2006/11/23 7:33

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


actually i think looking at it, i don't think it's that easy..

$code  = ( 

addCalendar({' 
.
                   
$js_options .
                   
'});' );


function addcalendar in persianPopupCalendar.js has options >

function addCalendar(name, title, field, form)

so you might need to make sure $js_options also uses those values.

they're defined in formcalendar.php

$js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options));

which is where i got lost, so you'll definitely have to wait for someone with more knowledge than me that's for sure.. sorry i can't be of more help.

5
irmtfan
Re: help needed to add hegira calendar in xoops
  • 2006/11/23 20:17

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


m0nty you are so kind there is nothing for sorry
i still work on this but its so hard and far from my abilities.
anyone can help?

Login

Who's Online

339 user(s) are online (244 user(s) are browsing Support Forums)


Members: 0


Guests: 339


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits