| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
Andreas 500+ Posts Club


Offline Joined: Sep 03, 2004 Posts: 852 Location: Gävle, Sweden
|
Posted: Mon Nov 22, 2004 8:18 pm Post subject: Help with porting a module for CVS? |
|
Anyone here good at porting modules for the coming release? I've got a module that works fine with an 8.2b distribution but not at all with 9.0. It's a game module that includes a bunch of Flash-games for the site. This is the index file:
index.php
Admin edit: Post the file as attachment
_________________ Andreas Rönnqvist
www.omegaproject.se
[OmegaProject] Founder
Andreas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.52(Unix)/4.0.23/4.3.10-2/Dragonfly 9.0.6.1
Last edited by Andreas on Mon Nov 22, 2004 8:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Mon Nov 22, 2004 8:33 pm Post subject: Re: Help with porting a module for CVS? |
|
use $_GET and $_POST for retrieving data
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
Andreas 500+ Posts Club


Offline Joined: Sep 03, 2004 Posts: 852 Location: Gävle, Sweden
|
Posted: Mon Nov 22, 2004 9:03 pm Post subject: Re: Help with porting a module for CVS? |
|
And that's exactly why I asked for someone to help me out with this... I've got absolutely NO idea.... maybe djdevon3 or someone else wanna take a stab?
_________________ Andreas Rönnqvist
www.omegaproject.se
[OmegaProject] Founder
Andreas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.52(Unix)/4.0.23/4.3.10-2/Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Mon Nov 22, 2004 9:58 pm Post subject: Re: Help with porting a module for CVS? |
|
I will give you an explanation:
index.php?name=Andreas&file=test
In the above example there are 2 GET variables
- $_GET['name']
- $_GET['file']
The old system didn't care much about it so they where already defined in the system as:
- $name
- $file
There's an security risk involved with this second method (aka register_globals)
Because the method doesn't care if you use GET, POST or COOKIE so we forced to block this behaviour in 9.0
When you POST data (like in a <form method="post"> you can retrieve the data using:
- $_POST['name']
- $_POST['file']
If an variable can be give thru GET and POST you construct it like this:
| PHP: |
$name = ( isset($_POST['name']) ? $_POST['name'] : (isset($_GET['name'])?$_GET['name']:'default') );
|
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
tank Gold Supporter


Offline Joined: Apr 20, 2004 Posts: 824 Location: Houston, Texas USA
|
Posted: Mon Nov 22, 2004 10:04 pm Post subject: Re: Help with porting a module for CVS? |
|
DJ,
Is this the pnly thing that has to be changed to make a global variables = off port?
_________________ Search is your friend
tank's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora Core 1, Apache 1.3.33, Mysql 4.1.14, PHP 5.0.5 w/ APC cache, Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
xfsunoles XHTML Specialist


Offline Joined: Apr 30, 2004 Posts: 2502 Location: Melbourne, Florida
|
Posted: Mon Nov 22, 2004 10:58 pm Post subject: Re: Help with porting a module for CVS? |
|
in 9.0, registar global is OFF. you need to use $_GET and $_POST
_________________

Firefox is my Favorite Browser
xfsunoles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS
|
|
| Back to top |
|
 |
djdevon3 Gold Supporter


Offline Joined: Aug 05, 2004 Posts: 4363
|
Posted: Tue Nov 23, 2004 6:10 am Post subject: Re: Help with porting a module for CVS? |
|
ouch that's why nothing is going to work. so the question mark denotes a get or post?
djdevon3's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.33/4.4/4.3.11
|
|
| Back to top |
|
 |
Andreas 500+ Posts Club


Offline Joined: Sep 03, 2004 Posts: 852 Location: Gävle, Sweden
|
Posted: Tue Nov 23, 2004 7:09 am Post subject: Re: Help with porting a module for CVS? |
|
Thanks alot DJMaze! Even though I am very unsure if I will be able to port the module by myself I've just gained an enormous understanding of why certain things were done in one way by PHPNuke and another way here, by you guys!
_________________ Andreas Rönnqvist
www.omegaproject.se
[OmegaProject] Founder
Andreas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.52(Unix)/4.0.23/4.3.10-2/Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
tank Gold Supporter


Offline Joined: Apr 20, 2004 Posts: 824 Location: Houston, Texas USA
|
Posted: Tue Nov 23, 2004 1:18 pm Post subject: Re: Help with porting a module for CVS? |
|
| djdevon3 wrote: |
| ouch that's why nothing is going to work. so the question mark denotes a get or post? |
anything passed through the url uses a GET to set the variable. Anything passed through a form uses a POST to set the variable.
_________________ Search is your friend
tank's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora Core 1, Apache 1.3.33, Mysql 4.1.14, PHP 5.0.5 w/ APC cache, Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Tue Nov 23, 2004 4:43 pm Post subject: Re: Help with porting a module for CVS? |
|
| Andreas wrote: |
| Thanks alot DJMaze! Even though I am very unsure if I will be able to port the module by myself I've just gained an enormous understanding of why certain things were done in one way by PHPNuke and another way here, by you guys! |
NP someone will eventualy convert the file for you.
Although i think this thread is a great oppertunity to lay out the problems in the upcomming 9.0 so everyone will eventualy understand how to work with it and understand why we've changed.
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
Andreas 500+ Posts Club


Offline Joined: Sep 03, 2004 Posts: 852 Location: Gävle, Sweden
|
Posted: Tue Nov 23, 2004 8:13 pm Post subject: Re: Help with porting a module for CVS? |
|
Yeah, this community is filled with nice people that help eachother. I try my best with my limited knowledge to help people, but we all gotta start somewhere, right?
Atleast I learned something about PHP and one reason for why DragonFly is more secure than other CMS' out there.
_________________ Andreas Rönnqvist
www.omegaproject.se
[OmegaProject] Founder
Andreas's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache 2.0.52(Unix)/4.0.23/4.3.10-2/Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
|
|