Scheduler for Joomla: "new event" text

Is there a way to replace the standard “new event” text in Scheduler for Joomla with the logged in user name?

Thanks for your hints,

Thomas

Modify dhtmlxSchedulerConfigurator.php file like here:

   public function schedulerInit() {
   ...
   global $current_user;
   get_currentuserinfo();
   $scheduler .= "scheduler.locale.labels.new_event = '".$current_user->data->user_nicename."';";
   $defaultmode = $settings['settings_defaultmode'];
   $scheduler .= "var default_mode = '{$defaultmode}';\n";
   ...

Hi Radyino,

thank you so much for your reply! As a not very experienced php user I assume, I have to insert the part between the “…”"…" into the section “public function schedulerInit() {”, correct?
I’ve tried this, but Scheduler then gives me a blank page…?

Is there anything I missed?

Thomas

Find code:

   $defaultmode = $settings['settings_defaultmode'];
   $scheduler .= "var default_mode = '{$defaultmode}';\n";

and insert before it 3 lines to make code like in previous post.

…please forgive my ignorance, but I’m unable to fix it:

I found the line “$defaultmode = $settings[‘settings_defaultmode’];”
but the following one " $scheduler .= “var default_mode = ‘{$defaultmode}’;\n”;" is not in my .php file.

Tried to add this one as well as the proceeding 3 lines, but I always end up in a blank screen. Shouldn’t there be a definition of $global_user =? (Sorry if that’s all basic for you, but as I said, I’m not very familiar with it - yet… :slight_smile:

Thomas

I’m sorry. I thought asked me about Wordpress and written code is correct for Wordpress.
Please, insert code:

	$user =& JFactory::getUser();
	$scheduler .= "scheduler.locale.labels.new_event = '".$user->name."';";

before:

	@$include_content = file_get_contents($url.$this->scheduler_include_file);
	if ($include_content) {
		$scheduler .= "</script>";
		$scheduler .= $include_content;
		$scheduler .= "<script type=\"text/javascript\" charset=\"utf-8\">";
	}

So you should have something like this:

	$user =& JFactory::getUser();
	$scheduler .= "scheduler.locale.labels.new_event = '".$user->name."';";
	@$include_content = file_get_contents($url.$this->scheduler_include_file);
	if ($include_content) {
		$scheduler .= "</script>";
		$scheduler .= $include_content;
		$scheduler .= "<script type=\"text/javascript\" charset=\"utf-8\">";
	}

Radyno,

thank you a 1000 times! That’s perfect - it works like a charm! Absolutely perfect! :slight_smile:

Have a great day,
Thomas