I have been looking around the site, but havent seen any documentation on how to make a standalone block. Also if i was wanting to make a simple one that just had a PHP script in it, how would i go about that. Sometimes the script is just a little to complex to be posted in a form for the PHP blocks.
EDIT: Im talking about a standalone block. Not one that is associated with any module.
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
Block Dev HOWTO?
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
There is no HOW TO at all on block development? The sad thing is that I know how to make a basic module too, but never attempted to make a block.
All I want to do is put PHP in the block. So basically when I would add the block, it woudl really have no config area at all. It would just be activated. As the logic would all be hardcoded into it. -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1193
Yeah, I've been a module developer for awhile and recently had to write a block. I was disappointed that there was no doc that I could find. Furthermore, the core PN blocks in CVS are *NOT* API-compliant, which is especially troublesome because it's clear that the dev team doesn't really understand blocks either.
I have written blocks for the statistics and RSSdisplay modules that I believe are pnAPI compliant. (They're available on http://www.mtrad.com.) You can use them as examples. If you put the block into the includes/blocks directory, you have to use a different function naming convention than when they're in modules. But other than that, it's pretty much the same.
If you have questions, drop me an email to crsATmtradDOTcom and I'll see what I can do to help. -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
is there still no documentation on this? -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 98
I have written a couple for the projects I am working on the first.php in the example does a pretty decent job at showing how to do it. the Example first.php is API compliant and uses Smarty templating. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 395
Merxion
I have written a couple for the projects I am working on the first.php in the example does a pretty decent job at showing how to do it. the Example first.php is API compliant and uses Smarty templating.
i think module blocks run different from stand-alone -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 98
Oh never saw a standalone block API compliant that is hehe.
If I had to do one i'd probably build a blank module with whatever user apis necessary in pnuserapi and put the block in the pnblock directory. Wouldn't you want to do this anyway to keep its code seperate from base code? -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 26, 2009
- Posts: 4
We can do this for you ..
Ask us for the quote
http://netpowersoft.com
http://tradealoan.com
http://netwallpapers.com -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2330
netpowersoft, instead of copy/pasting adverts on the forum, please offer your services at PostNukePro.com.
Let's work together to keep forum posts informative in nature and not spammy! ;)
Thanks,
Alar -
- Rank: Softmore
- Registered: May 01, 2003
- Last visit: Apr 09, 2010
- Posts: 470
Has anyone found any documentation as to how to make a standalone block?
--
WIRE SERVICE
Free Press Releases -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 191
I don't think there is a such thing as a pnAPI compliant standalone block is there? From what I've seen, you need to put the block in a module, even if all you are building is the block. You don't have to have a user or admin interface for it. I think the PN-Teamspeak module is like this. It's just a block, but it installs like a module. -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
hmm, what about for .8 (i know this is late in the game), but /includes/blocks/core/ for core blocks and /includes/blocks/custom or somethign like that for third party blocks. The more seperate third party anything can be, the better IMHO. -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
In .8, the core blocks are now located in /system/blocks/pnblocks Which pretty much reenforces what Jbirchett said, create a module with API functions only.
--
Home Page | Find on Facebook | Follow on Twitter
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
