Jump to:

22976 Posts in 11493 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » external module only in CMS

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 714 Views
  • Labrar
    Avatar
    Community Member
    4 Posts

    external module only in CMS Link to this post

    Hi everybody.

    I have a php file with a custom form which uses external dbase. I also use Silverstripe for the page content. But i dont want to have two differnet cms so i would like to know if its possible to include my external cms Modul into silverstripe. It dont have to be puplished so i also do not need a preview because the module only handle some internal Data like Memberstats, Onlinetime of members and so on .

    I had modified the LeftAnsMain.php so that i got a new Button in the top now. But if i click on it, my ext. module dont appears right below the menue. Instead the browser changes completely to my external mod.

    This is how i did it into function MainMenu right below "Help"

    _t('LeftAndMain.Membstat',"Membstat",PR_HIGH,'Menu title') => array("Membstat", "mysite/Membstat/Membstat_face/news_face.php")

    May anyone help me?

    Thankyou

    Yours Sonja

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: external module only in CMS Link to this post

    What you have done there is effectively linked to your script, not added it into the Silverstripe administration. You might want to take a look at how to create a module for silverstripe in the wiki

  • Labrar
    Avatar
    Community Member
    4 Posts

    Re: external module only in CMS Link to this post

    Yes.
    But that means that i have to rebuild my module with the tools of Silverstripe.
    And that is silly for me because my module ist still finished and also work as Standalone.
    Is it not possible to require a page into the design instead of the two css boxes?

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: external module only in CMS Link to this post

    I didn't really look too deep into the module creation, but you should be able to create a barebones module page, and bring in your module in the "MyAdmin_right.ss" template. If nothing else, you could use an iframe in the right template...

  • Labrar
    Avatar
    Community Member
    4 Posts

    Re: external module only in CMS Link to this post

    iframe sounds good. Do you know some links explaining?
    I found out that it is pretty hard to find the right php file to edit.

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: external module only in CMS Link to this post

    You will still need to create a module, but like i said, just make a barebones module. This way, it adds the extra button to the admin menu without manually modifying the LeftAndMain (so you can easily add it to future silverstripe websites you make), and does any other magic that silvestripe requires behind the scenes. Add the iframe to the X_right.ss template you create as per that link I posted before.

    I'm fairly new to silverstripe, so some of the vets might have a better solution for you.

    714 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.