- You are here:
- Main › Forum › Suggestions and Proposals
[cBB Blockgets 1.0.3] Personal block (empty_block.php ?)
7 posts
• Page 1 of 1
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Mon Nov 26, 2012 2:49 pm • via Web
Hello,
Is it possible to let us the possibility to add a template file within the Personal block (empty_block ?) ?
I mean, it could be so great to put something like :
We could obtain something similar with frame_block but it's a little more difficult.
Thanks
Is it possible to let us the possibility to add a template file within the Personal block (empty_block ?) ?
I mean, it could be so great to put something like :
- Code: Select all
<!-- INCLUDE my_custom_template_file.html -->
We could obtain something similar with frame_block but it's a little more difficult.
Thanks
- IvanPF
- Administrator
- Posts: 2028
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Mon Nov 26, 2012 4:08 pm • via Android
This is not possible with empty block. The include param cant include in php files.
you can create your custom block.
Exists a guide to make custom blocks but it is in spanish. blog/?p=1&lang=es
you can create your custom block.
Exists a guide to make custom blocks but it is in spanish. blog/?p=1&lang=es
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Mon Nov 26, 2012 8:37 pm • via Web
Admin wrote:Exists a guide to make custom blocks but it is in spanish. blog/?p=1&lang=es
Oh, I would love to create my block but my PHP skills are so so so bad...
- IvanPF
- Administrator
- Posts: 2028
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Tue Nov 27, 2012 10:15 pm • via Web
Mathieu M. wrote:Admin wrote:Exists a guide to make custom blocks but it is in spanish. blog/?p=1&lang=es
Oh, I would love to create my block but my PHP skills are so so so bad...
Is easy. An example, changing "empty_block" to "myempty_addon"
1. Copy blockgets/block/empty_block.php to blockgets/block/myempty_addon.php
2. Open myempty_addon.php and find:
- Code: Select all
class empty_block
3. Replace with
- Code: Select all
class myempty_addon
4. Find:
- Code: Select all
$this->tpl_name = 'empty_block';
5. Replace with:
- Code: Select all
$this->tpl_name = 'myempty_addon';
6. Copy styles/{your style}/template/blockgets/block/empty_block.html to styles/{your style}/template/blockgets/block/myempty_addon.html and include in it the "INCLUDE" tag you want.
7. Install the new block as a normal block
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Wed Nov 28, 2012 1:27 pm • via Web
Wow, it works fine except for one thing... If I don't write something in the content field of the block (from the ACP), the block doesn't appear.
It's not a problem since I can hide what I don't want to show (with a CSS class for example), but perhaps you would like to know it
Thanks !
It's not a problem since I can hide what I don't want to show (with a CSS class for example), but perhaps you would like to know it
Thanks !
- IvanPF
- Administrator
- Posts: 2028
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Wed Nov 28, 2012 1:55 pm • via Android
In the block, find and delete
- Code: Select all
if(!$this->content)
{
return false;
}
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Wed Nov 28, 2012 2:06 pm • via Web
It works perfect now
I didn't know that it was so "simple" to duplicate an existing block !
I didn't know that it was so "simple" to duplicate an existing block !
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests
- External Links
- phpBB Official
- phpBB Official (Spanish)
- Raul Arroyo Monzo
- PasionReef
- About CaniDev
- Terms of use
- Privacy Policy
- About Us
- Contact
- © 2011-2024 CaniDev