Web Hosting Talk







View Full Version : Kayako Widget Question


jerett
11-03-2006, 03:52 PM
Greetings All!

Before we start - let first say that I have posted this in the kayako forum but felt I there might be someone here on WHT that could lend me some level of assistance being that many providers use this helpdesk. With that said ...

I was wondering if anyone knew how to make additional (forums, billing, etc) widgets that have been added to the main index page of kayako ONLY appear to registered visitors.

Thank you in advance for any help you might be able to provide - if not - it was worth a shot.

Jerett

Nick H
11-03-2006, 05:19 PM
support@kayako.com and hope they understand your question ;)

That's my tip. It usually provides me with endless entertainment as they try to understand English :D

jerett
11-03-2006, 05:26 PM
Well I hope it isn't that hard to understand. Much like you can make the KB and News area only appear for registered users - I would like to make my custom widgets appear only for registered users as well.

Notice the Download's widget code compared to the custom Tutorial widget code. Any suggestions how to make that only appear to registered users?

The other thing - it's not a true module.

// ======= DOWNLOADS =======
if ($module->isRegistered(MODULE_DOWNLOADS) && $_SWIFT["settings"]["dl_enableclient"] == 1 && $_SWIFT["user"]["permissions"]["perm_canviewdownloads"] != "0")
{
$_widgets[$index]["icon"] = $_SWIFT["themepath"]."downloads.gif";
$_widgets[$index]["title"] = $_SWIFT["language"]["downloads"];
$_widgets[$index]["description"] = $_SWIFT["language"]["desc_downloads"];
$_widgets[$index]["link"] = "index.php?_m=downloads&_a=view";

$template->assign("cansearch", true);
$template->assign("dlcansearch", true);

$index++;}

// ======= TUTORIALS=======
{
$_widgets[MODULE_TUTORIALS]["icon"] = $_SWIFT["themepath"]."flash.gif";
$_widgets[MODULE_TUTORIALS]["title"] = "Flash Tutorials";
$_widgets[MODULE_TUTORIALS]["description"] = "Flash tutorials setup to help you with the basic functions of your cPanel account.";
$_widgets[MODULE_TUTORIALS]["link"] = "index.php?_m=knowledgebase&_a=view&parentcategoryid=3&pcid=2&nav=0,2";
}

liquid
11-03-2006, 06:03 PM
if ($module->isRegistered(MODULE_DOWNLOADS) && $_SWIFT["settings"]["dl_enableclient"] == 1 && $_SWIFT["user"]["permissions"]["perm_canviewdownloads"] != "0"){
$_widgets[MODULE_TUTORIALS]["icon"] = $_SWIFT["themepath"]."flash.gif";
$_widgets[MODULE_TUTORIALS]["title"] = "Flash Tutorials";
$_widgets[MODULE_TUTORIALS]["description"] = "Flash tutorials setup to help you with the basic functions of your cPanel account.";
$_widgets[MODULE_TUTORIALS]["link"] = "index.php?_m=knowledgebase&_a=view&parentcategoryid=3&pcid=2&nav=0,2";
}


If you wanted it to appear only when downloads are shown you could do that

Olate
11-03-2006, 06:04 PM
You can do a check with

if ($_SWIFT["user"]["loggedin"] == true)

jerett
11-03-2006, 06:26 PM
they both sound like they will work :) I really do appreciate your help on this.

Olate -

On the check - where would I place that snip'it of code?

jerett
11-03-2006, 06:30 PM
Olate - that worked!

Olate
11-03-2006, 06:35 PM
Excellent, you got it then. :)