- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 5947
Small example how to include Google maps into Joomla!
HTML part is simple:
<div id="map-canvas" style="width: 400px; height: 400px"></div> <script src="https://maps.googleapis.com/maps/api/js"></script>
Note here that I had to add width and height, otherwise maps refuses to show. Also, note that I added Google APIs.
JS:
/*global google*/
(function (){
"use strict";
var mapOptions,
mapCanvas,
map;
mapOptions = {
zoom: 6,
center: { lat: -34.397, lng: 150.644},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
mapCanvas = document.getElementById('map-canvas');
if (!map) {
map = new google.maps.Map(mapCanvas, mapOptions);
}
}());
Live example:
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 6069
First disable editor: System -> Global configuration -> Default Editor: Editor - None -> Save
Then when you upload some script, or jquery file, in my case you can use it like this:
<script type="text/javascript" src="http://www.milosev.com/Download/dontLooseFocus/jquery-2.1.3.js"></script>
But when you use jQuery in your article, then you have to use jQuery instead of "$", for example:
jQuery("#myText").val("");
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 6085
Today I realized that spamers were using my web site for spam, and problem was com_mailto component.
This is one example of link.
For now I don't have solution, I just deleted that component from my web site.
It seems that problem was with this:
6. Use proper permissions on files and directories. They should be max permissions of 644 for files & 755 for folders with no exceptions.
Taken from here.
Just to be sure, deleted com_mailto component, since I am still blacklisted, as spamer :(
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 5265
If you want your news feed from Joomla! built in component to show in reverse order, then in components\com_newsfeeds\views\newsfeed\view.html.php between lines:
// items $newsfeed->items = $rssDoc->get_items(); // feed elements $newsfeed->items = array_slice($newsfeed->items, 0, $newsfeed->numarticles);
Add:
$newsfeed->items = array_reverse($newsfeed->items);