register URI and APIs

Register URI and APIs, a forum discussion on Jojo CMS. Join us for more discussions on Register URI and APIs on our Plugin Support forum.

Back to Forum Index : Back to Plugin Support   RSS
casey

2 Jul 2008
Posts: 7

Hi,

I am using the api.php file so that I can use [[plugin]] to display information.

I am currently trying to get the query strings to work, but haven't been successful.

in the api.php file I have the following:
Jojo::registerURI("/new/competition/[id:integer]", 'Jojo_Plugin_competition');

and in the php file I am using:
$compid = Jojo::getFormData('id', 0);

however it seems that $compid is always 0.

What am I doing wrong?


Thanks,

Casey
Harvey

Core Developer

Harvey

3 Jul 2008
Posts: 327

Looks ok at first glance. Are you running setup after each change to api.php? This clears the cached copy.
casey

3 Jul 2008
Posts: 7

Hi,


I am now getting a 404 error, I have taken a look at the topic that was relating to it but I couldn't solve the problem.

If I change the plugin so that it doesn't use the [[plugin]] method, but uses the technical tab option in the admin then I can get the GET variables working.

Any ideas, why I can't get it working using the [[plugin]] method?

Thanks,

Casey
Back to Forum Index : Back to Plugin Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.