EXT_POPUP

Open a extern link in a new pop up window who is e.g. 800px wide and 600px high.

Tag: [EXT_POPUP:link, width, height]link_text[/EXT_POPUP]

E.g. [EXT_POPUP:http://example.com, 800, 600]link_text[/EXT_POPUP]

Forum: [EXT_POPUP:link, width, height]link_text[/EXT_POPUP]

Filename: rt_ext_popup.php

Folder: /template/inc_script/frontend_render/

Condition:

  • $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)

Update KH 07.05.2010: Suppressed link execution <a href=”…..”




Location: /template/inc_script/frontend_render/rt_ext_popup.php

[EXT_POPUP:link, width, height]link_text[/EXT_POPUP]

<?php
/******************************************************************************
REPTAG CODE: [EXT_POPUP:link, width, height]link_text[/EXT_POPUP]
E.g. [EXT_POPUP:http://example.com, 800, 600]link_text[/EXT_POPUP]
 
Developer: k.Heermann (flip-flop) http://planmatrix.de
phpWCMS Version: >= 1.3.3
 
modified: 01.11.2008
last modified:  KH 07.05.2010: Suppressed link execution <a href="....."
 
Description:
Open a extern link in a new pop up window who is e.g. 800px wide and 600px high.
 
From: http://www.phpwcms.de/forum/
-------------------------------------------------------------------------------
 
Installation:
   Put the code in frontend_render (for example in a file called rt_ext_popup.php)
   Enable in /config/phpwcms/conf.inc.php:
   $phpwcms['allow_ext_render']  = 1;
 
Mod version: none
 
Support:
http://forum.phpwcms.org/viewtopic.php?p=110785#p110785
*******************************************************************************/
 
// ------------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ------------------------------------------------------------------
 
if( ! (strpos($content["all"],'[EXT_POPUP:')===false)) {
 
// inject the js function into head (since 1.3.3 ================
// If you are using an earlier version, please comment or kill this lines
// and put the JS function into your template head section.
// <script type="text/javas .............. //--> </script>
 
$GLOBALS['block']['custom_htmlhead']['OpenWindow'] = '  <script type="text/javascript" language="javascript">
 
<!--
  function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
//-->
</script>';
 
// END inject the js function into head =================
 
/* A little help ************
custom_link         = $1;
custom_win_width    = $2;
custom_win_height   = $3;
custom_link_text    = $4;
*****************************/
 
// Search parameter *********
$my_search      = '/\[EXT_POPUP:(.*?),(.*?),(.*?)\](.*?)\[\/EXT_POPUP\]/s';
 
// The replace parameter ****
$my_replace      = '<a href="#" onClick="return MM_openBrWindow(\'$1\',\'New_window\',\'scrollbars=yes,resizable=yes,width=$2,height=$3\')">$4</a>';
 
// And do it ======
$content["all"] = preg_replace($my_search, $my_replace, $content["all"]);
 
}
// END Only if [EXT_POPUP: exists ====================================
 
?>
english/phpwcms_replacer_rts/frontend_render/ext_popup.txt · Last modified: 2018/06/03 18:09 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0