Announcement

Collapse
No announcement yet.

passing and retreiving a variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • passing and retreiving a variable

    Hi all,

    I want to .../index.php?smallcomment=hellothere
    basically introduce a new variable to a suite of programs valid through a session or until changed within that session,
    take vB as an example,

    I have defined $smallcomment as a global in .../globals.php and pick it up via HTTP_GET_VARS, when $smallcomment comes in via ANY program in the suite for a session I would like the variable and it's value passed transparently from session page to page usable by any template until it is changed when it would be 'stored' again.

    How can this be accomplished without having to 'hack' seriously .. or can this be done via templates alone?

    Regards


    Happy Holydays!

    George

  • #2
    Originally posted by george_proost
    Hi all,

    I want to .../index.php?smallcomment=hellothere
    basically introduce a new variable to a suite of programs valid through a session or until changed within that session,
    take vB as an example,

    I have defined $smallcomment as a global in .../globals.php and pick it up via HTTP_GET_VARS, when $smallcomment comes in via ANY program in the suite for a session I would like the variable and it's value passed transparently from session page to page usable by any template until it is changed when it would be 'stored' again.
    Hrm....I believe you could add a column onto the session table for comment. In admin/sessions.php, add that field name in the list of things it gets for $session (A select query near line 80 in 2.2.9). Then, abuot 10 or 15 lines after, set that field in the update query. That way, you can use $smallcomment anywhere, and change it whenever you like.

    Not sure if it'd work, but it should.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X