- Moderated by:
- Support
-
- rank:
-
Freshman
- registered:
- September 2007
- Status:
- offline
- last visit:
- 08.11.08
- Posts:
- 20
I need a block for my external bannerscript that is able to include this small PHP snipped.
The variable is necessary to set the output value.
Code
<?
$ANZEIGE = "1";
include('/www/htdocs/.../anzeige.php');
?>
Copying this into a .php file and call it using the external file block doesn't work. -
- rank:
-
Professional
- registered:
- September 2002
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 879
Take the pnRender Block and include that code there. The PHP block was removed due to insolveable security issues.
--
best regards from Kiel, sailing city
Steffen Voss
Member of the PostNuke Steering Committee
Read The Zikulan's Blog -
- rank:
-
Freshman
- registered:
- September 2007
- Status:
- offline
- last visit:
- 08.11.08
- Posts:
- 20
The block doesn't give me space to include. It only let me includ parameters but I don't know how that should be filled as there's no info in the pnRender module iteself on how to work with the block.
Code
Modulname:
Template-Datei:
(die Template-Datei muss im /pntemplates Verzeichnis des Moduls sein)
Parameter (Format: assign=value;assign2=value2...): -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 02.12.08
- Posts:
- 13418
The best way to deal with this is to create a very simple block yourself which contains your banner code - use the blocks in system/Blocks/pnblocks as a basis
--
Regards,
Simon
itbegins.co.uk - Zikula Consulting
Please read the Support Guide -
- rank:
-
Freshman
- registered:
- September 2007
- Status:
- offline
- last visit:
- 08.11.08
- Posts:
- 20
Ok, I modyfied the HTMLblock to
Code
<?php
function Blocks_phpblock_init()
{
// Security
pnSecAddSchema('PHPblock::', 'Block title::');
}
function Blocks_phpblock_info()
{
return array('text_type' => 'PHP',
'module' => 'Blocks',
'text_type_long' => 'PHP',
'allow_multiple' => true,
'form_content' => true,
'form_refresh' => false,
'show_preview' => true);
}
function Blocks_phpblock_display($blockinfo)
{
if (!SecurityUtil::checkPermission('PHPblock::', "$blockinfo[title]::", ACCESS_OVERVIEW)) {
return;
}
$ANZEIGE = "1";
include('/www/htdocs/techno/tb2008/bannerdealer/anzeige.php');
}
what gives me correct output on the right side (the 2 banners under each other) at http://www.technobilder.de/tb2008
... but now the Blockheader is missing
-
- rank:
-
Freshman
- registered:
- July 2004
- Status:
- offline
- last visit:
- 26.03.08
- Posts:
- 22
Same problem here. I tried
Code
<?php
include('/home/www/web699/html/cdxroster/index.php?sortcol1=Owner&sortdir1=asc&sortcol2=Guild%20Rank&sortdir2=asc');
?>
inside the HTML block but its just not showing anything. So how do I get this content shown up inside my page?
I tried to make an additional block as well:
Code
<?php
$blocks_modules['guild_rosterblock'] = array (
'func_display' => 'blocks_rosterblock_display',
'func_add' => 'blocks_rosterblock_add',
'func_update' => 'blocks_rosterblock_update',
'func_edit' => 'blocks_rosterblock_edit',
'text_type' => 'guild_rosterblock',
'text_type_long' => 'VG Roster',
'allow_multiple' => true,
'form_content' => false,
'form_refresh' => false,
'show_preview' => true
);
function Blocks_rosterblock_init()
{
// Security
pnSecAddSchema('rosterblock::', 'Block title::');
}
function Blocks_phpblock_info()
{
return array('text_type' => 'PHP',
'module' => 'Blocks',
'text_type_long' => 'PHP',
'allow_multiple' => true,
'form_content' => true,
'form_refresh' => false,
'show_preview' => true);
}
function Blocks_rosterblock_display($blockinfo)
{
if (!SecurityUtil::checkPermission('rosterblock::', "$blockinfo[title]::", ACCESS_OVERVIEW)) {
return;
}
include('/home/www/web699/html/cdxroster/index.php?sortcol1=Owner&sortdir1=asc&sortcol2=Guild%20Rank&sortdir2=asc');
}
But there is just an empty block in this case.
And using finclude-block doesn't work too, it writes the include line down instead of showing the content.
edited by: Horian, Mar 26, 2008 - 09:30 PM
