Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adding Modules to Mobile Theme

phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
edited November 2012 in Vanilla 2.0 - 2.8

Hi everybody,

I've gone through several postings and the documentation here, but i wasn't able to integrate modules that are usually in the panel into the mobile version. Plugins like WhosOnline and other doesn't seem to work, while others that are loaded into the MessageBody appear, just by adding MobileFriendly.

1.)
First i tried to insert the Panel like this {asset name="Panel"} - Didn't work, also that's not what i want to achieve.
Then i added modules in DIV-Containers like this.

<?php $Sender->AddModule('WhosOnline'); ?>

or

<?php $this->AddModule('WhosOnline'); ?>

I also made the WhosOnline Module "mobileFriendly", but it doesn't appear.

2.) I'd like to add the Activity Wall to my mobile theme. But i couldn't find a way in the documentation. How did you do it?

Can someone hint me to a solution regarding this two?

Thanx
phreak

  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, instead of making the mobile theme mobile unfriendly , why don't you put a link to the full site on the mobile theme, and a link back to the mobile version from the full site.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @vrijvlinder: Great, since 2006 on the board and people tent to answer me questions like this.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2012

    @phreak Ok if you want to put a panel in the mobile then you need to alter the default.master.tpl and add {asset name="Panel"} (plus all the links that go with it just like in the "Head")where you want it to appear.

    {asset name='Head'}
        •   {discussions_link} {profile_link} {inbox_link} {custom_menu} {event name="BeforeSignInLink"} {if !$User.SignedIn}
        •   {link path="signin" class="SignIn"}
        •   {/if}
    {asset name="Content"}
    {nomobile_link wrap="span"} {dashboard_link wrap="span"} {signinout_link wrap="span"}
    Powered by Vanilla
    {asset name="Foot"}
    {event name="AfterBody"}
    

    @phreak said:

    vrijvlinder: Great, since 2006 on the board and people tent to answer me questions like this.

  • x00x00 MVP
    edited November 2012

    like vrijvlinder says, modules have to be added somewhere, usually an asset.

    so you insert the asset, in you theme. You may call the module in a theme hook, or directly before the asset. Don't assume that it will automatically loaded.

    {module name="WhosOnline"}
    {asset name="Panel"}
    

    or

    public function Base_Render_Before($Sender){
          if(IsMobile()) $Sender->AddModule('WhosOnline','MyAsset');
    }
    

    ...

    {asset name="MyAsset"}
    

    phreak you would do well to listen to vrijvlinder instead of being defensive, it is irrelevant how long you have been here, that was good advice. Take or leave.

    Mobile has a limited mount of space, usually the best strategy is use the full width in a fluid fashion.

    So if you want to have some of the same assets, you need to implement them in that way.

    grep is your friend.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited November 2012

    @vrijvlinder and @x00: Thank you guys, that is what i was looking for to start experimenting. I just didn't know that modules need to be called extra.

    And sorry, for the behaviour but i'm around the web and OS-scene for about 12 years, run more than 15 websites myself and made uncountable for clients, also mobile-sites. Sometimes i just want my question answered and not be treated as a noob. :-) Is like coming to a mac store and be treated as a hipster, than a guy who started painting with a G3. ;)

    Thanx for the advice.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    no problem, we are all noobs , until we learn , then we pass it on , but still noobs lol and that is ok coz if you know everything there is not much left to live for !! :)

Sign In or Register to comment.