https://www.icyphoenix.com/viewtopic.php?f=35&t=7861 ----------------------------------- My_PeSePe Mon 30 May, 2011 10:06 Iframe For External Links ----------------------------------- Well, I found this code and let me know if you can adapt for us to use in Icy. The code included 3 images that are the image will come out of our control. [code linenumbers=false]session_begin(); $auth->acl($user->data); $user->setup(); $config_link = array( 'style' => 'prosilver', 'height' => 80, // 'style' => 'subsilver', // 'height' => 100, 'page_title' => 'Enlace Externo - ' . $config['sitename'], 'noframes' => 'Su navegador no permite frames. No se puede navegar por la demo
Haga clic aqui para cargar phpBB3', 'text_to_display' => 'Estas en una pagina externa a Nombre de tu website
Puedes volver al foro o cerrar el marco dejando solo la web externa.', 'back_to_board' => 'Volver al Foro', 'close_frame' => 'Cerrar marco', ); // Send a proper content-language to the output $user_lang = $user->lang['USER_LANG']; if (strpos($user_lang, '-x-') !== false) { $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-')); } // Determine board url - we may need it later $board_url = generate_board_url() . '/'; $web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path; $site_logo_img = $user->img('site_logo'); $t_stylesheet_link = (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], true, $user->session_id); $s_content_direction = $user->lang['DIRECTION']; $u_index = append_sid("{$phpbb_root_path}index.$phpEx"); $this_file = $phpbb_root_path . $user->page['page_name']; $this_top = $this_file . '?panel=top'; $this_bottom = $this_file . '?panel=bottom'; $url = str_replace(array('ira=', 'panel=top&', 'panel=bottom&'), '', $_SERVER['QUERY_STRING']); $html = ''; $panel = request_var('panel', ''); switch ($panel) { default : $html = ' ' . $config_link['page_title'] . ' <body>' . $config_link['noframes'] . '</body> '; display($html); break; case 'top': switch ($config_link['style']) { default : case 'prosilver': $html = ' ' . $config_link['page_title'] . '
Volver al Index de Foros;
' . $config_link['text_to_display'] . '
' . $config_link['back_to_board'] . '  ' . $config_link['close_frame'] . '
' . $config_link['Copyright'] . '
'; break; case 'subsilver': $html = ' ' . $config_link['page_title'] . '
' . $site_logo_img . '
' . $config_link['text_to_display'] . '


' . $config_link['back_to_board'] . '  ' . $config_link['close_frame'] . ' 		 
'; break; } display($html); break; case 'bottom': header("Location: " . $url); break; } function display($html = '') { // application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8'); header('Cache-Control: private, no-cache="set-cookie"'); header('Expires: 0'); header('Pragma: no-cache'); echo $html; garbage_collection(); exit_handler(); } ?>[/code] Try calling it from the constants.php with the following line: [code linenumbers=false]define('EXTERNAL_LINK_PREFIX', 'http://www.tuwebsite.com/enlace.php?ira='); // Example: 'http://anonym.to?'[/code] ----------------------------------- Mighty Gorgon Sat 04 Jun, 2011 11:51 Re: Iframe For External Links ----------------------------------- Sorry but I don't get the purpose on doing something like this. Do you have a demo screenshot? In theory you should create a CMS Block for something like this, or just create a special TPL file (you can use PHP in Icy Phoenix TPL files). What's your main goal? ----------------------------------- mort Sat 04 Jun, 2011 12:23 Re: Iframe For External Links ----------------------------------- I would think that any script that is case-specific for various templates, would be a nightmare to implement and would probably prove to be pretty useless in the long run? case 'prosilver': Blah! case 'subsilver': Blah! :( ----------------------------------- stefen Mon 06 Jun, 2011 14:14 Re: Iframe For External Links ----------------------------------- I second you ----------------------------------- Informpro Mon 06 Jun, 2011 14:17 Re: Iframe For External Links ----------------------------------- Icy Phoenix deals with templates this : if your template is subsilver, and if you use $template->pparse(), it'll first look in subsilver's directory then in default's directory. So, then HTML that'll be parsed will depend on the enabled template. Isn't that what your need, and the default behavior ? ----------------------------------- mort Mon 06 Jun, 2011 23:49 Re: Iframe For External Links ----------------------------------- The point I was making is that the different IP styles use different layouts and that the iframe script would no doubt need to be modified each time there is a different "User-Created" theme on offer that someone wants to use with this MOD. IF anyone converts this MOD then they would have to support changing it for every other template that comes along - And imho that's where the whole thing starts to fall apart. ;) ----------------------------------- spydie Tue 07 Jun, 2011 00:26 Re: Iframe For External Links ----------------------------------- hm IMHO the iframe could adapt itself to the center block width and height automaticly, or you just create a new page, with the frame included and just the overall_header and footer. Or you use a highslide/ or shadowbox to open the frame in front of the template, since the script got a close button/link that should´nt break anything in any template well investiganting a bit. i would opt for the shadowbox solution on this one. example : http://menudivertido.blogspot.com/2008/01/shadowbox.html click on the iframe link in that page to see what i mean ----------------------------------- Informpro Tue 07 Jun, 2011 14:45 Re: Iframe For External Links ----------------------------------- If you need to modify common templates parts as JS and CSS, you just have to modify $template->css_includes and $template->js_includes (or include, can't remember :p).