Zend pagination Zend pagination is a default option available in zend framework. Only needs to use it .The codes are apply in controller and view class Admin_PollsocietiesController extends Core_Controller_Action { public function listsocreqAction() { $oSocReqs = new Model_Societysignup(); $aSocReqs = $oSocReqs->getPendingRequests(); unset($oSocReqs); //for pagination $climit = 20; $page1 = $this->_getParam(‘page’,1); $paginator = Zend_Paginator::factory($aSocReqs); $paginator->setItemCountPerPage($climit); $paginator->setCurrentPageNumber($page1);…
Category: PHP
php substr function
substr() is used to limit the post length. Syntax: substr($string,start position,end position) Example: <?php echo substr(“Hello smarttips”,0,4); ?> Output:Hello
jquery smooth scrolling of internal anchor links
jquery smooth scrolling of internal anchor links <script> jQuery(document).ready(function(){ jQuery(‘a[href^=”#”]’).on(‘click’,function (s) { s.preventDefault(); var smarttarget = this.hash, $smarttarget = jQuery(smarttarget); jQuery(‘html, body’).stop().animate({ ‘scrollTop’: $target.offset().top }, 900, ‘swing’, function () { window.location.hash = smarttarget; }); }); }); </script> <ul> <li><h1>Contents</h1></li> <li> 1. <a class=”msection” style=”color:#1155CC” href=”#section_1″>Tes1</a></li> <li> 2. <a class=”msection” style=”color:#1155CC” href=”#section_2″>Test 2</a></li> </ul> <a id=”section_1″…
Tweet share Button with custom Icon
Tweet share or send to Button with custom Icon We can use custom images in Tweet button. <script type=”text/javascript” src=”//platform.twitter.com/widgets.js”></script> <a href=”https://twitter.com/intent/tweet?text=Find me in Unii.com”> <img src=”<?php echo $this->baseurl(‘images/smarttips-twitter.png’); ?>” width=”203″ height=”78″ border=”0″></a>
TinyMCE editor with file Upload and ajaxfilemanager plugin
TinyMCE editor with file Upload and ajaxfilemanager plugin TinyMCE is a common editor used in php applications. It includes all common features of editors like fck editor,ck editor..etc. One thing is missing in TinyMCE is file uploading. This editor requires extra plugin for getting file upload feature. Steps for implementing TinyMce photo upload feature is…