Site

Joomla

Joomla: nice Templates

Moving Joomla site to another directory

Add Videos on a Joomla site

Add Music on a Joomla site

Understanding Joomla 1.5 Template Positions

Suppression répertoire Joomla

Erreurs lors de l'installation de modules Joomla

Backup / Restore a Joomla Site

Add Google Calendar to your Joomla site

Update Joomla! version


top

Joomla: nice Templates

http://www.rockettheme.com/joomla-templates

Animation d'images:

http://extensions.joomla.org/extensions/photos-a-images/images-rotators


top

Moving Joomla site to another directory

If you are just changing folders on the same server and not moving the database you will need to move the files (obviously ;)) Then edit the configuration.php to reflect the move: changing the var $tmp_path and var $log_path, change the var $live_site, change the URL, change the FTP root and any other FTP settings if different(if the FTP Layer is enabled). That pretty much does it unless you have a custom .htaccess file with any reference to the test site that need to be amended or deleted. The only other issue is if you have used absolute URL's for any of your internal links or images these will need to be modified (ideally using relative links). That should see you comfortably moved up a directory.


top

Add Videos on a Joomla site

Best plugin : Allvideo Reloaded

http://forum.joomla.fr/archive/index.php/t-18994.html

video conversion issue: http://help.adobe.com/en_US/AdobeMediaEncoder/4.0/WSCC41BC8A-74B4-4811-8AD7-D5A126D995B6.html#WS5b3ccc516d4fbf351e63e3d117f0bcbdad-7ffb


top

Add Music on a Joomla site

Currently using JosDewPlayer:

 http://extensions.joomla.org/extensions/4779/details
 support: http://forum.joomla.org/viewtopic.php?f=473&t=326300#p1419189

A. Main resources: http://musicplayer.sourceforge.net/#showcases http://xspf.org/quickstart/

B. Specs 1 You can use Peter Forret's Webjay Wizard (http://web.forret.com/tools/webjay.asp) to generate the HTML code, and Aldrin Hanley (http://www.ic.sunysb.edu/stu/ahanley/music/help.htm) also wrote a good help file with instructions on how to use and embed the XSPF Web Music Player.

To finish check out this nice and detailed article (http://forevergeek.com/articles/xspf_a_better_way_to_play_mp3s_on_your_site.php) at forevergeek.com.

C. Examples

So you have a Joomla website, and you want to put in some music / or play some other kind of MP3 on it. One of the ways to do this (and which we have used), is using the XSPF free mp3 player.

XSPF is a playlist format which uses XML to define the playlist which you want to play. So how do you do it?

1. Upload the MP3s you want to play to a /Tracks folder on your website.

2. Download the Music Player and upload it to the root directory of your website

3. Define your tracklist playlist based on the tracks you have created. Save the file as playlist.xspf and upload it to the root of your website too.

E.g. playlist

<?xml version="1.0" encoding="UTF-8"?> <playlist version="0" xmlns = "http://xspf.org/ns/0/">

  <trackList>
   <track>
    <location>http://www.yoursitecom/tracks/Track 02.mp3</location>
    <annotation>Track 01</annotation>
   </track>
   <track>
    <location>http://www.yoursitecom/tracks/Track 02.mp3</location>
    <annotation>Track 02</annotation>
   </track>
  </trackList>

</playlist>

4. Go to Extensions > Module Manager, and create a new Custom HTML module. In the HTML put in the following code to embed the player and to have it play your defined playlist.

<object data="xspf_player.swf?playlist_url=playlist.xspf&autoplay=1" height="15" width="200" type="application/x-shockwave-flash"> <param name="src" value="xspf_player.swf?playlist_url=playlist.xspf&autoplay=1" /> </object>

Set the other module players, such as the template position you want it to appear, and enable it, and save.

That's it ... your website now has music!

Download XSPF: http://blog.lacymorrow.com/projects/xspf-jukebox/?t=MiniTunesReduced

Document Source: http://www.dart-creations.com/joomla/joomla-tips-and-tricks/73-free-mp3-music-player.html

You can also use the Jukebox to play a single .mp3 or .flv file, using the two following variables in place of “playlist_url” and “creator”, “title”, and “annotation”:

?track_title : label of track

?track_url : url of track

Playlister

The Jukebox playlister, included, is an alternative to long .xspf or .xml files. It can be used in place of these files on any server that allows PHP. To use, open the “playlist.php” file with a plain text editor and edit the top portions of the code to match your server settings.

If you need individual images for each track (as opposed to one image for all tracks, or an Amazon supplied image), Set “$image” to true.

Set “$useid3” to true if you plan on using id3 tags.

Set the “$id3version” to 1 or 2, depending on your .mp3 files. If you are not sure what to put here, use 1, if it does not work properly, try 2. If it still fails to label your music correctly, reconvert your id3 tags using a capable program (iTunes).

Upload the “playlist.php” file to your server, and place it in the directory with your music, place it in the highest needed directory.

Upload the entire “id3” folder to your server if you plan to use id3 tags to label your music.

If you do not plan on using id3 tags, sort your music into sub-folders based on artist name. Label each .mp3 file with the correct track name (eg. “Everything to Everyone.mp3”).

If you need individual images for each track, place the image in the same folder as the corresponding track, with the same file name (eg. “Everything to Everyone.jpg”).

Finally, change your “playlist_url” in your embed script to “playlist_url=playlist.php”

There are a couple of ways to embed the XSPF Jukebox with ease and using top web standards. The first is the included “embed.php” script, and the second is using the “SwfObject” Javascript in conjunction with plain HTML.

embed.php

The “embed.php” script allows for simple setup, and one-line embedding on any .php page. It uses a built-in “SwfObject” Javascript, with an HTML backup for ultimate ease and usability. It requires a server that allows PHP, and can only be called from a .php page. To use, open the “embed.php” file, inside the “playlister” folder, in a text editor. Change the first couple of lines to fit your settings, then save, and upload to your server. To embed, add the following line to your .php page:

require_once("embed.php");

Use the div id “flashcontent” to style and place using CSS.

swfobject + html

The “SwfObject” Javascript can be downloaded from http://blog.deconcept.com/swfobject/ . To use, place the file on your server, and add the following code into the head section of your .html page:

<script type="text/javascript" src="swfobject.js" />

Then add this code into the body section:

Javascript Control

A javascript interface has been added into the player to allow for extended control over the Jukebox by calling functions through javascript. This feature only applies to the Flash 8 version. Available functions are:

?playTrack : play/pause the track

?stopTrack : stop the track

?nextTrack : advance to the next track

?prevTrack : go back to the previous track

?shuffleToggle : turn shuffle on/off

?repeatToggle : turn repeat on/off

?gotoTrack(track number) : play a specified track

To control the Jukebox using Javascript, make sure that you have an id set in the object and embed tags for the embed script. To call a function, use the format "window.document.flashObject.playTrack()"

For example:

<a href="javascript:window.document.flashObjec.playTrack();">Click to Play </a> <div id="flashcontent">

	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="488" id="flashObject" align="middle">
		<param name="movie" value="xspf_jukebox.swf?playlist_url=playlist.xspf&skin_url=skin&loadurl=variables.txt" />
		<param name="wmode" value="transparent" />
				<embed src="xspf_jukebox.swf?playlist_url=playlist.xspf&skin_url=skin&loadurl=variables.txt" wmode="transparent" width="300" height="488" name="flashObject" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>

</div>

<script type="text/javascript"> <!-- var so = new SWFObject("xspf_jukebox.swf?playlist_url=playlist.xspf&skin_url=skin&loadurl=variables.txt", "flashObject", "300", "488", "7", "#ffffff", true); so.addParam("wmode", "transparent"); so.write("flashcontent"); window.document.flashObject.focus();

</script>

  • “playlist_url” can be used inside “variables.txt” instead of being loaded in this script

Alternative Joomla music component:

http://extensions.joomla.org/extensions/e-commerce/shopping-cart/6057


top

Understanding Joomla 1.5 Template Positions

This is the Joomla 1.5 version of the Understanding Joomla Template Positions article for Joomla 1.0.x

Joomla 1.5 Templates

New users of Joomla tend to find template module positions confusing and possibly frustrating. Joomla 1.5 has improved the way templates work to ensure this is less confusing, however some users might still find it hard to add template positions to their templates. This article will attempt to clear the air about template module positions.

Module Positions In the Joomla 1.5 Module Manager ( Extensions > Module Manager, you can assign your modules to a number of positions. As opposed to Joomla 1.0, where positions where defined at website level, the positions in Joomla 1.5 are defined per template. Thus the template positions problems is reduced, and responsibility is now with the template author to ensure that template positions defined in the template details file, actually exist in the template!

If you require additional template positions, you would need to change your template to cater for the additional positions you need. Obviously, this requires knowledge of PHP, HTML and XML in order not to break your template.

Also note that you can usually add more than one module to the same position i.e. you can add more than one modules to your left and right positions, with the order in which they are displayed being determined by the Order parameter in the Module setup.

Also note that in some poorly written templates the module positions do not agree exactly with the name given to the position (e.g. user position shows up at the bottom). It is up to the author of the template and the Joomla webmaster to understand where the module will be rendered by testing different module positions, and if necessary changing the name in the template code. Please be sure that you always take backups and know exactly what you are doing before changing any template files.

The JDOC tag So what determines where modules are rendered. The JDOC tag in the index.php file is replaced by the modules assigned to that position (via Extensions > Module Manager and assigning to a particular position) when the page is being rendered. So if we have

<jdoc:include type="modules" name="left" style="xhtml"/>

in the index.php file, and the Main Menu module is assigned to the left position, the Main Menu will be displayed instead of this tag. This applies to each jdoc tag defined in the index.php file. If I have a <jdoc:include type="modules" name="right" style="xhtml"/>, this will be replaced by the modules which are assigned to the right position.

Logical Position Names The name attribute in the jdoc tag, is a logical name. It is entirely possible to define the bottom position in the top part of the module, though typically template designers define tag names which make sense, i.e. the left position would eventually be displayed in the left area of the page, and the banner position would be displayed just above the content and so on.

How do I know what Positions my Template supports? Typically, with serious template designers they explain which module positions are available in the template. In Joomla 1.5, the responsibility remains with the designer to define the correct positions in the template details file. However, for free templates, one might not know which positions actually exist. So how do you go about discovering which positions are supported by the template?

Simple open the template's index.php file, and search for the jdoc tag. Note the name of the places when the jdoc tag appears. I.e. if you find the following tags in the index.php file:

   <jdoc:include type="modules" name="top" style="xhtml" /> 

...

   <jdoc:include type="modules" name="left" style="xhtml" /> 

  ... 

<jdoc:include type="modules" name="banner" style="xhtml" />

....

   <jdoc:include type="modules" name="right" style="xhtml" /> 

You can safely assume that the positions supported by your template are:

top left banner right Adding Module Positions In this section I will show briefly how to create an new module position in any template.

You first need to decide where you are going to place the position in your template (in terms of the template's HTML). You need to understand exactly how the tempalate works. For example we will be adding an adlinks position to my template (to insert Google AdSense adlinks code). We find the position (in the index.php) file where we want to add the adlinks and insert php / html code similar to the following:

<!-- BEGIN: adlinks -->

  <div id="adlinks"> 

   <div class="adlinks-class">
    <jdoc:include type="modules" name="adlinks" style="xhtml" />
   </div>    

 </div>
  <!-- END: adlinks -->  

 We then need to create the Module Position in the Template Details file by creating a new adlinks position. Find the TemplateDetails.xml file enclosed with you template under /templates/<templatename>/templateDetails.xml 

Find the <positions> tag in your XML file. It looks something like this:

<positions>

      <position>left</position>
      <position>right</position>
      <position>top</position>
      <position>banner</position>
      <position>header</position>
      <position>footer</position>
      <position>pathway</position>
      <position>user1</position>
      <position>user2</position>
      <position>user3</position>
      <position>user4</position>
      <position>user5</position>
      <position>inset</position>
      <position>debug</position>
      <position>search</position>
      <position>debug</position>

</positions>

To add your own position, you need to insert a new <position> tag before the closing positions tag. The end result will be as follows:

<positions>

      <position>left</position>
      <position>right</position>
      <position>top</position>
      <position>banner</position>
      <position>header</position>
      <position>footer</position>
      <position>pathway</position>
      <position>user1</position>
      <position>user2</position>
      <position>user3</position>
      <position>user4</position>
      <position>user5</position>
      <position>inset</position>
      <position>debug</position>
      <position>search</position>
      <position>debug</position>
      <position>adlinks</position>

</positions>

Once this is done, we can now assign a module to the adlinks position in the Extensions > Module Manager page.

To quickly identify quickly template positions in your template, take a look at the following tip. http://www.dart-creations.com/joomla/joomla-tips-and-tricks/42-finding-your-joomla-template-positions.html

More information on how Joomla 1.5 templates work can be found in the 1.5 template Wiki page: http://docs.joomla.org/New_features_introduced_in_Joomla!_1.5_templates

So you want a good looking template? If you really want to look professional, stop searching for those free templates. Most of them look poor, are very limited in positions and flexibility, have bugs, and typically contain hidden links to the original designers. If you want your site to look great, go to the pros and get yourself a template from there. You won't be sorry, and the end result will definetely show. The first impression of a website is obviously from the template, and you really want to get the first impression right!

Template Designers Joomlart Our template (JA Pollux) was bought from JoomlaArt club. The good thing about this club is that you can subscribe to buy a 3 month membership. During this time you can download and try as many templates as you like. Also, Joomlart claim that they release at least 1 new template each month.


top

Suppression répertoire Joomla

Comment (re)obtenir la propriété sur un répertoire, afin que je puisse le modifier voire le supprimer ? Si un répertoire a été créé via PHP (par Joomla par-exemple, ou un autre CMS, script, etc.), il est fort possible que vous n'ayez plus la possibilité d'intervenir dessus (le supprimer par-exemple) et il vous faudrait idéalement en redevenir propriétaire.

Dans ce cas, suivez la procédure ci-dessous: Il faut vous connecter sur votre console d'administration, puis aller dans "FTP" > "Gestionnaire de fichiers" et vous connecter avec votre login et mot de passe FTP. Ensuite, il faut naviguer dans l'arborescence de votre site jusqu'au(x) fichier(s) concerné(s). Pour finir, dans la colonne "Propriétaire" vous verrez "httpd", il faut simplement cliquer sur le petit logo à droite de "httpd" et vous redeviendrez propriétaire du dossier ou fichier.

Voici une procédure : Créez un fichier .php vide (par-exemple, "fix.php").

Remplissez ce fichier avec le script que vous trouverez en fin de cette FAQ ci-dessous (copiez-collez le code).

Envoyez-le sur votre serveur, par FTP.

Exécutez-le, en tapant l'adresse complète du fichier (par-exemple: "http://www.domaine.com/fix.php")

Vous aurez alors la possibilité de naviguer dans l'arborescence de vos répertoires (au même niveau et vers le bas depuis le répertoire dans lequel vous placez le script), et vous pourrez cliquer sur FIX à droite des répertoires posant problèmes.

<? $base = getcwd(); $script = $_SERVER["SCRIPT_NAME"]; $rep = $_GET["rep"]; $action = $_GET["action"]; $uid = posix_getuid();

if (!preg_match("/\/$/", $rep)) {

    $rep .= "/";

}

$dir = $base . $rep;

function recurse_chmod($dir) {

    if (!preg_match("/\/$/", $dir)) {
        $dir .= "/";
    }
    echo "<i>chmod 02777 $dir</i><br />\n";
    chmod($dir, 02777);
    $dh = opendir($dir);
    if ($dh) {
        $dirs = array();
        while (($file = readdir($dh)) !== false) {
            if (($file == ".") || ($file == "..")) {
                continue;
            }
            if (filetype($dir . $file) == "dir") {
                array_push($dirs, $file);
            }
        }
        closedir($dh);
    }
    foreach ($dirs as $file) {
        recurse_chmod($dir . $file);
    }

}

if ($action == "fix") {

    if (is_dir($dir)) {
        recurse_chmod($dir);
    }
    $rep = dirname($rep) . "/";

}

$dir = $base . $rep;

echo "<h1>$rep</h1>\n";

echo "<p>\n"; echo "<a href=\"$script?rep=" . dirname($rep) . "\">..</a><br />\n";

if (is_dir($dir)) {

    $dh = opendir($dir);
    if ($dh) {
        $files = array();
        $dirs = array();
        while (($file = readdir($dh)) !== false) {
            if (($file == ".") || ($file == "..")) {
                continue;
            }
            if (filetype($dir . $file) == "dir") {
                array_push($dirs, $file);
            } else {
                array_push($files, $file);
            }
        }
        closedir($dh);
        sort($files, SORT_REGULAR);
        sort($dirs, SORT_REGULAR);
        foreach ($dirs as $file) {
            echo "<a href=\"$script?rep=$rep$file\">$file</a>";
            if (fileowner($dir . $file) == $uid) {
                echo " <a href=\"$script?rep=$rep$file&action=fix\">[FIX]</a>";
            }
            echo "<br />\n";
        }
        foreach ($files as $file) {
            echo "$file";
            echo "<br />\n";
        }
    }

} echo "</p>\n";

?>


top

Erreurs lors de l'installation de modules Joomla

Step 1 : in global configuration disable FTP !!!!

If this works out, forget the following lines ;-)

From infomaniak FAQ: Que faire si j'obtiens des erreurs mentionnant mkdir ou open_basedir ? Lors de l'installation de nouveaux modules, notamment avec Joomla 1.5.x, vous rencontrez peut-être des problèmes de permissions. Prenez ...(suite) Lors de l'installation de nouveaux modules, notamment avec Joomla 1.5.x, vous rencontrez peut-être des problèmes de permissions.

Regardez si effectivement vous utilisez des chemins absolus dans le fichier de configuration notamment (configuration.php).

La solution relative ($chemin = $_SERVER["DOCUMENT_ROOT"] . "/mondossier/";) semble ne pas fonctionner pour Joomla car Joomla ne prend pas en compte ce chemin.

Donc pour l'écrire relativement, il faut écrire

  var $log_path = '/log/'; 
  var $tmp_path = '/tmp/'; 

dans le fichier de configuration.

Nous vous conseillons également de désactiver le FTP de Joomla soit par le fichier de configuration soit par l'interface /administrator.

Joomla! 1.5: Warning! – Failed to move file

Login to your joomla administrator panel.

go to Help->System Info then click on Directories Permissions Tab and check which directories are still unwriteble, just set the permission/CHMOD to 777 of those directories which are unwriteable through ftp access. Now install any component/module it will works 110%.

ran into this problem while testing the latest version of ionFiles (4.5 Public beta 2) on several test servers. One produced this error: “Warning! – Failed to move file” during the component installation. The problem was that Apache was running as nobody but everything in the public directory was owned by a different user. Permissions were set to 755 so they could be read, but not write/modified.

Solution

1) Change the permissions of your tmp directory in your root Joomla installation path. Set it to 777 766. OR 2) Change the owner/group of folder to the apache user.

=> The recommended permission for directories in Joomla is 755 - http://docs.joomla.org/What_are_the_recommended_file_and_directory_permissions%3F

Increasing the tmp folder to 777 means you've only added the ability to write for all users and groups. While that may sound insecure, it only means users of the system can access that directory with full privs. Therefore, running on a private system with no other system users, 777 for a tmp directory is fine. Not to mention, your system default /tmp directory is 777:

drwxrwxrwt 34 root root 4096 Jul 8 09:18 tmp

You could use 757 or 766 instead which will prevent execution (this is probably better than my stated 777 above). I've also added a second option, if your account has the ability to change owner and group (most do not).

You can also change your temp folder in global configuration / server and move it outside of the public view, if you are worried about that. You may even be able to use the root /tmp folder, however, some servers will block PHP access outside of the homedirectory with PHP Openbase_dir.

To comment on the FTP layer..... FTP transmits passwords using clear text. In business audits for networked systems you are not even allowed to use FTP to connect to any minor business network for this reason. You are basically blasting your account password across the web to anyone that has a sniffer.


top

Backup / Restore a Joomla Site

http://joomlapack.net/


top

Add Google Calendar to your Joomla site

http://extensions.joomla.org/extensions/calendars-a-events/calendars/1625


top

Update Joomla! version

http://forum.joomla.org/viewtopic.php?f=532&t=342669&start=0