Adding a module position in a Joomla 1.5 template is not as easy as it was in the 1.0 templates. It is a two step process:

1. Add code to template PHP file.

For example, this would go in the index.php file in the template folder - or if you are adding it in an include file.

<?php if ($this->countModules('user6')) : ?>
    <div>
        <jdoc:include type="modules" name="user6" style="xhtml" />
    </div>
<?php endif; ?>

2. Add module name to templateDetails.xml

You then need to tell Joomla which module positions are available in this template. If you don’t do this step, then Joomla will not present the module position when giving you the option of where to place a module.

templateDetails.xml is in XML format. Within the <install> namespace, add this:

<positions>
      <position>user6</position>
</positions>

If you already have positions listed, just add the <position>user6</position> part along with the rest of them.

I use MediaCoder for most of my encoding/transcoding of video for playback on my PC and other devices. The N800 has a peculiar set of parameters for it’s video - if it doesn’t match up then it either won’t play back or will be very choppy.

I ended up selling the N800 but I thought I would pass this profile along to anyone who might use it.

<?xml version="1.0" encoding="UTF-8"?>
<MediaCoderPrefs>
  <node key="overall">
    <node key="generic">
      <node key="autoRevert">
        <value>Never</value>
      </node>
    </node>
    <node key="ui">
      <node key="optionTab">
        <value>3</value>
      </node>
      <node key="param">
        <value>1069,767,47,50</value>
      </node>
      <node key="noWelcome">
        <value>4068</value>
      </node>
    </node>
    <node key="task"/>
    <node key="output"/>
    <node key="tagging"/>
    <node key="subtitle"/>
    <node key="decoding"/>
    <node key="audio"/>
    <node key="video">
      <node key="format">
        <value>XviD</value>
      </node>
    </node>
    <node key="container">
      <node key="format">
        <value>AVI</value>
      </node>
    </node>
    <node key="mplayer"/>
    <node key="preview"/>
    <node key="plugin"/>
    <node key="presets"/>
    <node key="httpd"/>
    <node key="server"/>
  </node>
  <node key="audiosrc">
    <node key="mplayer"/>
    <node key="winamp"/>
    <node key="lame"/>
    <node key="wavefile"/>
  </node>
  <node key="audioenc">
    <node key="lame"/>
    <node key="vorbis"/>
    <node key="faac"/>
    <node key="aacplus"/>
    <node key="nero"/>
    <node key="helix"/>
    <node key="helixmp3"/>
    <node key="fraunhofer"/>
    <node key="speex"/>
    <node key="musepack"/>
    <node key="ffmpeg"/>
    <node key="aac3gpp"/>
    <node key="amr"/>
    <node key="wavpack"/>
    <node key="flac"/>
    <node key="ape"/>
    <node key="tta"/>
    <node key="als"/>
    <node key="ofr"/>
    <node key="pcm"/>
    <node key="cli"/>
  </node>
  <node key="videosrc">
    <node key="mplayer"/>
    <node key="avisynth"/>
  </node>
  <node key="videoenc">
    <node key="xvid"/>
    <node key="x264"/>
    <node key="mencoder"/>
    <node key="ffmpeg"/>
    <node key="theora"/>
    <node key="dirac"/>
    <node key="amv"/>
    <node key="vfw"/>
    <node key="dumper"/>
    <node key="wm"/>
    <node key="remote"/>
  </node>
  <node key="container">
    <node key="mp4box"/>
    <node key="matroska"/>
    <node key="mencoder"/>
    <node key="mp4creator"/>
    <node key="atom"/>
    <node key="pmp"/>
    <node key="vcd"/>
  </node>
  <node key="audiofilter">
    <node key="resample"/>
    <node key="equalizer"/>
    <node key="channels"/>
    <node key="volume"/>
    <node key="surround"/>
    <node key="compressor"/>
    <node key="delay"/>
    <node key="extraStereo"/>
    <node key="extra"/>
    <node key="shibatch"/>
  </node>
  <node key="videofilter">
    <node key="scale">
      <node key="enabled">
        <value>true</value>
      </node>
      <node key="width">
        <value>352</value>
      </node>
      <node key="height">
        <value>288</value>
      </node>
    </node>
    <node key="crop"/>
    <node key="expand"/>
    <node key="frame"/>
    <node key="eq"/>
    <node key="postproc"/>
    <node key="rotate"/>
    <node key="itf"/>
    <node key="denoise"/>
    <node key="unsharp"/>
    <node key="delogo"/>
    <node key="screenshot"/>
    <node key="thumb"/>
    <node key="extra"/>
  </node>
</MediaCoderPrefs>

You can also download the file here: N800.xml

If you upload those new fancy-shmancy file formats to your web server - namely .docx, .pptx and .xlsx - and you are running Apache; chances are that your web server doesn’t know how to serve those files because they are unknown file formats. Your browser may try to download them as a .zip file (IE) or just display the binary format (Firefox) which ends up looking like jibberish with some XML data.

It’s relatively easy to fix this problem, you just need to tell apache how to handle those files.

Find the file mime.types, this may be in /etc/ or in /etc/httpd/conf/.

Add the following line to this file:

application/vnd.openxmlformats docx pptx xlsx

In one line:

echo "application/vnd.openxmlformats docx pptx xlsx" >> /etc/httpd/conf/mime.types

Restart both Apache and your web browser. Clearing the cache doesn’t work (I learned the hard way :))

Your file should now be downloaded properly to your PC.

  • Welcome to systemBash, a technology and system administration blog by David Drager. If you enjoy this sort of content, can can subscribe to the RSS using the link to the right.