Welcome to Geeklog, Anonymous Wednesday, February 05 2025 @ 01:57 pm EST

Geeklog Forums

phpblock_whatever function argument


Status: offline

mst3kroqs

Forum User
Regular Poster
Registered: 10/18/05
Posts: 78
Location:Cary, NC USA
May I not pass an argument value via the Block Manager to a phpblock_function that I have created in lib-custom.php? eg. in the Block Function field, I would like to specify: phpblock_toplinksbycat( 'linkcategoryname' )

The dispatching code seems to interpret the entire thing to be a function name, eg. by calling 'phpblock_toplinksbycat( 'categoryname')();

Note that this would allow me (and others) to avoid having to create multiple very-similar functions and remembering what the heck we named them ...

Or am I just being thick here ...
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
You can't pass in an argument and that may be a nice enhancement to add in a future release. You certainly have access to any URL or Post variable but thats not quite what you want. One suggestion is to pickup the block title and maybe base your common function on that info.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

All times are EST. The time is now 01:57 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content