gteigland VIP
Total posts: 159
28 Jun 2015 03:48

Ok so I'm working integrating the view for the Easy Social App plugin you have.

As you can see by my screenshot I have created a new template and styled it to my liking. http://www.awesomescreenshot.com/image/362761/976a0c8dbdd61991cdc64ea15b4e7a53

However the view that is inside easysocial doesn't work as it stretches outside the boundary. This looks like the defaut listing view. http://www.awesomescreenshot.com/image/362762/19608366e2232a13b280123d65d3afba

How do I change the easy Social app for Cobalt to match the listing view I have created?

Thanks!

Last Modified: 14 Jul 2015


pepperstreet VIP
Total posts: 3,837
28 Jun 2015 04:35

Hello, please have a look into -> EasySocial -> Applications. Open the respective Cobalt app # ... See tab General settings. There should be a parameter List template.

mj_cob_es_app_params

Sorry, I am not sure about the correct input format of the template name. I wonder why this is not a simple select field like in "JomSocial plugin". That config is much easier and "joomla-rish" ;)


gteigland VIP
Total posts: 159
28 Jun 2015 14:10

Thanks that helps. I put in my custom template name that is listed in cobalt backend. (not the name of the file in php). So for example mine was ua-list-view. However it does not carry over the settings from my cobalt backend. So for example:

  1. I have view ratings selected to "no" but in easysocial it shows. Probably because it's just carrying over the code from the template but not rendering the selecting in cobalt backend.

  2. Also doesn't carry over my selection for number of columns etc on the view, among other things.

So my guess is I have to copy over that template and create a new one and hard code it all (deleting anything I don't want knowing the selectors aren't rendering) unless you have a better solution.

Thanks again for your great support.


Sergey
Total posts: 13,748
29 Jun 2015 05:15

gteigland So my guess is I have to copy over that template and create a new one and hard code it all (deleting anything I don't want knowing the selectors aren't rendering) unless you have a better solution.

Delete anything you do not want, unless there is no parameters. In most templates, there are parameter almost for each element of article to show or hide.


gteigland VIP
Total posts: 159
30 Jun 2015 14:10

Ok great. For the most part this worked. I was able to delete on the new template and achieve my result.

However columns still remain an issue. As you know you select the number of columns in the backend of cobalt section however that does not carry through into the plugin. So I have selected 4 in cobalt backend but it shows two in es plugin (see example) http://www.awesomescreenshot.com/image/368700/a81c0c30a548040dc094b25e70baf9d0

Note on my cobalt list I have 4 and it looks like this for columns: http://www.awesomescreenshot.com/image/368720/a2d38b865c1ee0861a7e3ff6f7978d65

Trying to to get the same number columns so it fits better and more compact.

I tried to manually code it by changing this line in my NEW list view template file

$cols = $params->get('tmpl_params.blog_cols', 2);

I changed "2" to 4 but that did not work.

The whole sequence is here:

<?php
$k = 0;
$params = $this->tmpl_params['list'];

$cols = $params->get('tmpl_params.blog_cols', 2);
$intro = $params->get('tmpl_params.blog_intro', 6);
$links = $params->get('tmpl_params.blog_links', 5);
$l = 0;
JHtml::_('dropdown.init');
$rows = $cols ? ceil($intro / $cols) : 0;
if($rows <= 0) $rows = 0;

$helper = new CarticleHelper();
$helper->k = 0;

$exclude = $params->get('tmpl_params.field_id_exclude');
settype($exclude, 'array');
foreach ($exclude as &$value) {
    $value = $this->fields_keys_by_id[$value];
}
$helper->exclude = $exclude;
?>

Any ideas or direction you can give me. This cobalt plugin for ES is great and just want a few more tweaks on it.

Thanks!


Sergey
Total posts: 13,748
01 Jul 2015 15:53

gteigland I changed "2" to 4 but that did not work.\n\n

That is default value if nothing is set in template parameters. If you want to change it to 4 change that in temp[late parameters.

Or just do like this $cols = 4;.


gteigland VIP
Total posts: 159
03 Jul 2015 14:56

This worked perfectly except having one small issue on image load for icons:

  1. When I hit the Cobalt link on the side in ES to load the projects (records) it loads most items except in this screen shot you will see it does not load the icon images: http://www.awesomescreenshot.com/image/378683/ee42373b4ee7cc76199cdcbf0be4d72f

  2. What's weird is when I hit refresh on the page... then everything loads fine. http://www.awesomescreenshot.com/image/378690/73956855ab74f93da19f1f381c7d695c


Sergey
Total posts: 13,748
07 Jul 2015 16:43

Could it be browser cache?


gteigland VIP
Total posts: 159
07 Jul 2015 17:43

Unfortunately no. I clear it... use private browsing and same thing .When I select it the first time.. I get this: http://www.awesomescreenshot.com/image/387324/1c1d08df58fb5fe93f928865b681d032

But on the same page when I hit refresh... it corrects itself: http://www.awesomescreenshot.com/image/387328/6ab3597244cc5cc1927408043ce55d3f

Really weird. I can provide you credentials if need be (but this forum won't let me) for some reason. Only when I create a new topic.


Sergey
Total posts: 13,748
08 Jul 2015 08:59

This is really weird. try to edit this topic an add passwordso I can login.


gteigland VIP
Total posts: 159
08 Jul 2015 13:54

I added the credentials with instructions to view the issue. Thanks!


Sergey
Total posts: 13,748
12 Jul 2015 04:47

This is because My Projects app is loaded with ajax. So ajax response HTML but it cannot add template CSS into head. So you have 2 choices.

  1. Make sure that your template CSS is already loaded on network page(dashboeard)
  2. Insert CSS into template not in CSS file.

gteigland VIP
Total posts: 159
14 Jul 2015 16:40

I chose option #2. That worked!

Powered by Cobalt