Hal Fan Hour

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 6 September 2013

gRSShopper Setup (2)

Posted on 11:31 by Unknown
Making Optlists

Preparing for the MOOC-REL course I filled in a full set of optlists.

An 'optlist' is the information required to create a dropdown list. These lists create predefine options in the forms people use to create new posts, events, pages, etc.

So, for example, a 'post' might have a field called 'status'. Normally it would just be a plain text field, and you'd type in the name of the type. But it's easier just to select a value from a predefined list. The 'optlist' defines this list.

Administrators can crate optlists by clicking on [New] Optlist in the admin screen(the direct link is http://yoururl/cgi-bin/admin.cgi?db=optlist&action=edit ) and providing the following information:

Table: the name of the table

Field: the name of the field

Data: this is the list of options. It's a structured list: optiontitle,optionvalue;optiontitle2,optionvalue2
Just type out the just. (You can experiment with this to get it right).
For example: Approved,A;On Hold,O;Retired,R

Adding Fields to Tables

Setting up the optlists, I noticed some fields were not updating properly - I would enter the value and it would just disappear when I updated the form. This happens when the field is not defined in the table.

I can add a field to any table using the Database functions. Click on the 'Database' tab in the admin screen and look for 'Manage Database'. Select the table to look at, then select 'Show Columns' from the drop down. This will tell me the names of all the fields in the database.

To add the new field, type the name of the field in the space and select 'Add Column' from the dropdown.  

Note all table column field names begin with the name of the table. So, for example, to add a 'title' field to the 'event' table, the name of the field must be 'event_field'. This way, every single field in the database has a unique name.

Note to change the list of fields that will be displayed for any given table in admin.cgi, go to the edit_record() function (it's the content beginning my $showcols = ...). This is hard-coded for now but will one day be part of the general admin screen. You will need to do this if you add a field that wasn't previously defined.

grsshopper.js

I noticed things like the delete buttons were not working. Many of the basic functions (including delete alerts and login status updates are handled by the grsshopper.js Javascript library. The templates were still pointing to the older downes.js I was using previously. So I changed the script include to read src="http://123.45.67.89/assets/js/grsshopper.js"></script>

While I was looking at this I checked the grsshopper.js script. It is supposed to be configured by the installer but that does not always work properly. That was the case here. First, it was an older script. Second, the site information wasn't correctly added.

You can always get a correct up-to-date grsshopper sscript from my website:
http://www.downes.ca/assets/js/grsshopper.js
I downloaded this (you would replace 123.45.67.89 with your own base URL).

Then I reset the values at the top of the script (these are needed to make the 'login' script at the top of the page work properly):
var base_url = "http://123.45.67.89/";
var cgi_url = "http://123.45.67.89/cgi-bin/";
var title_cookie = "
123_45_67_89_person_title";




Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Blogs in Education
    Submission for a forthcoming STRIDE handbook for The Indira Gandhi National Open University (IGNOU). See related handbooks here . What is a ...
  • Learning and Performance Support Systems
    This post is to introduce you to our Learning and Performance Support Systems program, a new $19 million 5-year initiative at the National R...
  • McLuhan - Understanding Media - Summary of Chapters 11-14
    My contribution to the Understanding Media Reading Group Chapter 11 McLuhan writes, in Chapter 11 of Understanding Media, that "The mys...
  • Making Up Facts
    I think I'll stop reading Willingham if he persists in making stuff up. He writes, "Prior knowledge is vital to comprehension beca...
  • Concepts
    On 2013-10-12 9:02 AM, Matthias Melcher wrote: If we consider, on one hand, all the aggregated connection patterns that make up a simple con...
  • On Populist Social Media, Twitter and Egypt
    Source: For the Right to Look Good observations : the members of the various lists you mention are among the smartest and most attentive peo...
  • Review: The Edupunks' Guide, by Anya Kamenetz
    I have now had the chance to read The Edupunks' Guide and can now form some opinions based on what I've seen. And if I were forced ...
  • The Large Industries, and Development
    Responding to David W. Campbell, Big Fish/Small Fish The small point first: could we have a link to Desjardin where he asserts "a caval...
  • When Words Lose Meaning
    In which I explain what I meant by my comment to this post from Doug Johnson. I commented, "If the word is not the thing, how do you e...
  • Where the Future Lies
    Responding to Durff's Blog In a post today I summarized Bill Cushard in Mindflash as follows: If I had to summarize the best advice I c...

Categories

  • #change11
  • Connectivism
  • http://www.blogger.com/img/gl.link.gif
  • Shakespeare

Blog Archive

  • ▼  2013 (68)
    • ►  December (1)
    • ►  November (5)
    • ►  October (6)
    • ▼  September (7)
      • Foradian Technologies Interview
      • Two Comments on 'Open'
      • Notes from ALT-C
      • gRSShopper Setup (2)
      • gRSShopper Setup Log
      • 'Completely Wrong' but Not In Error
      • Moncton's Downtown Debate
    • ►  July (3)
    • ►  June (5)
    • ►  May (6)
    • ►  April (18)
    • ►  March (8)
    • ►  February (2)
    • ►  January (7)
  • ►  2012 (56)
    • ►  December (3)
    • ►  November (7)
    • ►  October (7)
    • ►  September (7)
    • ►  August (2)
    • ►  July (2)
    • ►  June (3)
    • ►  May (1)
    • ►  April (5)
    • ►  March (6)
    • ►  February (6)
    • ►  January (7)
  • ►  2011 (86)
    • ►  December (7)
    • ►  November (11)
    • ►  October (8)
    • ►  September (6)
    • ►  August (1)
    • ►  July (8)
    • ►  June (7)
    • ►  May (10)
    • ►  April (2)
    • ►  March (4)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (108)
    • ►  December (9)
    • ►  November (9)
    • ►  October (12)
    • ►  September (4)
    • ►  August (6)
    • ►  July (10)
    • ►  June (9)
    • ►  May (9)
    • ►  April (9)
    • ►  March (12)
    • ►  February (9)
    • ►  January (10)
  • ►  2009 (85)
    • ►  December (3)
    • ►  October (8)
    • ►  September (7)
    • ►  August (4)
    • ►  July (15)
    • ►  June (5)
    • ►  May (7)
    • ►  April (6)
    • ►  March (17)
    • ►  February (7)
    • ►  January (6)
  • ►  2008 (94)
    • ►  December (5)
    • ►  November (7)
    • ►  October (7)
    • ►  September (6)
    • ►  August (16)
    • ►  July (11)
    • ►  June (6)
    • ►  May (6)
    • ►  April (5)
    • ►  March (4)
    • ►  February (7)
    • ►  January (14)
  • ►  2007 (3)
    • ►  December (3)
Powered by Blogger.

About Me

Unknown
View my complete profile