Adding Custom Mobile Protocols to Drupal

With the proliferation of mobile apps and Web sites on mobile devices, developers are often asked to integrate the two. Mobile apps can register a custom protocol with the mobile OS so that a link on a Web page such as <a href=”myapp://openapp”>Open in MyApp</a> will open MyApp on the user’s phone. An early example of this was to have links on phone numbers actually call the number on mobile phones.

On a recent project, I was asked to include a “Back to App” link on the site’s menu. “No problem,” I thought, “I’ll just set that as the destination of that menu item.” However trying to add myapp://openapp as a menu item destination lead to a

Notice: Undefined index: path in menu_edit_item_validate() (line 399 of //modules/menu/menu.admin.inc).

The path '' is either invalid or you do not have access to it.

A little digging lead me to the problem: Drupal has a limited list of protocols it considers 'valid'. Fortunately, those are accessed via variable_get. Unfortunately, there is no admin page where you can edit that list. And, more confusingly, Drupal uses two different default values for the list of protocols (includes/common.inc@1336 includes the tel protocol but modules/filter/filter.module@1398 does not). Finally, by default, Drupal doesn't set this variable in the database so the default value passed to variable_get is what gets used.

My solution was to add a hook_update_N to an existing (custom) module to add the protocol I needed.

/**
 * Adds myapp:// protocol to the list of allowed protocols.
 */
function example_update_7001(&$sandbox) {
  // From include/common.inc @ 1336
  $protocols = variable_get('filter_allowed_protocols', array('ftp', 'http', 'https', 'irc', 'mailto', 'news', 'nntp', 'rtsp', 'sftp', 'ssh', 'tel', 'telnet', 'webcal'));
  $protocols[] = 'myapp';
  variable_set('filter_allowed_protocols', $protocols);
}

Not interested in writing an update hook? You can also set this directly in your settings.php file:

$conf['filter_allowed_protocols'] = array('ftp', 'http', ...);

I prefer the first option. If there is another module trying to add a protocol to the list, the second option would negate that. But you can't beat editing your settings.php for a quick-fix that avoids the need for a custom module.

Permalink

I would like to find best adding and custom mobile protocols to drupal website. That was released many paper service reviews on this template. So we are all happy to get the great reviews and essays.

Permalink

Jual besi hollow Jual besi hollow Toko besi siku Jual pipa besi Toko pipa besi baja sch 40 sch 80 undangan pernikahan bentuk tas Supplier Besi H beam Agen Wiremesh Besi baja Jual plat kapal besi baja Pabrik besi beton master steel ms jual hp asus murah jual hp asus murah undangan pernikahan simple Supplier besi hollow Supplier besi hollow Toko pipa besi baja sch 40 sch 80 Supplier pipa besi Toko besi hollow undangan pernikahan simple undangan pernikahan ada fotonya Supplier Besi Beton Toko Wiremesh Besi baja Supplier plat kapal besi baja Pabrik besi beton ksty Toko besi hollow Toko besi hollow Toko Plat besi Toko pipa besi Toko besi beton Sni Ulir Polos undangan pernikahan aneh www.sentrabesibaja.com Jual Wiremesh Besi baja Toko plat kapal besi baja Pabrik besi beton krakatau steel Agen besi hollow Agen besi hollow Toko besi h beam Agen pipa besi Toko besi wf baja undangan pernikahan amplop Pabrik Welded Beam T beam King Queen Cross Castellated Beam Harga Wiremesh Besi baja Agen plat kapal besi baja Pabrik besi beton jcac Pabrik besi hollow Pabrik besi hollow Toko besi wf Pabrik pipa besi Toko besi unp undangan pernikahan batik Pabrik Bondek Cor Pabrik Wiremesh Besi baja Pabrik plat kapal besi baja Pabrik besi beton interworld steel is Distributor pipa besi Distributor pipa besi Toko wiremesh Distributor sch 40 Toko besi siku undangan pernikahan murah Pabrik Atap Spandek Sni jual laptop asus jual laptop asus jual laptop asus murah jual laptop asus murah undangan pernikahan kalender undangan pernikahan bahasa inggris islam Distributor Besi Siku Baja Distributor besi siku baja Pabrik besi beton gunung garuda Harga pipa besi Harga pipa besi Toko besi unp Harga sch 40 Toko Plat besi plat kapal undangan pernikahan online Pabrik Plat Bordes Kembang Supplier Besi Siku Baja Harga besi siku baja Pabrik besi beton delcoprima Jual pipa besi Jual pipa besi Toko besi cnp Jual sch 40 Toko besi h beam baja undangan pernikahan anti mainstream Pabrik Plat Besi Hitam Agen Besi Siku Baja Jual besi siku baja Pabrik besi beton cakra steel cs Supplier pipa besi Supplier pipa besi Toko besi hollow Supplier sch 40 Toko besi cnp undangan pernikahan cantik dan murah Pabrik Plat Kapal Bki Krakatau Steel Toko Besi Siku Baja Supplier besi siku baja Pabrik besi beton bjku Toko pipa besi Toko pipa besi Toko besi beton Sni Ulir Polos Toko sch 40 www.gudangbesibaja.com undangan pernikahan unik Pabrik Jual Besi Siku Baja Jual Besi Siku Baja Toko besi siku baja Pabrik besi beton Sni Ulir Polos Agen pipa besi Agen pipa besi ironsteelcenter.com Agen sch 40 Supplier besi Wf Baja undangan pernikahan yang unik Pabrik Besi Unp Baja Profil Kanal Harga Besi Siku Baja Agen besi siku baja Pabrik besi beton ais Pabrik pipa besi Pabrik pipa besi Supplier stainless steel Pabrik sch 40 Supplier bondek undangan pernikahan lucu Pabrik Besi Cnp Profil Baja Gording Pabrik Besi Siku Baja Pabrik besi siku baja Pabrik besi beton Distributor sch 40 Distributor sch 40 Supplier atap spandek Distributor besi Pipa sch 80 baja Supplier wiremesh undangan pernikahan bunga Pabrik Besi Hollow Distributor Besi Unp Baja Distributor besi wf jasa konstruksi baja Harga sch 40 Harga sch 40 Supplier baja ringan Harga besi Pipa sch 80 baja Supplier pipa besi baja sch 40 sch 80 undangan pernikahan islami Pabrik Wiremesh Supplier Besi Unp Baja Harga besi wf www.pusatbesibaja.co.id Jual sch 40 Jual sch 40 Supplier bondek Jual besi Pipa sch 80 baja Supplier besi hollow undangan pernikahan ada foto Pabrik Besi Pipa Baja Schedule 80 Agen Besi Unp Baja Jual besi wf www.pusatbesibaja.com link7

Permalink

[url=http://watchonlinenow.org/watch-king-arthur-legend-of-the-sword-online/]Watch King Arthur Legend of the Sword Online[/url]

Permalink

<a href="http://watchonlinenow.org/watch-king-arthur-legend-of-the-sword-online/">Watch King Arthur Legend of the Sword Online</a>

Permalink

2017.7.17 monday nike air max air max 2017 yeezy boost 350 adidas yeezy adidas superstar adidas nmd adidas nmd nmd adidas adidas nmd nmd adidas adidas nmd nmd shoes adidas outlet adidas shoes adidas shoes adidas uk adidas shoes adidas uk adidas shoes adidas outlet adidas superstar adidas yeezy adidas yeezy boost air jordan retro cheap jordans air jordan uk nike air max air max 95 air max cheap nike air max nike air max outlet birkenstocks birkenstock sandals birkenstock sandals birkenstock shoes birkenstocks birkenstock sandals burberry outlet canada celine outlet celine outlet store cheap jerseys cheap jerseys from china cheap jordans cheap jordans free shipping cheap jordans cheap jordan shoes cheap jordans cheap jordans cheap jordans jordan shoes cheap mlb jerseys cheap mlb jerseys mlb jerseys wholesale oakley sunglasses discount oakley sunglasses cheap ray bans chi flat iron christian louboutin outlet christian louboutin christian louboutin outlet christian louboutin christian louboutin sale christian louboutin shoes christian louboutin shoes christian louboutin outlet christian louboutin outlet christian louboutin coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach outlet online coach outlet coach outlet online coach factory outlet coach outlet store coach factory outlet coach outlet store coach outlet coach outlet store coach outlet coach canada coach outlet coach factory outlet coach outlet coach factory outlet online coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach factory outletcoach outlet coach factory outlet coach outlet coach factory outlet coach outlet store coach outlet store online clearances coach outlet store coach outlet coach factory outlet cheap nike shoes wholesale nike shoes oakley sunglasses oakley sunglasses outlet dolce and gabbana outlet doudoune moncler ed hardy ed hardy clothing fendi handbags fitflops fitflops shoes fit flops fitflops sale clearance fitflops sale clearance fred perry fred perry fred perry polo borse gucci gucci outlet gucci outlet hermes birkin hermes handbags hermes handbags hollister clothing store hollister co james harden shoes jimmy choo kate spade handbags kate spade kate spade handbags kate spade outlet kevin durant shoes kd 9 shoes longchamp bags longchamp uk longchamp handbags longchamp handbags longchamp outlet store longchamp outlet louboutin pas cher louboutin chaussures louis vuitton handbags louis vuitton handbags outlet louis vuitton outlet louis vuitton outlet louis vuitton outlet store mbt shoes michael kors handbags michael kors uk michael kors handbags michael kors handbags michael kors outlet michael kors canada michael kors outlet michael kors canada michael kors outlet michael kors outlet online michael kors outlet michael kors outlet clearance michael kors outlet michael kors outlet clearance moncler jackets moncler jackets moncler outlet moncler outlet moncler mont blanc pens mont blanc mulberry handbags mulberry purse nike air maxnike air max 90 nike air max nike air max 90 nike free flyknit nike free run flyknit nike free run black nike free 5.0 nike roshe nike roshe run nike shoes nike shoes for men nike store nike factory store nike store oakley sunglasses oakley sunglasses cheap oakley sunglasses oakley sunglasses cheap oakley sunglasses coach outlet coach factory outlet coach outlet coach factory outlet longchamp outlet louis vuitton outlet louis vuitton outlet online pandora bracelet pandora charms pandora jewelry pandora charms pandora charms sale pandora charms pandora charms pandora uk pandora jewelry pandora outlet pandora jewelry pandora outlet polo outlet polo ralph lauren outlet online prada outlet parada handbags ralph lauren ralph lauren outlet online ralph lauren outlet ralph lauren sale clearance ralph lauren outlet ralph lauren outlet online ralph lauren outlet polo ralph lauren outlet ray ban sunglasses rayban ray ban sunglasses ray ban sunglasses discount red bottoms red bottoms shoes red bottoms red bottoms shoes rolex watches replica watches sac longchamp pas cher sac longchamp pliage sac longchamp pas chersac longchamp steph curry shoes timberland boots toms shoes toms shoes outlet toms outlet toms shoes toms shoes outlet true religion outlet true religion true religion jeans true religion outlet true religion jeans valentino vans shoes vans outlet store versace shoes louis vuitton outlet yeezy boost adidas yeezy yeezy boost adidas yeezy yeezy boost yeezy boost 350 yeezy boost 350 yeezy 350 boost levis jeans adidas nmd nmd adidas adidas outlet adidas shoes adidas shoes adidas outlet adidas shoes adidas superstar adidas superstar shoes adidas trainers yeezy boost 350 adidas yeezy nike air max 90 birkenstock sandals birkenstock shoes cheap nfl jerseys cheap nfl jerseys wholesale christian louboutin christian louboutin sale coach outlet coach factory outlet online coach handbags coach bags coach outlet coach outlet store coach outlet coach outlet store online coach outlet coach outlet online hermes outlet kate spade handbags kate spade outlet kate spade outlet kate spade outlet store longchamp handbags longchamp uk michael kors handbags michael kors uk michael kors michael kors handbags michael kors outlet michael kors handbags michael kors outlet michael kors factory outlet cheap mlb jerseys mlb jerseys cheap mont blanc mulberry bags mulberry uk mulberry outlet mulberry handbags cheap nfl jerseys nike outlet nike outlet online nike outlet nike outlet store nike shoes nike shoes outlet oakley sunglasses oakley sunglasses outlet coach factory outlet official coach factory outlet michael kors michael kors outlet online michael kors outlet michael kors outlet clearance nike outlet coach outlet coach outlet store pandora pandora jewelry pandora charms pandora charms sale clearance pandora outlet pandora jewelry outlet pandora uk pandora jewelry polo ralph lauren polo ralph lauren outlet online polo ralph lauren ralph lauren outlet polo ralph lauren outlet ralph lauren sale clearance ralph lauren uk ralph lauren sale clearance polo ralph lauren swarovski crystal swarovski crystalswarovski jewellery tods outlet tods shoes tory burch outlet ultra boost yeezy boost 350 yeezy boost yeezy boost 350 v2 adidas yeezy boost 350 seattles eahawks jerseys denver broncos jerseys new england patriots jerseys dallas cowboys jerseys houston texans jerseys golden state warriors jerseys miami heat jerseys cveland cavaliers jerseys true religion jeans true religion outlet marc jacobs handbags marc jacobs bags fitflops fitflops uk cheap ray ban sunglasses ray ban sunglasses oakley sunglasses cheap oakley sunglasses ralph lauren uk polo ralph laurenkate spade outlet kate spade handbags michael kors bags michael kors uk ralph lauren uk ralph lauren outlet louboutin louboutin uk dansko shoes dansko sandals hermes bags hermes handbags louboutin shoes air jordans jordans mbt shoes michael kors outlet michael kors outlet online fit flops fitflops clarks shoes clarks outlet salomon shoes clarks shoes clarks outlet salomon shoes salomon shoes outletfitflop sandals fitflops mbt shoes rolex replica watches rolex replica rolex replica watches rolex watches fake rolex under armour shoes cat shoes dansko outletdansko outlet store valentino shoes valentino shoes outlet giuseppe zanotti outlet giuseppe zanotti sneakers parker pens supra shoes ysl handbags birkenstock outlet birkenstock sandals columbia shoes columbia outlet online tory burch outlettory burch outlet store polo ralph lauren longchamp bags longchamp uk pandora charms pandora charms uk adidas pas cher pandora bijoux birkenstock pas cher pandora jewelry nike air max pas cher nike air max polo ralph lauren adidas superstarsac michael kors pandora soldes nike store burberry outlet ray ban sunglasses discount ray ban sunglasses ecco shoes ralph lauren uk ralph lauren outlet ugg outlet ralph lauren outlet polo ralph lauren outlet pandora charms pandora jewelryugg outlet ugg outlet store jordan retro jordan retro 11 coach outlet coach outlet online michael kors outlet michael kors handbags ugg outlet ugg boots uggs ugg outlet michael kors outlet michael kors outlet store coach factory outlet coach outlet cheap nfl jerseys nfl jerseys wholesale Monday 2017.7.17

Permalink

2017.7.17 monday nike air max air max 2017 yeezy boost 350 adidas yeezy adidas superstar adidas nmd adidas nmd nmd adidas adidas nmd nmd adidas adidas nmd nmd shoes adidas outlet adidas shoes adidas shoes adidas uk adidas shoes adidas uk adidas shoes adidas outlet adidas superstar adidas yeezy adidas yeezy boost air jordan retro cheap jordans air jordan uk nike air max air max 95 air max cheap nike air max nike air max outlet birkenstocks birkenstock sandals birkenstock sandals birkenstock shoes birkenstocks birkenstock sandals burberry outlet canada celine outlet celine outlet store cheap jerseys cheap jerseys from china cheap jordans cheap jordans free shipping cheap jordans cheap jordan shoes cheap jordans cheap jordans cheap jordans jordan shoes cheap mlb jerseys cheap mlb jerseys mlb jerseys wholesale oakley sunglasses discount oakley sunglasses cheap ray bans chi flat iron christian louboutin outlet christian louboutin christian louboutin outlet christian louboutin christian louboutin sale christian louboutin shoes christian louboutin shoes christian louboutin outlet christian louboutin outlet christian louboutin coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach outlet online coach outlet coach outlet online coach factory outlet coach outlet store coach factory outlet coach outlet store coach outlet coach outlet store coach outlet coach canada coach outlet coach factory outlet coach outlet coach factory outlet online coach outlet coach factory outlet coach outlet coach factory outlet coach outlet coach factory outletcoach outlet coach factory outlet coach outlet coach factory outlet coach outlet store coach outlet store online clearances coach outlet store coach outlet coach factory outlet cheap nike shoes wholesale nike shoes oakley sunglasses oakley sunglasses outlet dolce and gabbana outlet doudoune moncler ed hardy ed hardy clothing fendi handbags fitflops fitflops shoes fit flops fitflops sale clearance fitflops sale clearance fred perry fred perry fred perry polo borse gucci gucci outlet gucci outlet hermes birkin hermes handbags hermes handbags hollister clothing store hollister co james harden shoes jimmy choo kate spade handbags kate spade kate spade handbags kate spade outlet kevin durant shoes kd 9 shoes longchamp bags longchamp uk longchamp handbags longchamp handbags longchamp outlet store longchamp outlet louboutin pas cher louboutin chaussures louis vuitton handbags louis vuitton handbags outlet louis vuitton outlet louis vuitton outlet louis vuitton outlet store mbt shoes michael kors handbags michael kors uk michael kors handbags michael kors handbags michael kors outlet michael kors canada michael kors outlet michael kors canada michael kors outlet michael kors outlet online michael kors outlet michael kors outlet clearance michael kors outlet michael kors outlet clearance moncler jackets moncler jackets moncler outlet moncler outlet moncler mont blanc pens mont blanc mulberry handbags mulberry purse nike air maxnike air max 90 nike air max nike air max 90 nike free flyknit nike free run flyknit nike free run black nike free 5.0 nike roshe nike roshe run nike shoes nike shoes for men nike store nike factory store nike store oakley sunglasses oakley sunglasses cheap oakley sunglasses oakley sunglasses cheap oakley sunglasses coach outlet coach factory outlet coach outlet coach factory outlet longchamp outlet louis vuitton outlet louis vuitton outlet online pandora bracelet pandora charms pandora jewelry pandora charms pandora charms sale pandora charms pandora charms pandora uk pandora jewelry pandora outlet pandora jewelry pandora outlet polo outlet polo ralph lauren outlet online prada outlet parada handbags ralph lauren ralph lauren outlet online ralph lauren outlet ralph lauren sale clearance ralph lauren outlet ralph lauren outlet online ralph lauren outlet polo ralph lauren outlet ray ban sunglasses rayban ray ban sunglasses ray ban sunglasses discount red bottoms red bottoms shoes red bottoms red bottoms shoes rolex watches replica watches sac longchamp pas cher sac longchamp pliage sac longchamp pas chersac longchamp steph curry shoes timberland boots toms shoes toms shoes outlet toms outlet toms shoes toms shoes outlet true religion outlet true religion true religion jeans true religion outlet true religion jeans valentino vans shoes vans outlet store versace shoes louis vuitton outlet yeezy boost adidas yeezy yeezy boost adidas yeezy yeezy boost yeezy boost 350 yeezy boost 350 yeezy 350 boost levis jeans adidas nmd nmd adidas adidas outlet adidas shoes adidas shoes adidas outlet adidas shoes adidas superstar adidas superstar shoes adidas trainers yeezy boost 350 adidas yeezy nike air max 90 birkenstock sandals birkenstock shoes cheap nfl jerseys cheap nfl jerseys wholesale christian louboutin christian louboutin sale coach outlet coach factory outlet online coach handbags coach bags coach outlet coach outlet store coach outlet coach outlet store online coach outlet coach outlet online hermes outlet kate spade handbags kate spade outlet kate spade outlet kate spade outlet store longchamp handbags longchamp uk michael kors handbags michael kors uk michael kors michael kors handbags michael kors outlet michael kors handbags michael kors outlet michael kors factory outlet cheap mlb jerseys mlb jerseys cheap mont blanc mulberry bags mulberry uk mulberry outlet mulberry handbags cheap nfl jerseys nike outlet nike outlet online nike outlet nike outlet store nike shoes nike shoes outlet oakley sunglasses oakley sunglasses outlet coach factory outlet official coach factory outlet michael kors michael kors outlet online michael kors outlet michael kors outlet clearance nike outlet coach outlet coach outlet store pandora pandora jewelry pandora charms pandora charms sale clearance pandora outlet pandora jewelry outlet pandora uk pandora jewelry polo ralph lauren polo ralph lauren outlet online polo ralph lauren ralph lauren outlet polo ralph lauren outlet ralph lauren sale clearance ralph lauren uk ralph lauren sale clearance polo ralph lauren swarovski crystal swarovski crystalswarovski jewellery tods outlet tods shoes tory burch outlet ultra boost yeezy boost 350 yeezy boost yeezy boost 350 v2 adidas yeezy boost 350 seattles eahawks jerseys denver broncos jerseys new england patriots jerseys dallas cowboys jerseys houston texans jerseys golden state warriors jerseys miami heat jerseys cveland cavaliers jerseys true religion jeans true religion outlet marc jacobs handbags marc jacobs bags fitflops fitflops uk cheap ray ban sunglasses ray ban sunglasses oakley sunglasses cheap oakley sunglasses ralph lauren uk polo ralph laurenkate spade outlet kate spade handbags michael kors bags michael kors uk ralph lauren uk ralph lauren outlet louboutin louboutin uk dansko shoes dansko sandals hermes bags hermes handbags louboutin shoes air jordans jordans mbt shoes michael kors outlet michael kors outlet online fit flops fitflops clarks shoes clarks outlet salomon shoes clarks shoes clarks outlet salomon shoes salomon shoes outletfitflop sandals fitflops mbt shoes rolex replica watches rolex replica rolex replica watches rolex watches fake rolex under armour shoes cat shoes dansko outletdansko outlet store valentino shoes valentino shoes outlet giuseppe zanotti outlet giuseppe zanotti sneakers parker pens supra shoes ysl handbags birkenstock outlet birkenstock sandals columbia shoes columbia outlet online tory burch outlettory burch outlet store polo ralph lauren longchamp bags longchamp uk pandora charms pandora charms uk adidas pas cher pandora bijoux birkenstock pas cher pandora jewelry nike air max pas cher nike air max polo ralph lauren adidas superstarsac michael kors pandora soldes nike store burberry outlet ray ban sunglasses discount ray ban sunglasses ecco shoes ralph lauren uk ralph lauren outlet ugg outlet ralph lauren outlet polo ralph lauren outlet pandora charms pandora jewelryugg outlet ugg outlet store jordan retro jordan retro 11 coach outlet coach outlet online michael kors outlet michael kors handbags ugg outlet ugg boots uggs ugg outlet michael kors outlet michael kors outlet store coach factory outlet coach outlet cheap nfl jerseys nfl jerseys wholesale Monday 2017.7.17

Permalink

Truly dazzling disperse. I make out the print entire and going to chat with my open circles. I encountered you and expecting to modify it in division blog site page.
http://www.rimjhimkhanna.com/gurgaon-escorts.html    |  
http://www.wexte.biz/      |  
http://www.russianmodelsescorts.com/  |  
http://www.russianmodelsescorts.com/gurgaon-escorts/  |  
http://www.rimjhimkhanna.com/   
Gurgaon Escorts
Female Escorts in Gurgaon
Escorts in Gurgaon
Independent Escorts in Gurgaon

 

Permalink

Extraordinary post. I was checking constantly this blog and I am awed! Exceptionally helpful data
particularly the last part :) I Delhi Escorts look after such information much. I was searching for this specific data
for quite a while. Much obliged to you and good luck . 

Permalink

Hello friends I am Tejal  I am 5 star escort queen in the 5 escort
And I also a website provider and did you intersect in my job
Click my website and there my number in top please  contact to me
And I will provide the best 5 star escort girls

http://lailachamma.com/

hello friend i am Tejal roy
click my website 

 

Permalink

Add new comment

The content of this field is kept private and will not be shown publicly.