GET url parameter


I’m working with wordpress plugin and i’m using beforeFilter to change the default SELECT query, but i need to read a parameter from url something like


where id_doctor is the parameter that i need to read in this function in dhtmlxSchedulerConfiguratorLoad.php

public function mySelect($action) { $action->add("id_doctor", $_GET["id_doctor"]); }

But i can’t read it, i hope you can help me

Dataprocessor script has not access to the original URL of the page.
You need to locate where next line is added on the page

var dp = new dataProcessor(some_url);

and change it as

var dp = new dataProcessor(some_url+"&id_doctor=<?php echo $_GET["id_doctor"]; ?>");

Hi stanislav, thanks for reply

I made the changes but i don’t know how to use the id_doctor variable in mySelect function, here is what i made in var dp = new dataProcessor(…

$scheduler .= " scheduler.init(\"scheduler_here\",null,\"".$defaultmode."\"); scheduler.load(\"".$loader_url."\"+scheduler.uid()); var dp = new dataProcessor(\"".$loader_url."&id_doctor=".$_GET['id_doctor']."\"+scheduler.uid()); dp.init(scheduler);";

and my function

public function mySelect($action) { $action->add("id_doctor", $_GET["id_doctor"]); //$action->add("id_doctor", 1); }

and the call of the function

$this->scheduler->event->attach("beforeFilter", Array($this, "mySelect"));

Also i send you the dhtmlxSchedulerConfigurator.php file (11.2 KB)

Try to use the updated file (attached) (11.2 KB)

Hi Stanislav

It worked, thank you but i had to add this line to see the events by id_doctor

scheduler.load(\"".$loader_url."\"+scheduler.uid()+\"&id_doctor=".$_GET['id_doctor']."\"); var dp = new dataProcessor(\"".$loader_url."\"+scheduler.uid()+\"&id_doctor=".$_GET['id_doctor']."\");

Merry Christmas and Happy New Year :wink: