Home Developing

0 505

We guess lots of HP users came across this problem. If you find yourself facing the “No Scan Options – Refer to device documentation to troubleshoot” and you really need to quickly Scan a doc just follow this simple tip (works 100% on HP 4500).

Windows 7

1) Go to Control Panel

2) Click On Devices and Printers

3) Right Click on your Printer Icon and select : Start Scan.

 

Hope this helps!

 

Themusicase.com Team

0 248

Our new tool for Themusicase.com Composers: Music Licensing Widget – easy embed on any website / blog.

License your music for inclusion in Films, Ads, Web, YouTube, Games, Podcasts and more media, directly from your website or blog. Widget is customizable, letting composers insert their custom image. Written in HTML5 is playable in all mobile devices.

[iframe src="http://widget.themusicase.com/widget.php?query=a2VlcmltIyMjMCMjIzA=" width="485" height="670"]

 

No account with Themusicase.com? Join as composer now and get a new revenue stream from your music, licensing your tracks to thousands of producers globally for inclusion in videos, films, apps and all media. Click here to learn more.

As a developer there are hundred of times that a client or a project needs to have a soundtrack or music as background.

There are many disadvantages playing music in a background on a website and many advantages.

When building a website in flash e.g. a photographer website or a movie – game presentation you have to pick a track and play it on background because it gets you quickly to the mood of the “product”.
But if you are building a website e.g. an eshop, a company website or even a blog i suggest not having background music except if your company is a gym or a design trend.

Working with flash and music is an easy part.

But what is happening working on html.
As you know html and generally server side sites are sending a request to the server and then the server serves the new page. So we have a new page on every link.
This is a major problem with the background music because clicking on a link reloads the player so the music too.

The solution of this problem is to develop your website with ajax methods.
So every request will be loaded on a certain div that is different from the div that holds the player.

With ajax methods you have some limitations on your SEO (there are some libraries out there that fix this problem) but sure better than building your website on flash that is totally seo unfriendly.

So we have the methods and we have decided that we want background music on our website.
What is happening with the music track.

I am sure that many of you out there, you are just grabbing a commercial song and put it on your website.
Well that in NOT LEGAL. Because you do not have the license to use this track on your project.
If you have the license then it’s ok.

There are too many libraries out there that does this Job.
They called Royalty free music libraries also known as stock music libraries.

Please be aware of the term. Royalty free doesn’t means free. It means that you just paying a single fee and no other royalties.

At http://www.themusicase.com you can find a thousand of tracks that will fit your needs that cost about 30 $ per track for usage as background music on your website (royalty free music silver license)

Now what is happening if you do not want to pay nothing.
Well many royalty free music libraries have sections that offers totally free the license to use their music (or certain tracks) on your website.

In most cases they offer free background music for websites with ready made code that you just grab it and paste it on your website source.
Try one here free Royalty Free music for websites

That is a good thing because you do not have (as a developer) to do nothing. Neither building an mp3 player not paying any royalties.

And yes you are legal.

We have recently installed osticket 1.6 for support ticket system.

One of the features that osTicket 1.6 does not have is the ability for the staffs to reply on a ticket thought email.

Think that you are on vacations and a customer creates a ticket that you receive on your smartphone and the answer is something that you can send it right away.

Well with a little hack this can be done so i am posting here the solution.
This technique only works if you enable piping.

on /api/pipe.php
osTicket 1.6 code Line 93


$ticket=null;
if(preg_match ("[[#][0-9]{1,10}]",$var['subject'],$regs)) {
$extid=trim(preg_replace("/[^0-9]/", "", $regs[0]));
$ticket= new Ticket(Ticket::getIdByExtId($extid));
//Allow mismatched emails?? For now hell NO.
if(!is_object($ticket) || strcasecmp($ticket->getEmail(),$var['email']))
$ticket=null;
}
$errors=array();
$msgid=0;
if(!$ticket){ //New tickets...
$ticket=Ticket::create($var,$errors,'email');
if(!is_object($ticket) || $errors){
api_exit(EX_DATAERR,'Ticket create Failed '.implode("n",$errors)."nn");
}
$msgid=$ticket->getLastMsgId();
}else{
$message=$var['message'];
//Strip quoted reply...TODO: figure out how mail clients do it without special tag..
if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()) && strpos($var['message'],$tag))
list($message)=split($tag,$var['message']);
//post message....postMessage does the cleanup.
if(!($msgid=$ticket->postMessage($message,'Email',$var['mid'],$var['header']))) {
api_exit(EX_DATAERR,"Unable to post message nn $messagen");
}
}

Replace with new code

$ticket=null;
$response_stuff=0;
$staff_id=0;
if(preg_match ("[[#][0-9]{1,10}]",$var['subject'],$regs)) {
$extid=trim(preg_replace("/[^0-9]/", "", $regs[0]));
$ticket= new Ticket(Ticket::getIdByExtId($extid));
//Allow mismatched emails?? For now hell NO.
if(!is_object($ticket) || strcasecmp($ticket->getEmail(),$var['email'])){
//$ticket=null;
$sql="SELECT username,staff_id FROM " . STAFF_TABLE . " WHERE email='" . $var['email'] . "' ";
$query=db_query($sql);
while($row = mysql_fetch_array($query)) {
$senderUsername = $row['username'];
$staff_id=$row['staff_id'];
}

if (!$senderUsername){
$ticket=null;
}
else
{
$response_stuff=1;
}
}
}
$errors=array();
$msgid=0;
if(!$ticket){ //New tickets…
$ticket=Ticket::create($var,$errors,’email’);
if(!is_object($ticket) || $errors){
api_exit(EX_DATAERR,’Ticket create Failed ‘.implode(“n”,$errors).”nn”);
}
$msgid=$ticket->getLastMsgId();
}else{
$message=$var['message'];
//Strip quoted reply…TODO: figure out how mail clients do it without special tag..
if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()) && strpos($var['message'],$tag))
list($message)=split($tag,$var['message']);
//post message….postMessage does the cleanup.
if($response_stuff==1){
if(!($ticket->postResponse($ticket->getMessageId(),$message,’none’,false,true,$staff_id))){
api_exit(EX_DATAERR,”Unable to post message nn $messagen”);
}
}
else
{
if(!($msgid=$ticket->postMessage($message,’Email’,$var['mid'],$var['header']))) {
api_exit(EX_DATAERR,”Unable to post message nn $messagen”);
}
}
}

on /include/class.ticket.php
add this function


function getMessageId(){
$cur_mes_id=0;
$sql ='SELECT max(msg_id) FROM '.TICKET_MESSAGE_TABLE.' WHERE ticket_id='.db_input($this->getId());
if(($res=db_query($sql)) && db_num_rows($res))
list($cur_mes_id)=db_fetch_row($res);
return $cur_mes_id;
}

and add this on function postResponse

function postResponse($msgid,$response,$signature='none',$attachment=false,$canalert=true,$_staff_id=0){
global $thisuser,$cfg;
//global $cfg;
if($_staff_id!=0){
$ip="0.0.0.0";
$thisuser=new Staff($_staff_id);
}
else
{
$ip=$thisuser->getIP();
}

if(!$thisuser || !$thisuser->getId() || !$thisuser->isStaff()) //just incase
return 0;

$sql= ‘INSERT INTO ‘.TICKET_RESPONSE_TABLE.’ SET created=NOW()’.
‘,ticket_id=’.db_input($this->getId()).
‘,msg_id=’.db_input($msgid).
‘,response=’.db_input(Format::striptags($response)).
‘,staff_id=’.db_input($thisuser->getId()).
‘,staff_name=’.db_input($thisuser->getName()).
‘,ip_address=’.db_input($ip);

the rest are the same…..

Connect with us

FROM THE BLOG

0 343
We added a new option for our heavy users - clients that need more than 20 tracks. Premium Accounts are designed for users that do...