Where are these HTML elements created in the Joomla code? - html

I'm working on a site for a client, and I've never used Joomla before. I keep seeing elements in the HTML, that I can't find in the code. It's Joomla with Virtuemart and the bt_bazaar template.
For example, at the top of the page there's a div with the class bt_toolbar. When I search the entire public root of the site, it only turns up a match inside CSS, and this line from bt_bazaar/helpers/bt_helpers.php:
$this->bt_toolbar = '<jdoc:include type="modules" name="toolbar" style="BTxhtml" />';
Where is this toolbar? How do I find other module types in the code? Where is the class name bt_toolbar set?
Thanks,
Frankie

Its a Joomla Module.
You can find the joomla modules under
public_html/modules/mod_modulename.
here your module name is toolbar but this name may not be the module name (we can have option to use other names and same name).This name stands the position of the module.
go to admin side and in the module manager you can find a module name with toolbar position name.
eg: mod_somename.
Then go to front end modules/mod_somename/tmpl/default.php
This is the HTML out put of the module.
If you not found the same module on the above path or you changed the file not effecting it.
It may be overrided.
Then you can find the module at
public_html/templates/your_tmplate_name/html/mod_somename
it depends upon joomla version too.
Hope This will help you...

BTxhtml looks like module chrome so look in the modules.php file of your template and see if it is there.
Also name= tells you the name of the position the module is assigned to, so if you go to the module manager and filter on position toolbar you should find it.

Related

Ignore some classes in project from suggestion in code complete

I have file email.php where I have markup and declaration of class email_db which I never used in another place. But when I use autocomplete when I try type empty by 2 first letters em I often see this class as suggestion.
Is it possible to ignore some class names from code complete feature?
No, there's no option for that. The only thing you can try - is to move the file with class declaration to a folder marked "excluded".
Configuring imports
**To configure classes to be excluded from import
Open the Settings/Preferences dialog box, and under the Editor / General node, click Auto-Import.
On the Auto-Import page, click Alt+Insert.
In the dialog box that opens, type the name of the class or a whole package to be excluded, and click OK.
Use Alt+Insert and Alt+Delete to manage the list of classes and packages that IntelliJ IDEA shouldn't place to the suggestion list.
Apply changes and close Settings/Preferences dialog.
Original Link: https://www.jetbrains.com/help/idea/excluding-classes-from-auto-import.html
Hope this helps.

FancyTree: Adding a custom icon by HTML?

I am using HTML to do the basic FancyTree initialization of a folder tree control and I was wondering if I could also specify a custom icon for these folders, i.e.,
<li id="xyz' class="folder" data-icon="myFolderIcon.gif">Folder Name
In the definition of my FancyTree control, I specify an imagePath:
$("#tree").fancytree({imagePath: "skin-win8/",
but all I see is an empty spot where my icon should appear, even though I placed my custom icon in the skin-win8 folder. What's the simplest way to add a custom icon or two to a FancyTree control? I'm both a FancyTree and CSS neophyte, in case you were wondering :)
Sheldon
That looks ok to me. Basically the same as in this demo:
http://wwwendt.de/tech/fancytree/demo/sample-theming.html
Maybe simply a typo in your markup:
<li id="xyz' class="folder" data-icon="myFolderIcon.gif">Folder Name
(should be id="xyz" instead of id="xyz')
Thanks again to mar10 to pointing me in the right direction, even though his thought that I had a typo in my markup was not the actual culprit. But by saying that he didn't see anything wrong and referring me back to his demo for custom node icons, it got me thinking that perhaps I too was also experiencing an imagePath issue, like this previous custom-node question
So I went back to my FancyTree download and got the custom-node example working on my server, then I moved the page and its dependencies around till I got something similar to my situation. Once I had that working, I was able to use the same approach within my actual page...
I happen to keep all my FancyTree-related files in a directory called fancytree within my application's web folder, so I added a subfolder called custom there and set my imagepath in the following manner:
imagePath: "fancytree/custom/",
Once I did that, I was able to use my custom icon either by including it in the HTML definition of the node or by setting it within the Javascript function I used to initialize certain aspects of my tree. Hope this helps some other custom-node newcomer...
Sheldon

joomla loadposition - how to set module position?

I have a custom module (custom HTML) that I want to be on a specific Article
I am using the {loadposition modulename} and it displays my custom HTML modules. However I cannot seem to find where to change how my module is displayed - I want to place it in a specific location on my article, but where do I put in the position information for this?
To accomplish this the {loadposition item} must be contained within a div that has css style attached
I accomplished this by doing the following:
In the article switch the editor to show the HTML code
add the {loadposition} as follows:
<div class="wrap">{loadposition cp_frontpage}</div>
I then add a css file that handles my wrap div
.wrap
{
text-align:center;
margin-left: 0px;
margin-right: auto;
width: 50%;
height: 50%;
}
this can be done as an inline css, or by an external css file (as I did above)
If you want to place the custom module in a specific location of your article page. Please follow the below steps:
The first thing you will need to do is create the module..
Login to the administrator panel of your Joomla installation
Navigate to Extensions -> Module Manager -> New and select the module you wish placed in to your article (eg. Custom HTML)
Set the module postion to one that does not exist in your template. To achieve this, click on the dropdown box next to the 'Position' option and simply type in a new, distinct, module position (eg articlemodule_footer. I like to give the modules a common prefix (eg articlemodule_). This allows me to easily search for my article modules at a later date.
Set the 'Menu Assignment' to 'All'. (Note: it will only appear on the pages with your article because it is the only place where the articlemodule_footer module position is called)
Setup the rest the remaining parameters for your module and click the 'Save'.
Once you have set up your module it is now time to place it inside the article(s) you wish it to appear. For this the Joomla! team has provided us with the loadposition function.
Open up the article(s) in which you wish to place your module and navigate to the area of the article with in your editor where you want the mopdule to appear and type the following...
{loadposition position}
Replacing 'position' with the position name you assigned to the module which you have just created. Eg..
{loadposition articlemodule_footer}
Click save and your done!
If you find that the module is not showing in your article be sure to check the following...
Navigate to Extensions -> Plugin Manager and ensure that the 'Content - Load Module' plugin is enabled.
Clear your site's cache and refresh the page. (Joomla Administration -> System -> Clear Cache)
For us to be able to display this function in this tutorial we had to place the curly brackets surrounding the function in italics. Ensure the italic styling was not copied across if you have copied the function directly from this article.

Why can't I add an HTML custom attribute to a visualforce page?

I have an control, to which I want to add a custom html attribute called, previousValue.
The Salesforce Developer's Guide assures me that I can do this by prefixing the attribute name with html-.
So I have an element that appears thus:. I also have the docType="html-5.0" attribute in my page control.
However, in Eclipse I get an 'unsupported attribute' error. I have upgraded to the latest force.com IDE; can any one tell me why this isn't working? What else do I need to do?
Thanks.
After much experimentation, the answer to this seems to be that the salesforce developer's guide is inaccurate and the 'hmtl-' prefix is not supported by the <apex:inputField> component. I can add it without a problem to an <apex:outputPanel> component. Don't understand why this should be so and the whole point to using these attributes is to locate data in a relevant place and avoid complex jquery selects to find the data relative to the location at which it is required.

Eclipse - how to extend HTML editor to add custom tags?

I write an application and inside of HTML code I have custom tags (of course these tags are parsed on server side and end user gets them as valid HTML code). Example of custom tag usage:
<html>
<body>
...
<Gallery type="grid" title="My Gallery" />
...
</body>
</html>
1.) How can I have eclipse recognize my custom tags inside of HTML code and add syntax highlighting to them?
2.) How can I add auto-suggestions to my custom tags? For example if I type "<Gallery " press "Ctrl+Space" - in the list of available attributes it shows me "type" and "title" and if I type "<Gallery type=" press "Ctrl+Space" I would see list of available values only for tag "Gallery" and its attribute "type".
Thanks in advance!
Not really what you want, but maybe it helps you:
You can try the Aptana Plug-in for Eclipse. It allows to write your own regular expression for HTML validation, so a custom tag would be ignored by the validator.
E.g.:
.gallery.
Eclipse allows you to add simple auto-suggestions via Templates. On
Eclipse 3.7.1 (Indigo) + PHP Dev Tools (PDT) 3.0.0: Window > Preferences > Web > HTML Files > Editor > Templates
Sadly, there is no easy way: you have to roll your own parser for this, and then add both your extra elements and the base grammar (HTML) to it.
If you have your parser, you could use it to do syntax highlighting (strictly speaking, for that simple lexing is enough); and a good parser can support content assist (auto-suggestions in your terminology).
Caveats:
Creating a parser for HTML is not an easy task. Maybe by aiming at a more often used subset is feasible.
If a parser exists, the editor parts are still hard to get well.
Some help on the other hand: you could use some text editor generators to ease your work:
Eclipse IMP http://www.eclipse.org/imp/ can in theory handle any type of parser, but currently it is most optimized for LPG. The documentation is scarce, but the developers are helpful in the forums.
Xtext http://www.eclipse.org/Xtext/ got quite a hype for creating text editors for DSLs. The generated editors are quite nice out of the box, but is not the best solution for large files. Has a really helpful developer community.
EMFText http://www.emftext.org/index.php/EMFText is a lesser known entity - I don't know it in details, but I guess, it is similar to Xtext.
I know its been a long time since this Q was asked,
but I hope this might help others like myself that reach this in search of a solution.
So, When using Eclipse (Mars.1 Release (4.5.1) - and possibly earlier - I did not check).
Go to Window - Prefrences
Then in the dialog that opens go to Web - HTML Files - Editor - Validation.
On the right side:
under Ignore specified element names in validation and enter the list of custom elements you use. (e.g. Gallery,tab,tabset,my-element-directives-*)
you might also like to go under Ignore specified attribute names in validation do the same for your custom attributes.(e.g. ng-*,my-attr-directives-*)
Two things to note:
After letting eclipse do a full validation you must also close the file and reopen it to have the warnings removed from the source code.
Using this method would ignore those attributes under any element. I don't think there is a simple way to tell it to ignore some-attribute only if its a child of some-element.
I find templates are an ok alternative but let's see if we can encourage a more robust solution; please take a moment and vote for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=422584
You need to add a new HTML template.To add a new template, complete the following steps:
1) From the Window menu, select Preferences.
2) In the Preferences page, select Web and XML > HTML Files > HTML Templates.
3) Click New.
4) Enter the new template name and a brief description of the template.
5) Using the Context drop-down list, specify the context in which the template is available.
6) In the Pattern field, enter the appropriate tags, attributes, or attribute values (the content of the template) to be inserted by content assist.
7) If you want to insert a variable, click the Variable button and select the variable to be inserted. For example, the word_selection variable indicates the word that is selected at the beginning of template insertion, and the cursor variable determines where the cursor will be after the template is inserted in the HTML document.
8) Click OK to save the new template.
You can edit, remove, import, or export a template by using the same Preferences page.
Reference : http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.wst.sse.doc.user%2Ftopics%2Ftsrcedt024.html