Struggling with Phoca Desktop

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
DaveOzric
Phoca Member
Phoca Member
Posts: 11
Joined: 29 Nov 2010, 15:55

Struggling with Phoca Desktop

Post by DaveOzric »

Hello, I do not like Joomla 4 and the dashboard. Too many clicks to get anywhere. Why they did this is a mystery.

Anyway, I found your Desktop plugin but it's very confusing and the documentation does not explain how to customize the shortcuts. If I use your example code I get the output. If I change it the plugin stops working.

Can you explain why this does not work? All I did was change the first one, which works until I delete the rest of them. Do you have to have 18 shortcuts for this to work?

Thank you

{
"0":{
"title":"Install",
"link":"index.php?option=com_installer&view=install",
"icon":"icon-file-alt"
},
"1":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_ARTICLE",
"link":"index.php?option=com_content&task=article.add",
"icon":"icon-file-alt",
"type":"add"
},
}
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Struggling with Phoco Desktop

Post by Jan »

Hi, it is standard JSON file, try to check your file if it is correct JSON. First try to change only e.g. link to see if this will work (to check if there is no JSON error)

For example, in your code, I think, you cannot have "," between } and } so try to remove the , or try to use some online JSON checker to know that your JSON does not include errors.

Jan
If you find Phoca extensions useful, please support the project
DaveOzric
Phoca Member
Phoca Member
Posts: 11
Joined: 29 Nov 2010, 15:55

Re: Struggling with Phoco Desktop

Post by DaveOzric »

Hi, I copied this from your code. I only made two changes to the first item and saved it. This change worked fine. Desktop showed up in the dashboard.

Then I simply deleted 2-18 and it stopped working. So the code is fine, as it worked with 2-18 in place. So I am not sure of your suggestion. It worked until I deleted 2-18.

Your example code that works, has these "," in them.

{
"0":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ARTICLES",
"link":"index.php?option=com_content&view=articles",
"icon":"icon-file-alt"
},
"1":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_ARTICLE",
"link":"index.php?option=com_content&task=article.add",
"icon":"icon-file-alt",
"type":"add"
},
"2":{
"title":"PLG_SYSTEM_PHOCADESKTOP_CATEGORIES",
"link":"index.php?option=com_categories&view=categories&extension=com_content",
"icon":"icon-folder-open",
"type":"",
"color": "#EFCA08"
},
"3":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_CATEGORY",
"link":"index.php?option=com_categories&task=category.add",
"icon":"icon-folder-open",
"type":"add",
"color": "#EFCA08"
},
"4":{
"title":"PLG_SYSTEM_PHOCADESKTOP_MENU_ITEMS",
"link":"index.php?option=com_menus&view=items&menutype=",
"icon":"icon-list",
"type":"",
"color": "#00A6A6"
},
"5":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_MENU_ITEM",
"link":"index.php?option=com_menus&task=item.add",
"icon":"icon-list",
"type":"add",
"color": "#00A6A6"
},
"6":{
"title":"PLG_SYSTEM_PHOCADESKTOP_USERS",
"link":"index.php?option=com_users&view=users",
"icon":"icon-users",
"type":"",
"color": "#CCFCCB"
},
"7":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_USER",
"link":"index.php?option=com_users&task=user.add",
"icon":"icon-users",
"type":"add",
"color": "#CCFCCB"
},
"8":{
"title":"PLG_SYSTEM_PHOCADESKTOP_MODULES",
"link":"index.php?option=com_modules&view=modules&client_id=0",
"icon":"icon-cube",
"type":"",
"color": "#C0B9DD"
},
"9":{
"title":"PLG_SYSTEM_PHOCADESKTOP_ADD_MODULE",
"link":"index.php?option=com_modules&view=select&client_id=0",
"icon":"icon-cube",
"type":"add",
"color": "#C0B9DD"
},
"10":{
"title":"PLG_SYSTEM_PHOCADESKTOP_PLUGINS",
"link":"index.php?option=com_plugins",
"icon":"icon-plug",
"type":"",
"color": "#DED9E2"
},
"11":{
"title":"PLG_SYSTEM_PHOCADESKTOP_MEDIA",
"link":"index.php?option=com_media",
"icon":"icon-images",
"type":"",
"color": "#DE6B48"
},
"12":{
"title":"PLG_SYSTEM_PHOCADESKTOP_TEMPLATE_STYLES",
"link":"index.php?option=com_templates&view=styles&client_id=0",
"icon":"icon-paint-brush",
"type":"",
"color": "#E5B181"
},
"13":{
"title":"PLG_SYSTEM_PHOCADESKTOP_TEMPLATE_CODE",
"link":"index.php?option=com_templates&view=templates&client_id=0",
"icon":"icon-code",
"type":"",
"color": "#F4B9B2"
},
"14":{
"title":"PLG_SYSTEM_PHOCADESKTOP_GLOBAL_CHECKIN",
"link":"index.php?option=com_checkin",
"icon":"icon-unlock-alt",
"type":"",
"color": "#0C6291"
},
"15":{
"title":"PLG_SYSTEM_PHOCADESKTOP_GLOBAL_CONFIGURATION",
"link":"index.php?option=com_config",
"icon":"icon-cog",
"type":"",
"color": "#80A1D4"
},
"16":{
"title":"PLG_SYSTEM_PHOCADESKTOP_CACHE",
"link":"index.php?option=com_cache",
"icon":"icon-cloud",
"type":"",
"color": "#BBDEF0"
},
}
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Struggling with Phoca Desktop

Post by Jan »

So, if it stopped working after deleting the items, it means, there is some JSON error (broken JSON format), did you check the JSON for Correctness (in editor or in some online service)?

The JSON format is here for webdesigners. They make the JSON once and they then just copy it to different websites, so they don't need to build it everytime on each new Joomla instance. But as every format (like XML, etc.) it has some rules and they should not be broken.

Jan
If you find Phoca extensions useful, please support the project
DaveOzric
Phoca Member
Phoca Member
Posts: 11
Joined: 29 Nov 2010, 15:55

Re: Struggling with Phoca Desktop

Post by DaveOzric »

I see, the last comma must be removed. OK, thanks for pointing me to a checker. I don't know about code or JSON.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Struggling with Phoca Desktop

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
DaveOzric
Phoca Member
Phoca Member
Posts: 11
Joined: 29 Nov 2010, 15:55

Re: Struggling with Phoca Desktop

Post by DaveOzric »

I just found your top menu module. That's all I really needed. This plugin will be for any users who have access to the backend. You certainly are making Joomla great again.

Thanks Jan!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Struggling with Phoca Desktop

Post by Jan »

Great to hear it. Yes, the work process with top menu is much faster than when searching "hidden" menu items in the system.

Jan
If you find Phoca extensions useful, please support the project
Post Reply