Author Topic: Documentation - mod_sobi2simplefeatured (Joomla 1.5.x only)  (Read 46369 times)

0 Members and 2 Guests are viewing this topic.

Offline aboututila


Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

JavaScript Effects
(Only available with PRO version)
A 'sneak preview' of this module operating with JavaScript Effects enabled can be seen at http://test.aboututila.com/sobi2

In this Section
Description
General Description
Technical Description
Performance Issues
Joomla Caching Issues
Also see Module Configuration: Output Controls - JavaScript Effects (PRO version Only)
Also see JavaScript Effects - CSS styling.

Description
This module can optionally implement JavaScript effects based on the mootools JavaScript used by Joomla. The custom JavaScript used by the module is compatible with both mootools v1.11 (as used in Joomla 1.5.x) and mootools 1.2.x (planned for Joomla 1.6)

General Description
With JavaScript Effects enabled, instead of displaying all Selected Entries output by the module at the same time, the Entries are displayed one after the other in a 'viewing window' in the module position. This is advantageous if you want to display several selected Entries, but do not want to use a lot of 'on-screen' space.

The 'viewing window'.
In the example above, the Module has a blue border with Module Title shown. The 'viewing window' has a background color of 'pale blue'.

Below the 'viewing window' optional Controller 'buttons' can be displayed.

The Controller 'buttons' (highlighted in red)

With JavaScript Effects enabled, each Selected Entry to be displayed will 'transition' into the 'viewing window'. The transition type, direction, speed, duration, etc, of how each entry transitions into the 'viewing window' is configured in the module parameters.

There are two main types of transitions - Slide and Fade.

Fade
With 'Fade' enabled, each Entry gradually fades into the 'viewing window'  (increases opacity/decreases transparency) while the previous Entry fades out of view  (decreases opacity/increases transparency).

Slide
With the 'Slide' Effect enabled each Entry will move across the 'viewing window' and then stop in the location where the Entry would have been displayed if there was only one Entry to be displayed and the JavaScript Effects were disabled.

The manner is which each Entry will move is configured in both the 'Slide Direction" and 'Transition Type' parameters.
Slide Directions can be configured as 'From Left to Right', 'From Right to Left', 'From Top to Bottom' and 'From Bottom to Top'.
Transition Type can be configured as 'Linear', 'Bouncy', 'Elastic', etc.
(Refer http://www.mootorial.com/wiki/mootorial/06-fx/03-fx.transitions for details and demos of possible transition types)

The speed at which the Entry moves into it's final position is configured in the module parameter 'Transition Speed'.

The time the Entry remains in it's final position before the next Entry begins to transition into view is configured in the module parameter 'Transition Pause'

If the Effect is in 'Auto Transition' mode, each Entry will automatically transition into the 'viewing window'.

If a user moves their mouse over an Entry displayed in the 'viewing window', then the transitions will stop until the user moves their mouse to another position on the screen. This is the default behavior, but can be changed in the module parameter 'Pause Transition on mouse-over'.

The Controller 'Buttons'
The module can optionally display two Controller 'Buttons', NEXT and PREVIOUS 'Buttons'. If you have 'Auto Transition' = No and 'Pause Transition on mouse-over' = No, then you must display these buttons otherwise there is no mechanism for Users to display more than the first selected Entry.

The two Controller 'Buttons' are output as <a id="go-next">NextButtonText</a> and  <a id="go-prev">PreviousButtonText</a> where NextButtonText and PreviousButtonText are defined in the module parameters. If you want to use an image instead of text, then set the parameter 'Use Text 'Buttons'' = No, and then add the appropriate CSS Styling to your Site Template to style the 'Button' anchors <a id="go-next"></a> and <a id="go-prev"></a> with your custom background images.

Technical Description
The JavaScript Effects are achieved by;
  • loading the JavaScript file MyJoomlaInstallation/modules/mod_sobi2simplefeatured/javascript/effects.js
  • loading the CSS file MyJoomlaInstallation/modules/mod_sobi2simplefeatured/css/effects.css
by including the tags
<link rel="stylesheet" href="MyJoomlaInstallation/modules/mod_sobi2simplefeatured/css/effects.css" type="text/css" media="screen"  />
<script type="text/javascript" src="MyJoomlaInstallation/modules/mod_sobi2simplefeatured/javascript/effects.js"></script>
<script type="text/javascript" src="/media/system/js/mootools.js"></script>
in the document HTML <head></head> section.

The file 'effects.js' contains a custom JavaScript Class which in turns uses Joomla mootools classes.
The file 'effects.css' contains the minimal CSS styling necessary for the effects to function.

When JavaScript Effects are enabled,
the module outputs;
  • an additional 'Effects' HTML division,
    <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;"></div>
    where
    xxx is the unique Module ID number as shown by Joomla Administrator->Module Manager, and,
    yyy is the 'viewing window' height set in the module parameter 'Window Height (px)'
    A unique Module ID number is required so that multiple copies of the module can be output by Joomla in the same document, each with different module parameter configurations.

    This <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;"></div> acts as the 'viewing window'.
    The JavaScript initializes this division with the CSS properties overflow:hidden;position:absolute;top:0;left:0;opacity:0;

  • An additional <div class="Entries-Wrapper"> containing the individual Selected Entries <div class="entry"> divisions normally output by the module.  The module 'effects.css' file sets the <div class="Entries-Wrapper"> and its contents to visibility:hidden;position:absolute;.

  • An additional CSS Selector class, Entry-Effects-ID-xxx is added to each <div class="entry">
    where
    xxx is the unique Module ID number as shown by Joomla Administrator->Module Manager
    This additional class is required so that different JavaScript Effects can be applied to different module positions.

When the document HTML is loaded;
  • the Entry content wrapper HTML divisions <div class="entry"> are hidden.

  • the JavaScript initially cycles through each Entry content wrapper, <div class="entry">, and 'injects' the contents of the division into the 'viewing window' division <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;"></div>

    The method of 'injection' is defined by the 'Transition' parameters in the module configuration. The Transition is achieved by manipulating the appropriate CSS properties of <div class="entry"> in order to achieve the transition.

    At the same time, the JavaScript moves the previous Entry out from the 'viewing window'.

  • For example:
    if the Transition was set to 'Slide right to left' and the Transition Time was set to Fast (3,000 msecs),
    then
    (i) the JavaScript would start by positioning <div class="entry"> 'outside the 'viewing window',
    (by setting left:xxxpx on <div class="entry">
    where
    xxx is greater than the pixel width of <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;>") ,

    (ii) then the JavaScript gradually reduces the position left:xxxpx on the <div class="entry"> down to zero at the rate of 30 times per second (the default mootools frame rate for transitions),
    which will cause the Entry <div class="entry"> to 'slide' into view from the right hand side of the <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;> containing division.

    (iii) At the same time the JavaScript is moving the Next Entry <div class="entry"> into the 'viewing window', it is moving the Previous Entry out of the 'viewing window' by decreasing the left:xxxpx position of the Previous Entry <div class="entry"> from zero to a negative number greater than the width of <div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;>

Performance Issues
The JavaScript Effects utilize resources on the Client System to process the JavaScript.
The amount of resources used on the Client System can be reduced by;
  • Limiting the number of module copies with JavaScript Effects enabled on any given 'page'.
  • Setting 'Transition Speed' to faster speeds.
  • Increasing 'Transition Pause' to a longer delay time.

Joomla Caching Issues
Joomla 1.5.x Module Caching has a known 'flaw' in that, if Module Caching is enabled using Joomla Global Caching (See module Advanced Parameters - Module Cache Control), Joomla does not output any module custom <head></head> tags used by the module.
The tags;
<link rel="stylesheet" href="MyJoomlaInstallation/modules/mod_sobi2simplefeatured/css/effects.css" type="text/css" media="screen"  />
and
<script type="text/javascript" src="MyJoomlaInstallation/modules/mod_sobi2simplefeatured/javascript/effects.js"></script>
and since 'effects.js' also requires Joomla's mootools, the tag
<script type="text/javascript" src="/media/system/js/mootools.js"></script>
need to be output in the document <head></head> tags for the JavaScript Effects to function.

Unfortunately, the only way around this problem is for these tags to be loaded by the Site Template when module JavaScript Effects and Joomla Global Caching are enabled.
The most appropriate way to do this is to add the following php code anywhere in your Site Template;
Code: [Select]
<?php
# if mod_sobi2simplefeatured JavaScript Effects and Joomla Global caching are enabled
# Make sure Joomla mootools are loaded on every page
JHTML::_('behavior.mootools');
# Output mod_sobi2simplefeatured Custom Header Tags
$this->addStyleSheet(JURI::root().'modules/mod_sobi2simplefeatured/css/effects.css','text/css','screen');
$this->addScript(JURI::root().'modules/mod_sobi2simplefeatured/javascript/effects.js');
?>
Note: the above Site Template commands ensure that the tags are only loaded once into the document <head></head> section.

« Last Edit: 11. November 2010, 19:36:22 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile


Offline aboututila


Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

JavaScript Effects - CSS Styling

(This posting is in the process of being updated in advance of the release of  v2.0.7)


It is strongly recommended that you read mod_sobi2simplefeatured - CSS Styling before continuing with this section.
You will need a basic understanding of CSS to proceed.
w3schools.com CSS provides an excellent introduction to CSS.
Refer CSS Reference for more information.
This section assumes the reader has a basic understanding of how to modify the CSS in the Joomla site Template(s).
Refer Joomla Template Tutorial for more information.

In order to determine how to specify/design the module CSS for your site Template(s), it is probable easiest to install the module, enable the Effect, and then view the resulting HTML from the Joomla front-end. This is recommended because the form of the HTML output by the module is variable (dependent on several of the module configuration settings).
When viewing the resulting HTML, the mod_sobi2simplefeatured output can be located by looking for the HTML between the HTML comments;
<!-- Start Module mod_sobi2simplefeatured version information-->
<!-- End Module mod_sobi2simplefeatured -->


When JavaScript Effects are enabled,
the Module loads the CSS file {MyJoomlaInstallation}/modules/mod_sobi2simplefeatured/css/effects.css
This CSS file contains the minimal CSS required by the module for JavaScript Effects and has all the available CSS Selectors declared, even if no CSS properties have been set for these CSS Selectors.
The contents of the Module CSS file can be overriden by the Site Template(s).

The module outputs the 'normal' HTML for each selected Entry with the standard module CSS Selectors (Refer CSS Styling), but when JavaScript Effects are enabled, the module adds an additional CSS Selector class Entry-Effects-ID-xxx to each <div class="entry">, such that this division becomes <div class="entry Entry-Effects-ID-xxx">
where
xxx is the unique Module ID number as shown by Joomla Administrator->Module Manager
This additional class is required so that different JavaScript Effects can be applied to different module positions.

So that the 'normal' HTML for each selected Entry is not visible when the page/document is initially loaded, the Module wraps the 'normal' HTML for each selected Entry with the division <div class="Entries-Wrapper"> and {MyJoomlaInstallation}/modules/mod_sobi2simplefeatured/css/effects.css sets the CSS for this division as follows;
div.Entries-Wrapper {visibility:hidden;position:absolute;}
hiding this division and it's contents from view.

The JavaScript then cycles through each <div class="entry Entry-Effects-ID-xxx"> and injects/writes this division and it's contents into the 'viewing window' division.

The 'viewing window' division
A 'viewing window is output by the module as;
<div id="Effect-Module-ID-xxx" class="Effects-Wrapper" style="height:yyypx;"></div>
where
xxx is the unique Module ID number as shown by Joomla Administrator->Module Manager, and,
yyy is the 'viewing window' height set in the module parameter 'Window Height (px)'
A unique Module ID number is required so that multiple copies of the module can be output by Joomla in the same document, each with different module parameter configurations.

The JavaScript initializes this division with the CSS properties overflow:hidden;position:absolute;top:0;left:0;opacity:0;
 
The Controller 'Buttons'
If the Controller 'Buttons' are enabled (Refer Output Controls - JavaScript Effects - Display Controller) the module optionally output a Controller 'Button' division of the form;
<div class="Effects-Controller">
 <div class="Buttons">
  <a id="go-prev" href="javascript:void(0)">OptionalPreviousButtonText</a>
  <a id="go-next" href="javascript:void(0)">OptionalNextButtonText</a>
 </div>
</div>


Example:
if the Joomla assigned ID number of the module = 60
if the Parameter - Window Height (px) = 175
if the Parameter - Display Controller = Yes
if the Parameter - Use Text 'Buttons' = Yes
if the Parameter - Next 'Button' = Next
if the Parameter - Previous 'Button' = Previous
then the form of the HTML Output will be;

<!-- Start Module mod_sobi2simplefeatured ...
  .
  .
  .
<div id="Effect-Module-ID-60" class="Effects-Wrapper" style="height:175px;"></div>
<div class="Effects-Controller">
 <div class="Buttons">
  <a id="go-prev" href="javascript:void(0)">Previous</a>
  <a id="go-next" href="javascript:void(0)">Next</a>
 </div>
</div>
<div class="Entries-Wrapper">
  <div class="entry Entry-Effects-ID-60">
     Entry HTML output
  </div>
   .
   .
   .
</div>
  .

<!-- End Module mod_sobi2simplefeatured -->
     
Note: the height in-line style will override any CSS include by the module or the Site Template(s).

Experiment with the styles settings in {MyJoomlaInstallation}/modules/mod_sobi2simplefeatured/css/effects.css
Note: a:link, a:visited, a:hover and a:active Pseudo Classes for the Controller 'Buttons' have not been included in effects.css, but you can always add them.


« Last Edit: 19. September 2009, 19:58:27 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - SOBI2 Clones
« Reply #12 on: 08. August 2009, 17:21:37 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

SOBI2 Clones

mod_sobi2simplefeatured can be modified to work with clones of the SOBI2 Component.
To modify mod_sobi2simplefeatured to work with SOBI2 clones;

  • Unpack the mod_sobi2simplefeatured installation zip file to an empty directory

  • In all *.php and *.xml files;
    using CASE-SENSITIVE find and replace,
    change all occurrences of the string;
    (a) sobi2 to myclone
    (b) SOBI2 to MYCLONE

    where 'myclone' is the name of your SOBI2 clone.

  • rename the files mod_sobi2simplefeatured.php, mod_sobi2simplefeatured.xml and en-GB.mod_sobi2simplefeatured.ini
    changing all occurrences of the string;
    (a) sobi2 to myclone
         where 'myclone' is the name of your clone

  • re-zip all the files into a new zip file

  • Install module as normal

« Last Edit: 10. August 2009, 21:17:33 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Warranty and Support
« Reply #13 on: 08. August 2009, 17:37:19 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Warranty and Support

I will attempt to respond to any questions related to errors/bugs with this Module, but this module works without errors on my site.
Unfortunately I do not have the spare time to answer any questions related to;
  • Joomla Administrator functions - installing, configuring, copying Modules.
  • CSS styling - these instructions assume you are competent in writing CSS and modifying/adding to your site Templates.

Module Enhancements
Please feel vote on or suggest Module Enhancements and new features at our New Features Poll

Bugs and Errors
Please post Bugs and Error reports to the Bugs and Errors Reports posting.

« Last Edit: 10. August 2009, 21:18:43 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Sample Screen Shots
« Reply #14 on: 08. August 2009, 18:17:39 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Sample Screen Shots

The following are a sample screen shot(s) of the type of output that can be created with mod_sobi2simplefeatured.


Example above shows; 3 instances of Module, side-by-side, each with Module Parameter 'Limit'=1. CSS Styling: float:left; on each <div class="moduletableModuleClassSuffix">, Joomla Module Title in white on green background, SOBI Entry Title in blue on orange background, other fields on pale yellow background. Displaying SOBI standard data fields; Title and Icon. Displaying SOBI custom data fields without labels; field_price, field_brief_description. Displaying Module Parameter 'Text Link to Details View' = More Information. 'More Reduced in Price Listings' button created in module parameter 'Post Text'.


Example above shows; 1 instance of Module with Module Parameter 'Limit'=6. Displaying Joomla Module Title. CSS Styling with float:left; on <div class="entry">. Displaying SOBI standard data fields; Title and Icon. Displaying SOBI custom data fields with labels; field_selling_price, field_current_mileage, field_transmission_type, field_fuel_type, field_first_registration_date.


Example above shows; 1 instance of Module with Module Parameter 'Limit'=3. CSS Styling: Joomla Module Title in white on green background, SOBI Entry Title in blue on orange background, other fields on pale blue background. Displaying SOBI standard data fields; Title and Icon. Displaying SOBI custom data fields; field_price, field_brief_description. Displaying Module Parameter 'Text Link to Details View' = More Information.

« Last Edit: 11. November 2010, 19:41:01 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Demo Sites
« Reply #15 on: 08. August 2009, 19:32:08 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Demo Sites

A 'true' Demo site with access to the Administrator 'back-end' is not yet available.


** If you wish to have your site added/removed from the list above, please let me know **

« Last Edit: 26. January 2010, 20:16:59 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Quick Start Guide
« Reply #16 on: 08. August 2009, 19:43:31 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Quick Start Guide

  • Check that this Module is compatible with your Joomla installation.
    Refer Compatibility

  • Install the Module, but do not configure or publish/enable it at this stage.
    Refer mod_sobi2simplefeatured Installation Instructions, if you do not know how to do this.

  • Go to: Joomla Administrator->SOBI2 Component->Custom Fields Manager

    Create a new Custom Field with;
    Field Name = field_featured
    Field Type = checkbox
    Save the changes.

  • Edit some of your SOBI2 Entries, so that the field 'field_featured' is checked.
    (this sets the field to the value '1')
    Save the changes.

  • Go to: Joomla Administrator->Module Manager


  • Select the mod_sobi2simplefeatured Module and open it for Editing.


  • Configure the Details and Menu Assignment parameters as usual.
    (make sure you remember to configure Enabled: = Yes)


  • Configure Module Parameters - Module Parameters - SOBI2 Entry Selection

    as above;
    (i) For the parameter 'Select Entries where Custom Field',
        Select 'field_featured' from the drop-down list.
    (ii) for the parameter 'contains a value',
         Select 'Equal to'
    (iii) for the parameter 'the Value',
         Enter the number 1.

    Save the changes.

  • The module will now display those SOBI2 Entries where 'field_featured' is checked.

The Module has a lot more flexibility and capability than the simple usage described above. It is recommended you read and understand the Module Configuration Instructions.

« Last Edit: 11. November 2010, 19:44:58 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Upgrading
« Reply #17 on: 08. August 2009, 20:50:42 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Upgrading

Upgrading from a previous version of mod_sobi2simplefeatured

  • Uninstall the previous version of the Module, by
    Go to: Joomla Administrator->Extensions->Install/Uninstall->Modules
    Locate mod_sobi2simplefeatured from the list displayed
    Check it, and then click on 'Unistall'

  • Install the updated version of mod_sob2simplefeatured, by
    Go to: Joomla Administrator->Extensions->Install/Uninstall
    Download and install the module package mod_sobi2simplefeatured zip file in the normal manner.

  • Do not forget you will need to Configure the Module again.
    (Joomla does not save Module Configuration Parameters when a Module is uninstalled)

Upgrading from mod_sobi2featured (Joomla 1.0.x)

mod_sobi2simplefeatured (Joomla 1.5.x only) is essentially a 'new' and different module from the original 'mod_sobi2featured' (Joomla 1.0.x).

You can have the both installed together on your Joomla system.
(assuming your Joomla installation meets the Minimum System Requirements for both modules).
If you have CSS Styling for mod_sobi2featured in your Site Template, you will probably need to create new/additional CSS styling for mod_sobi2simplefeatured,
but since mod_sobi2simplefeatured uses the same CSS Class Selectors as mod_sobi2featured, this should not be too difficult.

Note: Why has the module type name been changed?
The module type name has been changed from mod_sobi2featured to mod_sobi2simplefeatured since the original module name 'mod_sobi2featured' was very similar to the commercial SOBI2 Featured Listings plug-in Module name 'mod_sobi2_featured'. For Joomla 1.5.x I have changed the Module name to 'mod_sobi2simplefeatured' to avoid confusion for Administrators with both modules installed.

Note:
mod_sobi2featured will continue to be supported, but not developed.
mod_sobisimplefeatured will continue to be supported and developed.

« Last Edit: 10. August 2009, 21:28:28 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Languages
« Reply #18 on: 08. August 2009, 21:06:35 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Languages
In this Section
Configuring mod_sobi2simplefeatured when using a SOBI2 language other than English
To create a Module language translation

mod_sobi2simplefeatured is compatible with SOBI2 Languages.
mod_sobi2simplefeatured is compatible with Joomla v1.5.x language files (module language packs possible)

mod_sobi2simplefeatured.xml displays SOBI2 Custom Field names from the English language in the Module Configuration Custom Fields 'drop-down' lists.
en-GB.mod_sobi2simplefeatured.ini displays labels and tool-tips in the Module Configuration.
You will need a module language file if you want to view Joomla Administrator->Extensions->Module Manager->mod_sobi2simplefeatured Module Parameter Names and ToolTips in a language other than en-GB and display Custom Field Names from a language other than English.

Configuring mod_sobi2simplefeatured when using a SOBI2 language other than English
It is possible to use the English language version of mod_sobi2simplefeatured with other SOBI2 Languages, provided you have not deleted the (default [english] language) normally installed by SOBI2. (It should not be possible to delete the default language)
The English language version of mod_sobi2simplefeatured will use Custom Field Names from the SOBI2 Custom Fields Manager->Language='english' or default (which is english)

To use the English language version of mod_sobi2simplefeatured with other languages, you need to ensure that any Custom Fields that are available in
SOBI2 Custom Fields Manager->Language='MyLanguage'
are also available in;
SOBI2 Custom Fields Manager->Language='english'
If you create a SOBI2 Custom Field in one language, then SOBI2 will also automatically create it in the other languages WHEN you use the Custom Field Manager to view the Custom Fields for those languages.

To create a Module language translation;
mod_sobi2simplefeatured is compatible with Joomla v1.5.x module language files.
Only English module language files are currently available.
The English language for the module is defined in;
mod_sobi2simplefeatured.xml, and,
language/en-GB/en-GB.mod_sobi2simplefeatured.ini

(1) Make a copy of en-GB.mod_sobi2simplefeatured.ini
Rename the copy to MyLanguage.mod_sobi2simplefeatured.ini
where MyLanguage is the appropriate prefix for your language.
Edit the renamed file, making the required language translations.

Copy your new language file to the appropriate Joomla Site languages folder.

(2) Edit mod_sobi2simplefeatured.xml
and change all occurrences of;
t2.configValue='default','english',
to
t2.configValue='default','MyLanguage',
where
MyLanguage is the name displayed for the language in Joomla Administrator->Components->SOBI2->Configuration->General Configuration->SOBI2 Language

If anybody is interested in providing other language translations of the file en-GB.mod_sobi2simplefeatured.ini, please contact me so that I can include your language file in the module distribution zip package.

« Last Edit: 23. September 2009, 19:06:33 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Offline aboututila

mod_sobi2simplefeatured (Joomla 1.5.x only) - Tips and Tricks
« Reply #19 on: 08. August 2009, 21:31:08 »

Also See
Introduction
Module Description
Module Features
Quick Start Guide
Compatibility
Module Installation
Module Configuration
Downloads
Change History
CSS Styling
JavaScript Effects
SOBI Clones
Warranty & Support
Sample Screen Shots
Demo Sites
Upgrading
Languages
Tips and Tricks
Module Template

Tips and Tricks

In this Section
Using Module Parameter - SOBI2 Entry Selection
CSS Styling - Displaying Entries 'side-by-side'
Changing Entry fields output order
See Also: Creating a custom Module Output Template

Using Module Parameter - SOBI2 Entry Selection
(Refer Module Parameter - SOBI2 Entry Selection)
  • Many module 'new' users have problems configuring the module Parameters for 'SOBI2 Entry Selection'. Understanding how the 'SOBI2 Entry Selection' algorithm functions is essential for proper module configuration and taking maximum advantage of the module capabilities.

  • SOBI2 Entry Selection - the easiest method
    One of the easiest/simplest methods for using mod_sobi2simplefeatured is to follow the instructions in the Quick Start Guide.

  • SOBI2 Entry Selection - Using existing Custom Fields
    (1) Select Entries matching (Equal to) existing Custom Fields

         Example:     
         Suppose you want to display all Entries from an existing custom field_country and
         where field_country=France

         Go to: Joomla Administrator->Module Manager
         Edit mod_sobi2simplefeatured Module parameters

         Go to Module Parameters - SOBI2 Entry Selection
         (i) For the parameter 'Select Entries where Custom Field',
             Select 'field_country' from the drop-down list.
     
         (ii) for the parameter 'contains a value',
              Select 'Equal to'

        (iii) for the parameter 'the Value',
             Enter France

        Save the changes.

        Now all SOBI2 Entries where field_country=France will be displayed in the Module.

    (2) Select Entries 'Like (SQL LIKE)' existing Custom Fields

         Example:
         Assume you have some SOBI2 entries with
          field_country=France
          field_Country=Fiji
          field_country=Finland
         and suppose you want to display all Entries where field_country=begins with 'F'

         Go to: Joomla Administrator->Module Manager
         Edit mod_sobi2simplefeatured Module parameters

         Go to Module Parameters - SOBI2 Entry Selection
         (i) For the parameter 'Select Entries where Custom Field',
             Select 'field_country' from the drop-down list.
     
         (ii) for the parameter 'contains a value',
              Select 'Like (SQL LIKE)'

         (iii) for the parameter 'the Value',
               Enter F%
               (Note: '%' is SQL LIKE pattern matching syntax for 'match any character')
         Save the changes.

         Now all SOBI2 Entries where;
          field_country=France
          field_Country=Fiji
          field_country=Finland
         will be displayed in the Module.

    For more information on using 'Like (SQL LIKE)' pattern matching expressions,
    refer http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like


CSS Styling - Displaying Entries 'side-by-side'
The following assumes that you have read and understood mod_sobi2simplefeatured - CSS Styling.

Probably the easiest method to achieve an entry 'side-by-side' effect to apply a %width and a float:left to <div class="entry"> and then let each <div class="entry"> 'wrap' itself within the module container width (assuming your Site Template constrains the width of the Module containing HTML element).

In which case the CSS to be included in your Site Template for the module would be of the form;
div.mod_sobi2simplefeatured div.entry {
  float:left;
  width:
x%;
}


where x = 50% for two side-by-side entries
         x = 33.3% for three side-by-side entries
         x = 25% for four side-by-side entries
         etc, etc

If your 'side-by-side' entries will not always be the same vertical height,
then it is probable they may not wrap as you would like.

To solve this you can either;
(a) set 'side-by-side' entries to be the same specified vertical height,
     div.mod_sobi2simplefeatured div.entry {
       float:left;
       width:
x%;
       height:
ypx;
     }

     where y is the height in pixels for your largest/longest entry.

(b) or use 'child' and 'adjacent sibling' CSS selectors and force a 'clear:both;' at the appropriate entry.
Unfortunately, selecting the appropriate entry div.entry is not easily done until CSS v3 is reliably implemented in all major browsers, (and who knows when that will be for Internet Explorer, which struggles to reliably implement existing CSS 2.1 standards)

Note: In CSS 3, there is a greater range of Selector expressions available, and the E:nth-child(n) selector would be ideal for our purpose, allowing us to implement a clear:both; on every 3rd div.entry for 2 side-by-side entries, every 4th div.entry for 3 side-by-side entries, etc, etc.

The only way I know to do this in CSS 2 is to use child and adjacent sibling pattern matching selectors;

Such that, if you have 2 'side-by-side' entries, then the CSS would be;
div.mod_sobi2simplefeatured div.entry {
  float:left;
  width:50%;
  clear:none;
}
div.mod_sobi2simplefeatured>div.entry+div.entry+div.entry {
  clear:both
}
            div.mod_sobi2simplefeatured>div.entry+div.entry+div.entry+div.entry+div.entry {
  clear:both
}
            div.mod_sobi2simplefeatured>div.entry+div.entry+div.entry+div.entry+div.entry+div.entry+div.entry {
  clear:both
}

etc, etc (adding +div.entry+div.entry) until the number of div.entry's is sufficient for the maximum number of entries you intended to display.
       
Obviously if you intend to display a large number of entries, this is not a very efficient method.
A JavaScript could also be written to dynamically apply a clear:both; style to the appropriate 'nth' <div class="entry">, but it is beyond my skills to do this.
     
The only other method I know of to reliably display 'side-by-side' entries
would be to create a new custom Module Output Template to either and output the entries in <table>'s, or arguably it would be easier to just add an appropriate class to every nth <div class="entry">.
for example output <div class="entry newRow"> for every nth <div class="entry"> and then add the CSS;
div.mod_sobi2simplefeatured div.newRow {
  clear:both;
}


(you would need a mid-level knowledge of PHP programming to do this)
I would suggest, adding a counter $i to the
# Output HTML for each Entry
foreach ($entries as $entry){
loop in the Template file,
passing the value of this counter via;
$my_module->echoHTML_Entry_Wrapper_Start($i);
and modifying
function echoHTML_Entry_Wrapper_Start
in the Template helper file so that it added the class to every nth <div class="entry">

Changing Entry fields output order
mod_sobi2simplefeatured is compatible with Joomla v1.5.x Module Output Templates.
Module Output Templates control how modules output their HTML.
You can create you own custom Module Output Template.
You can also create Module Layout Overrides in your Site Template

The Module Output Template is selected in the Module configuration
Advanced Parameters - Module Output Template
There is one Template named 'default' supplied in the module distribution package.
This 'default' Template outputs module data in the following sequence;
  • Pre-Text
  • then (depending on the Module Configuration) for each selected entry
     - Entry Title
     - Entry Icon
     - Entry Image
     - Entry Custom Fields
     - Entry Link Text
     - Entry Hits Counter
  • Post-Text
   
If you wanted to change this order, you will need to create your own custom Module Output Template.
Refer: Creating a custom Module Output Template

« Last Edit: 11. August 2009, 16:45:25 by aboututila »
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.2 Firefox 3.5.2 | View Profile

Tags: