1
MadCat
Delete TimeZone from register.php
  • 2004/6/24 19:46

  • MadCat

  • Just popping in

  • Posts: 72

  • Since: 2004/6/18


I want to delete the timezone of registerform (register.php). I dont want to apears in the form.

First I tried to delete the timezone from register.php but when i load the site the timezone still apears. I put commets // in front of timezone but nothing.

What can i do to make timezone=off?

Thanks!

2
tl
Re: Delete TimeZone from register.php
  • 2004/6/24 19:53

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Did you comment out all timezone in the file? There are several places referencing timezone.

3
MadCat
Re: Delete TimeZone from register.php
  • 2004/6/24 20:24

  • MadCat

  • Just popping in

  • Posts: 72

  • Since: 2004/6/18


I comment all timezone in the file but when i comment the line 150 (// input type=hiden name=user_viewemail .... name='timezone_offset' value='". etc) then the registerform doesnt loading (error in line 150)

4
tl
Re: Delete TimeZone from register.php
  • 2004/6/24 21:10

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Make sure the commented line did not get pushed into two lines.
If that is the case, comment out the second line as well.

5
Dave_L
Re: Delete TimeZone from register.php
  • 2004/6/24 21:14

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


<input type='hidden' name='timezone_offset' value='".(float)$timezone_offset."' />


That line is inside a quoted string (i.e., an echo "..."; that spans several lines), so sticking // at the beginning won't work.

Either delete the line completely, or use HTML comment delimiters:

[color=ff0000]<!--[/color]<input type='hidden' name='timezone_offset' value='".(float)$timezone_offset."' />[color=ff0000]-->[/color]


If you make other changes in that section, be careful not to mess up the outermost quotes of the echo's content.

6
MadCat
Re: Delete TimeZone from register.php
  • 2004/6/25 6:19

  • MadCat

  • Just popping in

  • Posts: 72

  • Since: 2004/6/18


Thank you guys!
Dave_L i do exactly what you say to me but still the timezone show up in my form. What else can i do?

7
tl
Re: Delete TimeZone from register.php
  • 2004/6/25 11:47

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


MadCat - Did you try to comment out line and second line if get split into two lines?

Dave - can you use html comment in php files? Never tried and I always thought it will only worked in html files.

8
Dave_L
Re: Delete TimeZone from register.php
  • 2004/6/25 12:01

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


MadCat: If you're not comfortable with these kind of changes, maybe you should contract someone to do the work for you.

tl: In this case, the PHP echo function is being used to output a string containing HTML. Since they're in a string, PHP doesn't parse the HTML comment delimiters, it just outputs them along with the rest of the HTML. But deleting the HTML that you don't want to output may be simpler than using the comment delimiters.

9
tl
Re: Delete TimeZone from register.php
  • 2004/6/25 12:02

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Madcat:
You need also to comment out two lines in the registerform.php
located in include/

//$tzselected = ($timezone_offset != "") ? ...
//$reg_form->addElement(new XoopsFormSelectTimezone ...


10
tl
Re: Delete TimeZone from register.php
  • 2004/6/25 12:25

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Quote:

tl: In this case, the PHP echo function is being used to output a string containing HTML. Since they're in a string, PHP doesn't parse the HTML comment delimiters, it just outputs them along with the rest of the HTML. But deleting the HTML that you don't want to output may be simpler than using the comment delimiters.

Thanks, Dave.

Login

Who's Online

167 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 167


more...

Donat-O-Meter

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

Latest GitHub Commits