ossipetz Posted June 4, 2017 Posted June 4, 2017 Hallo I've created an application that contains only one widget to show the online users on a rocket.chat server. This does work locally but after I downloaded the application from the adminCP und installed it on the live board the blocks don't show up Working locally in DEV Mode the new Widget shows in the content blocks and adding the widget also works nicely. The installation in the live board using the .tar file downloaded from the local setup worked fine, no errors shown or found (yet). I also cleared the caches in the support section of the adminCP. Also tried the default theme and language - just to be safe. But no luck. The new block does not appear. I can see the new template and the new translation keys. So it seemed to work at least partially. Is there a way to figure out why its not shown? Any hints would be great! Update: can't figure out what is wrong or missing If anyone has a Rocket.Chat server and wants to give it a try (no warranties given, maybe on the test-forum first ) here is the current version: tfrocketchat-1.0.4.tar (simply add the widget, hit edit to set the url and username / password for the rest api user).
newbie LAC Posted June 5, 2017 Posted June 5, 2017 Hello, You have an error in widget template variables $members=array(), $memberCount=0, $chatVersion= Look at $chatVersion= You should set up default value
ossipetz Posted June 5, 2017 Author Posted June 5, 2017 3 hours ago, newbie LAC said: Hello, You have an error in widget template variables $members=array(), $memberCount=0, $chatVersion= Look at $chatVersion= You should set up default value *woooot* but I swear I added a default value to every... ooooooh I messed up the quotes... so for anyone else make sure to not mix "" and '' in a stupid way like me: wrong version (the parameters="" using double quotes, so chatVersion must absolutely not use those too): <ips:template parameters="$members=array(), $memberCount=0, $chatVersion="", $orientation='vertical'" /> correct (outer limits use "", inner values use ''): <ips:template parameters="$members=array(), $memberCount=0, $chatVersion='', $orientation='vertical'" /> Here the fixed version: tfrocketchat-1.0.5.tar - Gonna polish a few things and then publish it in the marketplace. Thaaaanks a lot!
TheJackal84 Posted June 8, 2017 Posted June 8, 2017 On 05/06/2017 at 11:14 AM, ossipetz said: *woooot* but I swear I added a default value to every... ooooooh I messed up the quotes... so for anyone else make sure to not mix "" and '' in a stupid way like me: wrong version (the parameters="" using double quotes, so chatVersion must absolutely not use those too): <ips:template parameters="$members=array(), $memberCount=0, $chatVersion="", $orientation='vertical'" /> correct (outer limits use "", inner values use ''): <ips:template parameters="$members=array(), $memberCount=0, $chatVersion='', $orientation='vertical'" /> Here the fixed version: tfrocketchat-1.0.5.tar - Gonna polish a few things and then publish it in the marketplace. Thaaaanks a lot! If your only making a widget you should just of created a plugin, there is no need for a application for just a widget, I love making applications but 99% of them I wind up turning into plugins as it's easier for me and the user in the long run
ossipetz Posted June 8, 2017 Author Posted June 8, 2017 Hello Thanks for the hint. To be honest I could not really figure out in the developer documentation why there are plugins and applications at all. And I found the documentation for applications better :-) Everything I use from the marketplace is an Application, so I just assumed plugins are a bit old fashioned. I still think I will also add a hook into this application that updates the top-level menu item (similar to what the ipb chat did). Not sure if plugins can do that - even with applications (I looked into the Chat sources) it seems to be a bit of a hack (that number indicator of active users in the chat that was on the "Chat" menu) But good to know plugins are not "dead" :-)
Daniel F Posted June 9, 2017 Posted June 9, 2017 On 8.6.2017 at 1:04 PM, ossipetz said: Hello Thanks for the hint. To be honest I could not really figure out in the developer documentation why there are plugins and applications at all. And I found the documentation for applications better :-) Everything I use from the marketplace is an Application, so I just assumed plugins are a bit old fashioned. I still think I will also add a hook into this application that updates the top-level menu item (similar to what the ipb chat did). Not sure if plugins can do that - even with applications (I looked into the Chat sources) it seems to be a bit of a hack (that number indicator of active users in the chat that was on the "Chat" menu) But good to know plugins are not "dead" :-) Plugins are fine:) I prefer them to applications if I know that I'll not need an own controller and all I want is to change something in the output via a theme hook or if I want to customize an existing method via a code hook.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.