Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks :: Archives ⇒ Help with porting a module for CVS? :: Archived


Help with porting a module for CVS? :: Archived
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Post new topic    Revive this topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

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

Offline Offline
Joined: Sep 03, 2004
Posts: 852
Location: Gävle, Sweden
PostPosted: 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
View user's profile Visit poster's website ICQ Number MSN Messenger Yahoo Messenger
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: 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
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
Andreas
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 03, 2004
Posts: 852
Location: Gävle, Sweden
PostPosted: 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
View user's profile Visit poster's website ICQ Number MSN Messenger Yahoo Messenger
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: 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
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
tank
Gold Supporter
Gold Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 824
Location: Houston, Texas USA
PostPosted: 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
View user's profile Visit poster's website
xfsunoles
XHTML Specialist
XHTML Specialist

Offline Offline
Joined: Apr 30, 2004
Posts: 2502
Location: Melbourne, Florida
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger Photo Gallery
djdevon3
Gold Supporter
Gold Supporter

Offline Offline
Joined: Aug 05, 2004
Posts: 4363

PostPosted: 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
View user's profile Visit poster's website Photo Gallery
Andreas
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 03, 2004
Posts: 852
Location: Gävle, Sweden
PostPosted: 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
View user's profile Visit poster's website ICQ Number MSN Messenger Yahoo Messenger
tank
Gold Supporter
Gold Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 824
Location: Houston, Texas USA
PostPosted: 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
View user's profile Visit poster's website
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: 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
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
Andreas
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 03, 2004
Posts: 852
Location: Gävle, Sweden
PostPosted: 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
View user's profile Visit poster's website ICQ Number MSN Messenger Yahoo Messenger
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 1 of 1
All times are GMT

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.
· Removed index.php depency.
· v9 fixed menu hoverings on touch screens.
· Fixed menu hoverings on touch screens.
· Fixed empty $Module object

Детальніше...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy