Author Topic: Help in customize a new tab on feng office.  (Read 2876 times)

flaviove

  • Freshman
  • *
  • Posts: 24
    • View Profile
    • Email
Help in customize a new tab on feng office.
« on: January 21, 2013, 10:51:41 am »
Hi All

Using a great help that we have on  "Feng Office Plugin Tutorial: Hello World" I was able to get a funcional new tab. My question is:
What should I do in order to press this tab and go direct to open a new web address page?

Any help will be great.
Thanx in advance,
Flávio

asdfghj

  • Freshman
  • *
  • Posts: 16
    • View Profile
Re: Help in customize a new tab on feng office.
« Reply #1 on: January 22, 2013, 01:43:17 am »
are you talking about a new page within feng office in the new tab, or do you want to open a new window with the new web page?

if you want it integrated into feng, you should be able to setup an iframe in that new tab to point where you want..

i havnt played around with version 2 that much, but it was possible in version 1.7.5.

flaviove

  • Freshman
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Help in customize a new tab on feng office.
« Reply #2 on: January 23, 2013, 12:04:41 pm »
Hi Asdfghj,

I just need to open a new window with the new web page.
Thanx,

Flávio

asdfghj

  • Freshman
  • *
  • Posts: 16
    • View Profile
Re: Help in customize a new tab on feng office.
« Reply #3 on: January 28, 2013, 04:30:26 pm »
http :// www fengoffice com/web/wiki/doku.php/plugins_documentation

i cant post links, so that should get you there

here is the new documentation for the tabs/new plugins.

is looks like if you modify the:

Code: [Select]
"default_action"            => "say_hello" ,       //default action(method) called when tab is selected or context changes - used to list objects, etc.
by changing the "say_hello" to "open_new_window"

then you can continue the documentation and find/create this:

Code: [Select]
   <?php class HelloworldController extends ApplicationController {                
            var 
$plugin_name "helloworld"//name of the plugin
     
            
function __construct() {
                    
parent::__construct();
                    
prepare_company_website_controller($this'website');              
            }
     
            function 
say_hello() {
                    
$txt "Hello World ! ! ! ! ";
                    
tpl_assign('message',$txt);
            }
    }
?>

you should be able to change the "function say_hello()" to "function open_new_window()" and have it open whatever url you want in a new window.. i dont know the syntax offhand, but that should get you going..

search google for php function to open url in new window or something should finnish up that function for you