Hello, me again lol... may we should change this to category to "Support for Lobos" LOL
OK I what do you have to do to make a block show up in the block admin? I have copied an exisitng block from another module and put it in the pnblocks folder of my module and what ever I do the damn thing does not show up in the drop down list for blocks admin....
here is the code of the file I have called latest.php which is in the pnblocks folder...
now I have taken this code from the quotes module and have not changed much more than the function names, but the damn thing should show up in the blocks admin, shouldn't it?
Thanks and regards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment
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
put the block in pnblocks, right?
-
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
-
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Thanks, but nope still no go... I tell ya this process seems to me unduly complicated, what the freakin hell is stopping the block showing up like it would in any other module? ... I am thinking just to add the block into the includes folder and be done with it LOL
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2204
..something should be showing up in your servers error log.. might want to add error displays for those queries as well.. they'll help you to debug the probs.. it's not easy, but error logging is your friend :) ..takes a lot of error out of "trial and error"..
-IR -
- Rank: Team Member
- Registered: Jan 02, 2003
- Last visit: Oct 21, 2009
- Posts: 800
If the function name is bookmarker_bmblock_display() the file name should be bm.php IMHO.
--
"He is not dangerous, he just wants to play...." -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Landseer
If the function name is bookmarker_bmblock_display() the file name should be bm.php IMHO.
Thank you :) This is the solution and I am a happy man - amazing how such little things can make your day....
Thanks for your time as well IR :)
REgards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Actually if this is the case it must mean that the function names are dynamic - so it is possible to have dynamic function names?, like this?
$bookmarker_bmblock_display()
well that doesn't seem right, but is it possible to assign variables to function names?
Regards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2204
haha.. that will just have to be one of the many posts I look back on and wonder "wtf was I thinking?" ..
..thanks for the correction Frank.. & i'm glad it worked out for you Lobos
..got work to do.. see ya! -
- Rank: Team Member
- Registered: Jan 02, 2003
- Last visit: Oct 21, 2009
- Posts: 800
Lobos
Actually if this is the case it must mean that the function names are dynamic - so it is possible to have dynamic function names?
Not sure if I understand you right, but you can name the functions in a block as you want as long as you declare them correctly:
Code
/**
* info
*
*/
function pnForum_centerblock_info()
{
return array( 'func_display' => 'pnForum_centerblock_display',
'text_type' => 'pnForum_centerblock',
'text_type_long' => 'pnForum Centerblock',
'allow_multiple' => true,
'form_content' => false,
'form_refresh' => false,
'show_preview' => true);
}
This is an except from the center.php block of pnForum 2.0.0. If you rename the display function to bookmarker_bmblock_showmeallthestuffwehave() you have to adjust the array too.
Generally the blocks functions are build like
<modulename>_<blockname>block_<functionname>
Frank
--
"He is not dangerous, he just wants to play...."</functionname></blockname></modulename> -
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2204
..i suppose a function name could be made dynamic by calling an API function, but it wouldn't change the content without conditionals (if/else)..etc. not sure what the implications might be or even how useful it would be.. but i suppose it's possible anyway.
-IR
PS: completely missed that question.. hahaha.. sometimes it's necessary to cover one eye to stop the room from spinning.
- Moderated by:
- Support
