Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Adding a new administrative script
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Charles Fulton  
View profile  
 More options Jul 13 2011, 12:28 pm
From: Charles Fulton <macken...@gmail.com>
Date: Wed, 13 Jul 2011 09:28:23 -0700 (PDT)
Local: Wed, Jul 13 2011 12:28 pm
Subject: Adding a new administrative script
I've been working on formalizing the Google Analytics code written by
Carolyn Zinn at Kalamazoo and I've run into a slight problem. The code
itself lives in lib/core/scripts/ga and I've added an admin link in
the admin interface. Yet whenever I try to hit the link from the admin
interface I'm getting a 404 error. I'm pretty sure I haven't mangled
any URLs so I'm starting to think there's some restriction in place
that I don't know about. Any pointers would be appreciated.

Charles


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Ryan  
View profile  
 More options Jul 13 2011, 4:07 pm
From: Matt Ryan <matt.d.r...@gmail.com>
Date: Wed, 13 Jul 2011 15:07:15 -0500
Local: Wed, Jul 13 2011 4:07 pm
Subject: Re: [reason-discussion] Adding a new administrative script
Hi, Charles --

First, I should mention that "naked" scripts of this type are not the
preferred way of building administrative tools. It is much better to
create an Admin Module and register it, as then you get a lot of
sanity checking and  input cleanup for free, not to mention
allowing you to remain inside the Reason interface.

That, said, here's the answer to your immediate question:

Every administrative script that lives in lib/core/scripts/ has to
have a counterpart file in www/scripts/ that includes the file in the
core.

The idea is that all functional code lives in the core, and that these
"stubs" under www exist to provide http access.

An example is the Allowable Relationship Manager, which lives at
lib/core/scripts/alrel/alrel_manager.php but access is through a
script at www/scripts/alrel/alrel_manager.php. The contents of the
latter file are:

<?php
        /**
         * Stub for the Allowable Relationship Manager
         * @package reason
         * @subpackage scripts
         */
        include_once( 'reason_header.php' );
        reason_include_once( 'scripts/alrel/alrel_manager.php' );
?>

I hope that helps!

Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles Fulton  
View profile  
 More options Jul 14 2011, 4:27 pm
From: Charles Fulton <macken...@gmail.com>
Date: Thu, 14 Jul 2011 16:27:52 -0400
Local: Thurs, Jul 14 2011 4:27 pm
Subject: Re: [reason-discussion] Adding a new administrative script
Thanks--that's exactly what I was looking for!

On a related note, is there a sample Admin Module I could look at?
Ultimately that's probably the direction to go in.

--Charles


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »