Tuesday, June 13, 2017

How do you add a new module position?

Inserting the code

  • Open the index.php file of the Template you wish to edit
  • Locate the place in the Template where you wish to put the new position.
  • Insert
<jdoc:include type="modules" name="newposition"   />
  • The variable can be used (between existing tags) to replace an image by replacing the <img src="xxx" border="0" alt="">. Or By creating a new tag with its own class/id.
  • Open the Template's TemplateDetails.xml file and locate the
<positions></positions> Start and end tags 
  • Then add
<position>newposition</position>
  • Example
<positions>
  <position>debug</position>
  <position>position-0</position>
  <position>position-1</position>
  <position>position-2</position>
  <position>position-3</position>
  <position>position-4</position>
  <position>position-5</position>
  <position>position-6</position>
  <position>position-7</position>
  <position>position-8</position>
  <position>position-9</position>
  <position>position-10</position>
  <position>position-11</position>
  <position>position-12</position>
  <position>position-13</position>
  <position>position-14</position>
  <position>position-15</position>
  <position>newposition</position>
</positions>

https://docs.joomla.org/How_do_you_add_a_new_module_position%3F

How to display horizontally menu in protostar Joomla template

 protostar template
want to display the main menu at the navigation section
go to the module and change the position at the right position

then go the menu assigement section and add class ' nav-pills' into the class

It will shows the pills menus.

Friday, June 9, 2017

how to reset joomla password

  1. Find your admin user and click on Edit.
    Admin Password Reset
  2. Copy d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199 into the password field and click on Go.
     3.use 'secret' as password  and username is:libing

How to include custom js code in joomla


/layouts/template.php in your template

 <?php
  // bing add this 20170609
   $document = JFactory::getDocument();
   $document->addScript('templates/fontaine_j3/js/custom.js');
  ?>

custom.js code

/* Bing added it in 20170421 to get horizontal display */
var $ = jQuery.noConflict();
  $(document).ready(function() {
    window.onload = function () {
    $('#toTop').css("cssText", "text-transform: none !important;");
     $('#toTop').text('Retour en haut');
     // console.log('set the value to it');
    }
 });

Monday, June 5, 2017

Custom module

two ways to use module
{loadposition my_address}
{module address}



create custom module
select position as "my_address"
title is address.

How to include article in module
{article 304}[text]{/article}

{loadmodule mod_login,Login Form}

Friday, May 19, 2017

window.onload


var $ = jQuery.noConflict();
jQuery(document).ready(function ($) {
  window.onload = function () {
    setTimeout(function () {
    var windowsize = $(window).width();
       //alert(windowsize);
       if (windowsize < 1100 && windowsize >1000) {
       // if the window is greater than 1021 wide  and less than 1025then turn on jScrollPane..
       $('#engine_box .gbTab_holder li').css("cssText", "width: 15% !important;");
        console.log('by default change the tab width');
      }
      else {
       $('#engine_box .gbTab_holder li').css("width","");
       console.log('set to default width then it is not ipad pro by defauly');
      }
    $(window).resize(function() {
      windowsize = $(window).width();
     // alert('changed screen');
      if (windowsize < 1100 && windowsize > 1000) {
        // if the window is greater than 1021 wide  and less than 1025then turn on jScrollPane..
           $('#engine_box .gbTab_holder li').css("cssText", "width: 15% !important;");
           console.log('changed screen  after change the tab width');
      }
      else {
          $('#engine_box .gbTab_holder li').css("width","");
          console.log('set to default width then it is not ipad pro by defauly');
      }
    });

   
    }, 4000);

  };

});

Tuesday, May 2, 2017

        <?php
  echo '<pre>';
  echo $userMember;
    echo '</pre>';
echo $userMember->user;
         echo '<br> this is one';
echo $userMember->relationship;
echo '<br> this is second';
echo $userMember->metas;

?>