User Functions


There are no upcoming events

What's New

Stories last 2 weeks

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

Downloads last 2 weeks

No new files

Welcome to Geeklog Sunday, December 04 2016 @ 05:30 pm EST

Blocks and Arguments

  • Contributed by:
  • Views:
Can blocks accepts arguments? For example, I have a block with elements that can be editted (using a link like $PHP_SELF?amode=edit&app_id=45), yet when clicked, I attempt to read $amode or $app_id and they are shown as empty. Is there something that I\'m not doing right?

The following comments are owned by whomever posted them. This site is not responsible for what they say.

  • Blocks and Arguments
  • Authored by:Dirk on Thursday, July 11 2002 @ 12:18 am EDT
No, they can\'t.

Actually, I don\'t quite see the point of it. Blocks are called by Geeklog without any arguments anyway, so why do you want to add some?

Maybe you can give an exmaple of what you\'re trying to accomplish?

bye, Dirk
  • is this what you mean?
  • Authored by:Anonymous on Thursday, July 11 2002 @ 05:25 am EDT
Not sure if this will help but, I have a block that has a form on it that when submitted will change display.

For example:

function phpblock_downloads () {


$sortby = $HTTP_POST_VARS[\'sortby\'];

$path = $_CONF[\'path_html\'] . \"pafiledb3/includes\";
include_once($path . \"/display_dls.php\");
$display = getdls($sortby);
return $display;


The include file display_dls.php does all the work.
  • Blocks and Arguments
  • Authored by:krove on Thursday, July 11 2002 @ 09:14 am EDT
Actually, after some thought, I figured that I had forgotten to declare the global variables I was using (i.e. GLOBAL $amode, $app_id, etc).

I made a block that allows someone on our Intranet to enter information pertaining to certain applications our customers send us (i.e. credit apps and new account applications). The block is very similar to the ShoutBox, but I needed to be able to edit and delete, so an image of a small pencil next to each app (with a short blurb) is provided. Click and the arguments are sent and only that app is presented in the block and in the proper form fields for either editting or deletion.

The block provides too little information (we really don\'t need anything more than the customer name, app type, app status and a short note) to qualify for me putting in the time to create a plugin.

My plug-in efforts have stalled on other fronts due to the rather complex setup (writing of admin side and public side), etc. The block works great in this manner, and because the block uses $PHP_SELF to define the edit link, a user can be on just about any page to edit an entry.

My next step will be to auto-archive entries that have reached an end-stage status of rejected or approved after about a week or two to another table.

Pretty sweet!
  • Blocks and Arguments
  • Authored by:krove on Thursday, July 11 2002 @ 02:49 pm EDT
In fact, take a look at this image: Acc/Credit App Block! Works great now!
  • looks good
  • Authored by:squatty on Friday, July 12 2002 @ 11:00 am EDT
I\'d love to see the code :-)
  • looks good
  • Authored by:krove on Friday, July 12 2002 @ 03:44 pm EDT
I\'ll be cleaning it up with some comments, and then I\'ll package it up. Since this is at work, I\'m pretty busy, so I\'ll probably get to that on Monday... {8^)