/* Re-enable home icon subtext - (when using the home icon class) */ .menu-mainmenu.menu-iconmenu .jsn-icon-home .jsn-menutitle, .menu-mainmenu.menu-iconmenu .jsn-icon-home .jsn-menudescription, div.jsn-modulecontainer ul.menu-mainmenu.menu-iconmenu.menu-richmenu li.jsn-icon-home a span.jsn-menudescription { display: block; }
/* Correct Home Menu button width, Icon and subtext position */ .menu-mainmenu.menu-iconmenu li.jsn-icon-home > a > span { width: auto; padding-left: 22px; }
/* Remove the grey background and removing padding from Promo POS */ #jsn-promo { background: none; padding: 0; }
This diagram shows you visual chart of what a particular countries phone adapter looks like.
These techniques all center floats, they do not replace the floats with other code like some people suggest. All of these methods dont seem to need to have the widths set, if you run into problems you might consider setting the widths of the child elements (ie the ones that are floated).
Content Here
Content Here
Width set to 150px
Content Here
Content Here
No set width
<div class="float-parent" style="display: table; margin: auto; border: green 3px solid;"> <div style="float: left; margin: 5px; width: 150px; border: blue 3px solid;"> <h3>Optional Title</h3> <p>Content Here</p> </div> <div style="float: left; margin: 5px; width: 150px; border: blue 3px solid;"> <h3>Optional Title</h3> <p>Content Here</p> </div> </div>
This is my prefered method and uses the least amount of code. The way it works is display: table; make the browser treat the immediate children as Table cells so the floats actuall only occur within the table cell.The table is then centered with margin: auto; .
CSS Code
<style type="text/css"> #centered-float-menu { float: right; position: relative; left: -50%; border: green 3px solid; } #centered-float-menu ul { position: relative; left: 50%; border: yellow 3px solid; } #centered-float-menu li { float: left; border: blue 3px solid; } </style>
HTML Code
<div id="centered-float-menu"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">This is long...</a></li> <li><a href="#">Link 3</a></li> <li><a href="#">www.myexampledomain.com</a></li> <li><a href="#">Link 5</a></li> </ul> </div>
This relative method is a work around but does do what it says on the tin and might be useful when the preferred method does not work.
<div style="text-align: center; border: green 3px solid;"> <div style="display: inline-block; border: yellow 3px solid;"> <div style="float: left; margin: 2px; border: blue 3px solid;">Link 1</div> <div style="float: left; margin: 2px; border: blue 3px solid;">Link 2</div> <div style="float: left; margin: 2px; border: blue 3px solid;">Link 3</div> </div> </div>
This method does maintain the floats, it is not like other tutorials where they instruct you to replace the floats with the inline-block centre method.
This is a backup of my forum post/article from Joomla! • View topic - j2.5 to 3.1.1 - Menu SQl errors - after jupgrade (solution)
These instructions assume you have correctely prepped your joomla 2.5.11 install and are still having issues. (ie you have upgrade your extensions and removed those which are not compatable with j3.x etc...)
The Error
Due to the different variations of installed components, you might not see the exact error below but one very similiar.
0 - An error has occurred. SQL=INSERT INTO `jos_menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES (23, 'main', 'com_tags', 'Tags', '', 'Tags', 'index.php?option=com_tags', 'component', 0, 1, 1, 29, 0, '0000-00-00 00:00:00', 0, 1, 'class:tags', 0, '', 45, 46, 0, '', 1);
This is another possible error message
The upgrade from j2.5.11 can be a difficult one if you arrived at j.25 via a migrated j1.5.x joomla install. the reason is that for some reason the jupgrade did not correctely migrate menu (or other possibly) id's correctely.
when you do a fresh install off joomla 2.5.11 the menu items up to 200 are reserved for future joomla menu updates for the core. No user content starts until id 201. The user created menus or in this case the demo data start at 201. some versions of joomla possibly start this at id 100
now in my case there is no gap between the core and the user data menu ids (ie i have some user menus in the 0 - 200 range) and this can rear its head when you do an upgrade because the guys at joomla expect 0-100 or 0- 200 to be empty so issues like the on i have do not happen and they can put their stuff in there.
one way of detecting this error without diving into the database is the lack of the joomla update component menu in the admin panel. You can correct this missing item by following this article -insert link-- but it will delete the menu item that is already there. If you know what you are doing just look in jos_menu and see if the range 0-200 only has joomla core stuff in it.
now my issue is when the update has almost finished it says there is a duplicate entry, in my case it is a jmedia menu item
solution:
It is the menu items that causes the upgrade issue for me.
later version of j2.5 made all new 'user content' menu items install in the jos_menu id 200+ region so this will never be an issue, but for those of use who have migrated from joomla 1.5 with jupgrade to an early version of j2.5 (early versions of jupgrade had issues in migrating menu id numbers), here is the fix
The errors in the database need fixing. But you can sucessfully upgrade to joomla 3.0.3 and then make the changes. I believe that it is after j3.0.3 the 'joomla extension' and 'joomla core' quick icon items are added. However i would make the changes to the j2.5.11 first. This note is really for reference for those on j3.0.3 having similiar issues and apart from the obvious the fix is still the same.
Pre-requisites
step 1 - copy all of you menu's (only those below 200)
NB:
How To:
Remaining Steps
- perform the joomla updater component fix
As mention before the joomla updater might be missing. To fix this you need to run the following sql script to add the entery back in. You by now should have an empty 0 - 200 menu id range. This is correcting one of those damaged enteries.
info from
https://www.akeebabackup.com/documentation/troubleshooter/atj25update.html
http://docs.joomla.org/Joomla_Update_Missing_in_from_Admin_Menu
- additional missing menu items.
I checked the menu items on a fresh install of joomla 2.5.11 and discovered that core menu items go up to 22. (i think in later version of j3 tags is added in at id 23)
I had a missing item, Smart Search. here is the code i used to fix the missing item:
INSERT INTO `j25_menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES (21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 41, 42, 0, '*', 1);
the quickest way to get code like this is to use phpmyadmin to export them from a fresh copy of joomla j2.5.11
If the update icons are missing on the dashboard. this is because the plugins need to be enabled. on a default 3.0 install they are enabled by default.
Go to the plugin manager and enable:
Final Thought
You possibly need to reinstall a component over the top if you get issues. i did, in particular k2. i had updated it to the latest version before upgrade (cannot uninstall it because it wipes the database)
Mosets Tree is written with US addresses in mind so when you want to use an UK address format you need to make a few minor adjustments to your template to alter the display order of the fields that build up the address. This will not affect storage of these details in your database, just how they are shown. You can also alter the display order of the fields in the admin section to make it also match the UK address format.
Alter the files in your template as follows. As you can see you are only changing the display order of some fields which then give yout he correct UK address format.
sub_listingSummary.tpl.php
foreach( array( 4,5,6,7,8 ) AS $address_field_id )
to
foreach( array( 4,5,6,8,7 ) AS $address_field_id )
and
($this->config->getTemParam('displayAddressInOneRow','1') && !in_array($field->getId(),array(4,5,6,7,8))
to
($this->config->getTemParam('displayAddressInOneRow','1') && !in_array($field->getId(),array(4,5,6,8,7))
sub_listingDetails.tpl.php
foreach( array( 4,5,6,7,8 ) AS $address_field_id )
to
foreach( array( 4,5,6,8,7 ) AS $address_field_id )
These instructions relate to Mosets Tree 3.5.8
When I used the category changer with the WYSIWYG enabled on the description field, the WYSIWYG content would get removed and the Save/Save and Close/Cancel buttons would no longer work.
These might not be the cause or a working solution to solve the problem permanetly and leave mosets tree functioning 100%.
Cause
Solution
Addendum
1 - My first Communication of the error on the Demo Site
There is a fault with your demo site.
I enabled wysiwyg for front and back end. i then edited a listing in the admin and changed its category. Once I changed the category and clicked update, the WYSIWYG content
disappears and a lot of stuff on the page stops working. I am using the latest version of firefox.
1 - Response from Mosets Tree
Thanks for your e-mail and feedback. This is indeed and known issue due to a limitation on Joomla's raw output the last time we checked. Because of this, we recommend our users to use non-wysiwyg editor (this is the default behaviour) or go directly to the category when you need to create a listing for it. We will keep an eye on this and provide a fix once that is possible.
Best regards,
CY Lee
2 - Issue raised with Mosets Tree with further information
All seems well until you change the category, the WYSIWYG content window is then emptied and the save/save and close/cancel buttons no longer function.
If you do not change the category the save/save and close/cancel buttons still work and the WYSIWYG content is preserved.
2 - Response from Mosets Tree
Thanks for the feedback. This is indeed a known issue to us when you have WYSIWYG editor and change category why editing your listing. It’s due to the fact that we use Joomla’s API to load the wysiwyg editor and there is no way to reactive it after a DOM refresh. We don’t have a solution for this now other than advising you to move the listing to another category before editing it - or don’t use wysiwyg editor if changing category during editing is a frequently used operation on your end.
We’re holding out for a more robust API from Joomla’s end so that we can resolve this. Sorry about the trouble Jon.
Best regards,
CY Lee
3 - An email with my research to help fix the issue
I have done some research into this issue and I don’t believe it is to do with the DOM refresh.
Using joomla 3.4.1
In category.js the error is related to the following code
html = items.join(''); jQuery('#mtfields div[id^="field_"]').remove(); jQuery(html).appendTo('#mtfields'); jQuery('#mtfields input, #mtfields select, #mtfields textarea').bind('change', function(event) {onChangeMTFieldsInput(event);});I have messed around with the code briefly and got the wysiwyg to work. These commands occur after the DOM refresh (I think).
Please find attached my research which you might find useful and hopefully a quick fix.
3 - Response from Mosets Tree
That portion of codes are responsible of actually updated the list of fields with a new set of fields of the newly selected category. It doesn’t solve the issue itself but does work if your work case does not require updating the set of fields (i.e.: all your category uses the same set of fields and you only need to update your category).
Best regards,
CY Lee
example.com/media/com_mtree/js/category.js
with the following i changed the category.js and clicked update, and then save. i also used tinymce
html = items.join(''); jQuery('#mtfields div[id^="field_"]').remove(); jQuery(html).appendTo('#mtfields'); jQuery('#mtfields input, #mtfields select, #mtfields textarea').bind('change', function(event) {onChangeMTFieldsInput(event);});
I removed the above code and checked:
html = items.join('');
i removed the above code and:
jQuery('#mtfields div[id^="field_"]').remove();
I removed the above code and:
jQuery(html).appendTo('#mtfields');
I removed the above code and:
jQuery('#mtfields input, #mtfields select, #mtfields textarea').bind('change', function(event) {onChangeMTFieldsInput(event);});
I removed the above code and:
Altering the following code allows you to use the WYSIWYG for the desctiption field and keep the save/save and close/cancel buttons to still work whilst creating records but does have the side effect that
That portion of codes are responsible of actually updated the list of fields with a new set of fields of the newly selected category. It doesn’t solve the issue itself but does work if your work case does not require updating the set of fields (i.e.: all your category uses the same set of fields and you only need to update your category).
Best regards,
CY Lee
The rought translation of the quote is that when you change category Mosets Tree will change the field list to match the new category, there might or might no be a change in the fields used. This code makes those changes. If like me you are using the same fields in all of your categories then removing this code will have not detrimental effect.
Open the file
example.com/media/com_mtree/js/category.js
and find the code block
html = items.join(''); jQuery('#mtfields div[id^="field_"]').remove(); jQuery(html).appendTo('#mtfields'); jQuery('#mtfields input, #mtfields select, #mtfields textarea').bind('change', function(event) {onChangeMTFieldsInput(event);}); });
and then REM the block out as follows
/*html = items.join(''); jQuery('#mtfields div[id^="field_"]').remove(); jQuery(html).appendTo('#mtfields'); jQuery('#mtfields input, #mtfields select, #mtfields textarea').bind('change', function(event) {onChangeMTFieldsInput(event);});*/ });
I would now make sure Mosets Tree works as you expect before massive data entry.
what I have done to mosets tree to set it up like Bookmarks.
These are changes to system files and are not user setable.
Template Mods
Core Mods
These are user setable settings in the Mosets Tree Backend.
Template Settings
Core Settings
Category Settings
General
the way mosets tree gets around multiple directories is as follows
Notes
Link Building
this seems to be an internal plugin that builds <a> tags
$this->plugin( 'ahreflisting', $link, $link_name->getOutput(2), '', array("edit"=>false,"delete"=>false), 1 );
Accessing field data in the template
// these do similiar things i think $website = $link_fields->getFieldById(12); // for core and custom, only returns if the feld is active. this loads the 12th field $website = $link->link_website; // for core only, always returns the vaule no boolean or permissions. link_website is a core table field/column from #__mt_links
ie. the code below checks to see if the website field is available and then if it is does it have a vaule, if both are positive then run code
// Website $website = $link_fields->getFieldById(12); if(!is_null($website) && $website->hasValue()) { echo '<p class="website">' . $website->getOutput(2) . '</p>'; }
When creating a new category in back end, the 'Use Main Index template page' options is set by default to on, this should be set to off by default.
Fix
administrator/components/com_mtree/models/forms/category.xml
fields && classes
mweblink
field class example - mweblink
mtree.php
D:\Documents\websites\lancast\htdocs\administrator\components\com_mtree\mtree.php
creating a CF value (custom field)
line 5320 - D:\Documents\websites\lancast\htdocs\administrator\components\com_mtree\mtree.php
table structure id cf_id link_id value attachment - Default = 0 counter - Default = 0
therefore only the first 4 things are created with values
Custom Fields
This tutorial is based on my GrabMeta Editor Button Plugin which I developed for myself. These instruction will be very similiar for a content plugin which I will address any differences at the end.
There are different types of plugins and I will list the ones I have created:
/grabmeta/language/
/grabmeta/language/en-GB/
/grabmeta/language/en-GB/en-GB.plg_editors-xtd_grabmeta.ini
/grabmeta/language/en-GB/en-GB.plg_editors-xtd_grabmeta.sys.ini
/grabmeta/grabmeta.php
/grabmeta/grabmeta.xml
/grabmeta/index.html
/grabmeta/script.php
/grabmeta/ language/en-GB/en-GB.plg_editors-xtd_grabmeta.ini
It should be noted that I think if there are translation files in the joomla system folders they might take priority over the local override files
/administrator/language/en-GB/ en-GB.plg_editors-xtd_grabmeta.ini /administrator/language/en-GB/ en-GB.plg_editors-xtd_grabmeta.sys.ini
en-GB.plg_editors-xtd_grabmeta.sys.ini
<languages>
<language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_grabmeta.ini</language>
<language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_grabmeta.sys.ini</language>
</languages>
/administrator/language/en-GB/
Notes specific to an editor button, not address above should as the button calling code.
There are some slightly different ways to execute code via the editor button.
Single Stage PHP
GrabMeta (AJAX /Multi Stage PHP)
Straight Button
Straight Button with Modal
Whereever your active code is run from, you sometimes need to pass variables or information to it. There are 2 basic ways of doing that in Joomla:
I will address the differences that are required for a content plugin
Language files
<languages> <language tag="en-GB">language/en-GB/en-GB.plg_content_executecode.ini</language> <language tag="en-GB">language/en-GB/en-GB.plg_content_executecode.sys.ini</language> </languages>
As you can see the plugin type aspect fo the file name has changed, and in this case the name of the plugin. You can have 2 plugins, one button and one content with the same name such as 'executecode'.
XML file
This is probably a noobie question so i will warn you guys first but i am a bit stuck. I have had a look about and i do not know what to ask for except here.
I have installed projectfork and installed the PF Menu module. I am using SEF (native not extension). All the links are as follows
http://www.mysite.com/dashboard
http://www.mysite.com/projects
etc..
As you can see they are all root links, but i would like them like
http://www.mysite.com/projectfork/dashboard
http://www.mysite.com/projectfork/projects
On the docs site, the menus on the left do exactly this.
http://projectfork.net/docs
Are all the docs menus actually part of the main menu or is there a joomla trick i can use ie hidden menu item to get all the PF module menu to have 'normal' links?
Solution
Install Projectfork
Make the following changes:
PF Menu
Main Menu
PF Menu Module
You have now configured all your PF links to be under the directory projectfork.
Overview
This solution is not for when you have joomla into a sub-directory because, left as standard the same issue would arise but just in a sub-folder.
My method allows me to have all my projectfork links in the projectfork subfolder. With the standard install of PF and joomla, the PF Menu Module Links are all root items. I wanted my in a subfolder as if i had installed a seperate piece of software whilst everything else was kept route.
This probably arises because i will be using my website for more that PF.
Maybe the solution i have done above might be common Joomla stuff but i found it tricky. I did not even know about joomla 'Menu Alias Item' until today.