Tuesday, December 12, 2017

Who's Online

None

It's cold out.
Are you wearing your sweater?

 
             

Electronic Mother is pleased to make available em_newsflash, a modified version of Joomla's newsflash module.  Like the standard module, em_newflash randomly selects one of the published items from a category upon each page refresh; and can also dislpay multiple items in horizontal or vertical configurations.  But em_newflash adds a parameter that specifies an Itemid to apply to all the 'Title' and 'Read More' links produced by the module.   If non-blank, this parameter overrides whatever Itemids the module would otherwise have produced. 

The parameter will have no effect unless you replace the standard com_content/content.html.php file with our modified version, which is available in our downloads section.  Our content.html.php file adds one new method, called em_show(),  to the HTML_content class.  The em_newsflash module uses that method. 

Thankfully, you don't need to understand this technical stuff to install and use the files.   

Sitemasters who cannot use our content.html.php file (for example, because they have already customized their own content.html.php file) can add the em_show() function to their own content.html.php files, which will enable their own content.html.php files to support em_newsflash.  This is done as follows:

Step 1.  

Open com_content/content.html.php and find the (rather lengthy) show() function.  (It’s a method within the definition of the HTML_content class.)  It begins like this: 

        function show( &$row, &$params, &$access, $page=0 ) {

Using copy & paste, make a duplicate of the entire show() function, just underneath the original, and rename one of them to em_show().  Add add a new parameter (named $force_itemID) to it.  So the new function now begins like this: 

        function em_show( &$row, &$params, &$access, $page=0, $force_itemID ) {  
        // This entire function is added by JLW; is used by mod_em_newsflash

Since no one but us (mod_em_newsflash) will ever look for an em_show() function, and the original show() function is still there untouched, this hack shouldn't hurt anything else. 

Make sure that you copied the whole show() function; and nothing more or less than the whole show() function.  In my Joomla .12, the show() function ends with this: 

      // displays close button in pop-up window
      mosHTML::CloseButton ( $params, $hide_js );

      // displays back button in pop-up window
      mosHTML::BackButton ( $params, $hide_js );
   }


Step 2.

Look in the em_show() function that you just created to see where it calculates the itemID that it will use:

      // calculate Itemid
      HTML_content::_Itemid( $row );

Replace this with:

      // calculate Itemid
      $row->_Itemid = $forced_itemID ;                                  // modified by JLW
      $row->Itemid_link = '&Itemid='. $forced_itemID ;   // modified by JLW

(Make sure you are making this change in the new em_show() function and not in the original show() function.)

That's it!  Your content.html.php should now support mod_em_newsflash.   

{mos_fb_discuss:5} 

 
 

Electronic Mother's favorite pizza topping:

Joomla! Internet Domains for Sale

Are you a Joomla! template designer, website administrator, content provider, extension developer, user group coordinator, hosting provider, or consultant? 
 
The following Internet domains can give you a professional address for your webstes and e-mailboxes.  They are all available for sale from Electronic Mother:  
 
JoomlaClub.org    $399.

JoomlaDesigner.org    $399.
 
TemplateWorkshop.com  $595.

JoomlaEvents.org    $399.
 
JoomlaAddons.net    $399.
 
JoomlaAdmin.com    
JoomlaAdmin.net    
JoomlaAdmin.org  
JoomlaAdmin.info   
Sold only as a set:  $1,449.

JoomlaExpert.org    $399.
 
InfoHosts.com  $449.

JoomlaExtension.org    $499.

JoomlaManual.info    $549.
 
PCmagicians.com  $349.

JoomlaModules.net    $299.

JoomlaPlugins.info    $95

JoomlaPlugins.org    $195.

JoomlaTips.info     $399.
JoomlaTips.net     $399.
Sold as a set:  $599.
 
JewishJoomla.com
JewishJoomla.net
JewishJoomla.org
JewishJoomla.info
Sold only as a set:  $1,999.
 
BostonJoomla.org
JoomlaBoston.org
Available only as a set. 
 
To purchase any of the above, pay via PayPal to This email address is being protected from spambots. You need JavaScript enabled to view it.;">This email address is being protected from spambots. You need JavaScript enabled to view it..  We will unlock the domain and send you the transfer authorization code.  If you haven't had a domain of your own before, we can guide you through the transfer process. 
 
If you would like help with developing your website, we can help with that too.  For more information, email This email address is being protected from spambots. You need JavaScript enabled to view it..