Wednesday, August 22, 2018

How to send custom email using Joomla[Solved]

Hey Guys,

below is the example custom function for sending email using in joomla function
------------------------------------------------------------------
public function sendRegistrationEmail($sender='', $replyTo='', $replyFromName='', $recipient='', $bcc='', $messageSubject='', $messageBody=''){
$mailer = & JFactory::getMailer();
$mailer->setSubject($messageSubject);
$mailer->Encoding = 'base64';
$mailer->setSender($sender);
$mailer->addRecipient($recipient);
$mailer->addReplyTo($replyTo, $replyFromName);
$mailer->isHTML(true);
$mailer->setBody($messageBody);
$mailer->addBCC($bcc);
$mailsent = & $mailer->Send();
$send = ($mailsent)?(true):(false);
return $send;
}

Monday, August 13, 2018

How to set google GA event category wise?

Please follow the below the example for GA event function used in javascript function.


function call in below example for dynamic Event function .


 setGa('Category Name',' level name');
-----------------------------------------------------------


function setGa(catName,value){
var currentPage = jQuery("#page").val(); 
    var blogType = jQuery('#selectType option:selected').val();
var ajaxHitUrl = window.location.protocol + '//' + window.location.hostname + '/';
if(gaMainURL=='blog'){
var gAUrl = ajaxHitUrl+'datacenter/blog?blogType='+blogType+'&shc_page='+shc_page+'&page='+currentPage;
}else{
var gAUrl = ajaxHitUrl+'datacenter/social-hub/podcast?blogType='+blogType+'&shc_page=1&page='+currentPage;
}

ga('send','event',catName,value.toString(),gAUrl.toString());
ga('set', 'page', gAUrl.toString());
ga('send', 'pageview');

}

Thursday, August 2, 2018

How to create tag in GIT and push to repository?commands

Hi All,

Please find  below  GIT complete commands for developer that can help in  you git command line. I have worked on <buildersqa>  repository branch it configure by IT team and you can clone and pull your branch.


Run below command to proceed

git config --global user.bikash "Bikash ranajn nayak"
git config --global user.nayakr.bikash@gmail.com

git clone git+ssh://bikash@127.0.0.1/home/repository/buildersqa

Step 1 -> Take Checkout git from buildersqa
        git checkout buildersqa

Step2-> Pull the branch from buildersqa
        git pull origin buildersqa

Step3 -> Create won branch
        git checkout -b features/bika_taskName_date

ADD YOU PATCHES your new created branch

Step4-> Commit your branch
       git commit -am "add your comment for "

Step5-> Again checkout to buildersqa
       git checkout buildersqa

Step6-> Again take pull from buildersqa
       git pull origin buildersqa

Step7-> merge your branch to  buildersqa
      git merge –no-commit features/bika_taskName_date

Step8->Commit your branch buildersqa
      git commit -am "add your comment for "

Step9->Create tag version of your branch
      git tag -a bika_v2.0_9April2018 -m "Version 2.0"

Step10->push you tag to buildersqa
       git push origin <tagname>

Step11->Push you branch to buildersqa
       git push origin buildersqa

Finally your code patches available in your tag version on remote server, only you need to provide your tag name to  IT team for pull on  buildersqa server .

Please let in comment if any doubt or any question on this.