- Posts: 30
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to create a new plugin view in lime survey?
- siddhantwankar
- Topic Author
- Offline
- Junior Member
Less
More
7 years 2 weeks ago #152012
by siddhantwankar
How to create a new plugin view in lime survey? was created by siddhantwankar
Hello,
I am using lime survey Version 2.64.3+170327 and I am new in plugin development. I go through the manual Add new menu and view by a plugin and added the code as given in manual.
//***Plginn Class file
<?php
use \ls\menu\MenuItem;
use \ls\menu\Menu;
class Forum extends PluginBase {
protected $storage = 'DbStorage';
static protected $description = 'Forum';
static protected $name = 'Forum';
public function init()
{
$this->subscribe('beforeAdminMenuRender');
}
public function beforeAdminMenuRender()
{
// Create the URL to the plugin action
$url = $this->api->createUrl(
'admin/pluginhelper',
array(
'sa' => 'fullpagewrapper',
'plugin' => $this->getName(),
'method' => 'actionIndex' // Method name in our plugin
)
);
// Append menu
$event = $this->getEvent();
$event->append('extraMenus', array(
new Menu(array(
'label' => 'Forum label',
'href' => $url
))
));
}
/**
* @return string html
*/
public function actionIndex()
{
return "This is the content of the side-body";
}
}
//****/view/index.php file
<div class='container-fluid'>
<h3 class='pagetitle'>A page</h3>
<div class='row'>
<div class='col-sm-6'>
<p>Left column</p>
</div>
<div class='col-sm-6'>
<p>Right column</p>
</div>
</div>
</div>
Menu added in admin menu
Landing page view
I tried to search in admincontroller.php page but not get any hint.
Please help me in the plugin view creation.
Thanks & Regard
Siddhant Wankar
I am using lime survey Version 2.64.3+170327 and I am new in plugin development. I go through the manual Add new menu and view by a plugin and added the code as given in manual.
//***Plginn Class file
<?php
use \ls\menu\MenuItem;
use \ls\menu\Menu;
class Forum extends PluginBase {
protected $storage = 'DbStorage';
static protected $description = 'Forum';
static protected $name = 'Forum';
public function init()
{
$this->subscribe('beforeAdminMenuRender');
}
public function beforeAdminMenuRender()
{
// Create the URL to the plugin action
$url = $this->api->createUrl(
'admin/pluginhelper',
array(
'sa' => 'fullpagewrapper',
'plugin' => $this->getName(),
'method' => 'actionIndex' // Method name in our plugin
)
);
// Append menu
$event = $this->getEvent();
$event->append('extraMenus', array(
new Menu(array(
'label' => 'Forum label',
'href' => $url
))
));
}
/**
* @return string html
*/
public function actionIndex()
{
return "This is the content of the side-body";
}
}
//****/view/index.php file
<div class='container-fluid'>
<h3 class='pagetitle'>A page</h3>
<div class='row'>
<div class='col-sm-6'>
<p>Left column</p>
</div>
<div class='col-sm-6'>
<p>Right column</p>
</div>
</div>
</div>
Menu added in admin menu
Landing page view
I tried to search in admincontroller.php page but not get any hint.
Please help me in the plugin view creation.
Thanks & Regard
Siddhant Wankar
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
7 years 2 weeks ago #152016
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How to create a new plugin view in lime survey?
This has nothing to do with "installation and update issues". It should be posted in the forums "Plugins".
Therefore I will move it to the other forum.
Therefore I will move it to the other forum.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: siddhantwankar
The topic has been locked.
- siddhantwankar
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 1
7 years 2 weeks ago #152045
by siddhantwankar
Replied by siddhantwankar on topic How to create a new plugin view in lime survey?
Thnx Holch for to add it in right forum.
please any one help to solve this basic problem. I have stuck here and not getting any way for the issue is there any default plugin that I can refer for my development.
Thanks & Regards
Siddhant Wankar
please any one help to solve this basic problem. I have stuck here and not getting any way for the issue is there any default plugin that I can refer for my development.
Thanks & Regards
Siddhant Wankar
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
6 years 10 months ago #155511
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to create a new plugin view in lime survey?
This page was totally outdated .... we must remove it.
I think you can use actionIndex currently.
framagit.org/SondagePro-LimeSurvey-plugi...tsPivotTable.php#L77
I think you can use actionIndex currently.
framagit.org/SondagePro-LimeSurvey-plugi...tsPivotTable.php#L77
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.