Page 1 of 1

Non Standard Custom Blocks

Posted: 3. December 2011 16:39
by Teksonic
Hey guys

I have an issue with the new portal version. Basically I have some phpbb mods (some are only blocks, some use a block to display info on the front page) the thing is they are designed to be used on any portal or anywhere people want to place them on their sites. The new version of the portal has a great block manipulation section in it. The issue I have is that I don't want to have two different version of mods, one designed to work with just board3 and one for everyone else. So is there anyway that we can get a section added that will allow us to hook other blocks into the portal without using the "upload zip" functionality, and still allow them to be moved around through the portal ACP.

I've started to work on something myself already as I've had some of my users wonder what direction we would be taking in regards to portal v2. Any thoughts or ideas would be great.

Thanks

Re: Non Standard Custom Blocks

Posted: 3. December 2011 20:43
by Teksonic
So I have been able to add new blocks into the ACP, modified the 'EDIT' to search and find the module the new block uses. now I'm just in the process of figuring out the templating portion of it, which is giving me issues.

Re: Non Standard Custom Blocks

Posted: 4. December 2011 13:28
by Marc
What kind of issues do you have with the templates?

The problem with older "blocks" is that they usually just run their PHP code and then you would include a HTML file in your portal.

If you want to able to move blocks in the ACP you have to be able to move the HTML. If you want to disable it you have to able to prevent the php code from executing or you will have more queries to your database and your portal will need more resources than it needs.
With the new portal module system, you basically just need to create a new module file for your block.
If I get it right, you implemented a different way by selecting the php file that needs to be executed in the ACP and then including it in the custom block module file?
If yes, then you will just need to add another select or input field in which you choose the template file that needs to be included. Then just return the filename of the template file in the custom block module and you should be able to see your block on your portal.

Re: Non Standard Custom Blocks

Posted: 4. December 2011 15:07
by Teksonic
That is what I have done. Created a file portal/modules/portal_test.php that includes the

Code: Select all

$name $columns $image_src & get_template_side
(and a few other things of course) now i just need to make it see the template info but the html files aren't located in the portal/modules template folder. so everything i've done so far has tried to prefix the location with portals/modules/.

Re: Non Standard Custom Blocks

Posted: 4. January 2012 20:44
by eqsanctum
Waiting eagerly to see how this plays out. I had already started and installation and was hoping to include some things of the past but can't hopefully you get it worked out :D

Re: Non Standard Custom Blocks

Posted: 24. April 2012 20:06
by eqsanctum
So it's been 4 months. Any change to all this Tek?

Re: Non Standard Custom Blocks

Posted: 25. April 2012 19:50
by talonos
Teksonic hasn't been online for quite a while now. he's in the armed forces so could be posted at the moment.