Hi!
I'm trying to write a module, that would combine functionality of two other modules. One of them is core/menu ("General menu"). The problem is that text that I enter to input fields (name of link, and its value) is not passed to function that updates block content in database. Normally this text is passed in form of arrays (link_name and link_url if I remember correctly) in $row array. But in this case these values are not passed (although others are). What is the mechanism of passing these values from input fields? Where shold I look for error?
Apache 2.0.50, PHP 5.0.0, MySQL 4.0.20d, ActivePerl 5.8.0.810 and PN .750
TIA
Chris
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Variables passed to block functions (usually $row)
-
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
print_r() - a very useful function :D
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
I gained some very interesting results print_r()'ing the adobDB result object - learned a few things.
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 06, 2005
- Posts: 3
First of all, I'm sorry for calling a block module in my first post in this thread. But I guess that given the name of this forum you got it right.
print_r... Well, that was the first thing that I tried. How else would I know what exactly is inside $row? So I know that in my block there are no variables linkname and linkurl in $row table in update function, but they are in original core/menu update function. Generally all values from input fields are assigned to variables with pnVarCleanFromInput. But core/menu first checks $row['linkname'] with isset. And my question is: how are these values passed to update function, because function, that allows editing block content returns only HTML $output? I've also noticed that in my function "weight" parameter is set to 1, and in original to 2. What is that parameter?
Could it be that my problem is somehow related to security?
Or maybe - is it possible that creating $output in edit function with "new pnHTML();" then converting to HTML with "$output = $output->GetOutput();" and then adding additional outuput with ".=" gives me the trouble?
TIA
- Moderated by:
- Support
