Skip to main content

Simpale AJAX Shout out box for joomla

If we google as "joomla shout out box" we can get multiple results specific to joomla as show form fallowing link.

Other than using above extensions we can implement our own shout out box with fallowing features.

  1. Adding our recently entered shout out for waiting shout out list. Normally as a normal users, they may entered deferent type of shout outs with out caring. That type of situation we need a human monitoring system to monitor shout outs.
  2. Display recently added shout outs in the side of admin through the separate admin panel. In this type of application admin should has a facility to monitor the shout outs and accept or cancel that shout out easily real time.
  3. Adding accepted shout outs to shout list for display all users and remove form waiting list.
  4. Identify accepted shout out and rejected shout out easily for users.
  5. If there is a restriction like one user can add limited number of shout outs, available number of shout out need to be display real time without refreshing page.
  6. limit number of shout out user can browse through his view.
Key concept behind the shout out application
Most of the time you may have a problem how system collect the newly added shout out without refreshing the page. The concept behind this is not more complicated. In this application periodically send the ajax request to server and check for newly added shout out with admin acceptance. In the same time system should has a capability to track the red shout out to over come read the red shout outs again and again. Here we can use time stamp to over come this problem. We can insert user entered shout out for shout out table and can set the time stamp for each one according to the oder of admin response.

Shout may be in one of the fallowing sate
0->Pending shout for approval
1->Accepted shout out by admin
-1 -> Canceled shout out by admin

Then after according to oder of reviewing, we can set time stamp and its state(0, 1 or -1).

And also client browser need to memorize last time stamp that is red. Then every time client browser can check the DB for newly confirmed or canceled shout outs with time stamp.

1. Browser memorize time stamp value < state ="">2. Browser memorize time stamp value> Any shot out with 1 or -1 state = Red shout out by client browser

Comments

Popular posts from this blog

How to extract vtiger DB data

Here is the code sample how extract data form vtiger DB with WHERE close. Sample:1 require_once('include/DatabaseUtil.php'); global $adb; $tabid = array('9','16'); $sql = "SELECT tabid, fieldname, fieldid, fieldlabel,columnname, tablename, uitype, typeofdata, presence FROM vtiger_field WHERE tabid in (" . generateQuestionMarks($tabid) . ")"; $result = $adb->pquery($sql, array($tabid)); // get result $noofrows = $adb->num_rows($result); // get number of rows $i=0; $data=array(); while($resultrow = $adb->fetch_array($result)) { $tabid=$resultrow['tabid']; $resultrow=['fieldlabel']; $data[$i]=array($tabid, $resultrow); } Sample:2 require_once('include/DatabaseUtil.php'); global $adb; $query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?'; $result = $adb->pquery($query, array($focus->id)); $from_email = $adb->query_result($result,0,'from_

How to add a new column to vtiger existing table

When we add a new column to existing vtiger table, we need do more than just adding a column to selected vtiger table. If you do so, you may unable to do some DB operation like insert update and deleted. This is the way how we can do this. 1. Add a new column to selected table as normal 2. Add a new row to "vtiger_field" table as fallow "insert into vtiger_field values (tabid, fieldid, columnname, tablename, generatedtype, uitype, fieldname, fieldlabel, readonly, presence, selected,maximumlength, sequence, block, displaytype, typeofdata, quickcreate,quickcreatesequence, info_type)" When you set a value to "presence" field be make sure to select 0 or 2. Otherwise your selected field not populated with vtiger field list.

Debugging PHP with Netbeans

Most of the PHP developers are complaining that they have not a good ID for PHP debugging and every time that they have to use var_dump() print statement or PHP die or exit commands to check the state of php script. But now we can use netbeans to overcome this issue with netbeans-xdebug. I tried this with Linux and feel that working it cool. Anyway still I had not a time to try out this with windows and hope that netbeans-xdebuger working fine with windows also. Now I am going to explain how we can enable netbeans-xdebuger in Ubuntu 1. First we should have a netbeans installation package (Download from here ) 2. After installing Netbeans we can install xdebuger. To do that open terminal and type fallowing commands. sudo apt-get install php5-dev php-pear sudo pecl install xdebug 3. Now you have installed xdebug successfully but not configure with PHP yet. To Configure xdebuger with php and netbeans ID. open php.ini file using this command; sudo gedit /etc/php5/apache2/php.ini A