Git Product home page Git Product logo

linklist's People

Contributors

andystrobel avatar buddh4 avatar fosbot avatar gevorgmansuryan avatar humhub-bot avatar luke- avatar marc-farre avatar schobele avatar themroc avatar tobciu avatar yurabakhtin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linklist's Issues

Remove CActiveForm

This module is not working anymore with Humhub 1.11 because of CActiveForm.

Feature Request - Images and Featured Links

Is it possible to add an optional image to the links that would show up where the link icon currently shows up?

Also, is it possible to have an optional "featured link" block in the sidebar that shows the image, name and description and links to the listed webpage?

We've been seeking a way to acknowledge our nonprofit sponsors on our new HumHub website and I think with these two enhancements, your module would totally work for us.

Great module and very versatile! Thanks for your great work!

Non sticky main page selection

I have some spaces with main pages pointing to some modules, for instance my download area space posts to cfiles.
When trying to do the same using LinkList after a few time (like an hour or so) it reverts to the default chat area.

62780CA6-8FCE-4FF8-8420-DB42BD639BA7

input valadation bug - Use of undefined constant MCRYPT_DEV_URANDOM - assumed 'MCRYPT_DEV_URANDOM'

video
http://screencast-o-matic.com/watch/conZhGeEBJ

error page
http://screencast.com/t/ta4Yfp24

this is the code I put in the link field:

<!-Local Time Clock widget - HTML code - localtimes.info --><div align="center" style="margin:15px 0px 0px 0px;background:#000000;width:200px;padding:12px"><noscript><div align="center" style="width:140px;border:1px solid #ccc;background:#fff ;color: #fff ;font-weight:bold"><a style="padding:2px 1px;margin:2px 1px;font-size:12px;line-height:16px;font-family:arial;text-decoration:none;color:#000" href="http://localtimes.info">World Time </a></div></noscript><script type="text/javascript" src="http://localtimes.info/world_clock.php?widget_number=11001&cp3_Hex=FF0000&cp2_Hex=000000&cp1_Hex=FFFFFF"></script></div><!-end of code-->

PHP notice

Use of undefined constant MCRYPT_DEV_URANDOM - assumed 'MCRYPT_DEV_URANDOM'

/var/www/html/protected/vendors/Codeigniter/CI_Security.php(568)

556      *
557      * @param    int    $length    Output length
558      * @return    string
559      */
560     public function get_random_bytes($length)
561     {
562         if (empty($length) OR ! ctype_digit((string) $length))
563         {
564             return FALSE;
565         }
566 
567         // Unfortunately, none of the following PRNGs is guaranteed to exist ...
568         if (defined(MCRYPT_DEV_URANDOM) && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE)
569         {
570             return $output;
571         }
572 
573 
574         if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE)
575         {
576             $output = fread($fp, $length);
577             fclose($fp);
578             if ($output !== FALSE)
579             {
580                 return $output;

Stack Trace
#0  
–
 /var/www/html/protected/vendors/Codeigniter/CI_Security.php(543): CI_Security->get_random_bytes(16)

538      */
539     public function xss_hash()
540     {
541         if ($this->_xss_hash === NULL)
542         {
543             $rand = $this->get_random_bytes(16);
544             $this->_xss_hash = ($rand === FALSE)
545                 ? md5(uniqid(mt_rand(), TRUE))
546                 : bin2hex($rand);
547         }
548 

#1  
–
 /var/www/html/protected/vendors/Codeigniter/CI_Security.php(921): CI_Security->xss_hash()

916      */
917     protected function _decode_entity($match)
918     {
919         // Protect GET variables in URLs
920         // 901119URL5918AMP18930PROTECT8198
921         $match = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-/]+)|i', $this->xss_hash().'\\1=\\2', $match[0]);
922 
923         // Decode, then un-protect URL GET vars
924         return str_replace(
925             $this->xss_hash(),
926             '&',

#2  
 unknown(0): CI_Security->_decode_entity(array("<div align="center" style="margin:15px 0px 0px 0px;background:#0..."))
#3  
–
 /var/www/html/protected/vendors/Codeigniter/CI_Security.php(377): preg_replace_callback("/<\w+.*/si", array(Security, "_decode_entity"), "<!-Local Time Clock widget - HTML code - localtimes.info --><div...")

372          * This permits our tests below to work reliably.
373          * We only convert entities that are within tags since
374          * these are the ones that will pose security problems.
375          */
376         $str = preg_replace_callback("/[^a-z0-9>]+[a-z0-9]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str);
377         $str = preg_replace_callback('/<\w+.*/si', array($this, '_decode_entity'), $str);
378 
379         // Remove Invisible Characters Again!
380         $str = remove_invisible_characters($str);
381 
382         /*

#4  
–
 /var/www/html/protected/vendors/Codeigniter/CI_Security.php(345): CI_Security->xss_clean("<!-Local Time Clock widget - HTML code - localtimes.info --><div...")

340         // Is the string an array?
341         if (is_array($str))
342         {
343             while (list($key) = each($str))
344             {
345                 $str[$key] = $this->xss_clean($str[$key]);
346             }
347 
348             return $str;
349         }
350 

#5  
–
 /var/www/html/protected/vendors/Codeigniter/CI_Security.php(345): CI_Security->xss_clean(array("title" => "bug", "description" => "", "href" => "<!-Local Time Clock widget - HTML code - localtimes.info --><div...", "sort_order" => ""))

340         // Is the string an array?
341         if (is_array($str))
342         {
343             while (list($key) = each($str))
344             {
345                 $str[$key] = $this->xss_clean($str[$key]);
346             }
347 
348             return $str;
349         }
350 

#6  
–
 /var/www/html/protected/extensions/CmsInput.php(106): CI_Security->xss_clean(array("CSRF_TOKEN" => "686003aa836d351e0960445c2ad37e5dc77b624b", "Link" => array("title" => "bug", "description" => "", "href" => "<!-Local Time Clock widget - HTML code - localtimes.info --><div...", "sort_order" => ""), "yt0" => "Save"), false)

101      * @param bool $isImage
102      * @return
103      */
104     public function xssClean($str, $isImage=false)
105     {
106         return $this->getSecurity()->xss_clean($str, $isImage);
107     }
108 
109     /**
110      * CmsInput::stripTags()
111      * 

#7  
–
 /var/www/html/protected/extensions/CmsInput.php(167): CmsInput->xssClean(array("CSRF_TOKEN" => "686003aa836d351e0960445c2ad37e5dc77b624b", "Link" => array("title" => "bug", "description" => "", "href" => "<!-Local Time Clock widget - HTML code - localtimes.info --><div...", "sort_order" => ""), "yt0" => "Save"))

162      * @param mixed $str
163      * @return
164      */
165     public function stripClean($str)
166     {
167         return $this->stripTags($this->xssClean($str));
168     }
169     
170     /**
171      * CmsInput::encode()
172      * 

#8  
–
 /var/www/html/protected/modules/linklist/controllers/LinklistController.php(246): CmsInput->stripClean(array("CSRF_TOKEN" => "686003aa836d351e0960445c2ad37e5dc77b624b", "Link" => array("title" => "bug", "description" => "", "href" => "<!-Local Time Clock widget - HTML code - localtimes.info --><div...", "sort_order" => ""), "yt0" => "Save"))

241         else if($this->accessLevel == 1 && $link->content->created_by != Yii::app()->user->id) {
242             throw new CHttpException(404, Yii::t('LinklistModule.base', 'You miss the rights to edit this link!'));
243         }
244         
245         if (isset($_POST['Link'])) {
246             $_POST = Yii::app()->input->stripClean($_POST);
247         
248             $link->attributes = $_POST['Link'];
249             $link->content->container = $this->contentContainer;
250             if ($link->validate()) {
251                 $link->save();

#9  
–
 /var/www/html/protected/vendors/yii/web/actions/CInlineAction.php(49): LinklistController->actionEditLink()

44         $controller=$this->getController();
45         $method=new ReflectionMethod($controller, $methodName);
46         if($method->getNumberOfParameters()>0)
47             return $this->runWithParamsInternal($controller, $method, $params);
48         else
49             return $controller->$methodName();
50     }
51 
52 }

#10     
–
 /var/www/html/protected/vendors/yii/web/CController.php(308): CInlineAction->runWithParams(array("r" => "linklist/linklist/editLink", "link_id" => "-1", "category_id" => "3", "sguid" => "e124b231-2ad2-46db-ab55-adcaad1a736a"))

303     {
304         $priorAction=$this->_action;
305         $this->_action=$action;
306         if($this->beforeAction($action))
307         {
308             if($action->runWithParams($this->getActionParams())===false)
309                 $this->invalidActionParams($action);
310             else
311                 $this->afterAction($action);
312         }
313         $this->_action=$priorAction;

#11     
–
 /var/www/html/protected/vendors/yii/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)

128             $filter=$this->itemAt($this->filterIndex++);
129             Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain');
130             $filter->filter($this);
131         }
132         else
133             $this->controller->runAction($this->action);
134     }
135 }

#12     
–
 /var/www/html/protected/vendors/yii/web/filters/CFilter.php(40): CFilterChain->run()

35      */
36     public function filter($filterChain)
37     {
38         if($this->preFilter($filterChain))
39         {
40             $filterChain->run();
41             $this->postFilter($filterChain);
42         }
43     }
44 
45     /**

#13     
–
 /var/www/html/protected/vendors/yii/web/CController.php(1145): CFilter->filter(CFilterChain)

1140      */
1141     public function filterAccessControl($filterChain)
1142     {
1143         $filter=new CAccessControlFilter;
1144         $filter->setRules($this->accessRules());
1145         $filter->filter($filterChain);
1146     }
1147 
1148     /**
1149      * Returns a persistent page state value.
1150      * A page state is a variable that is persistent across POST requests of the same page.

#14     
–
 /var/www/html/protected/vendors/yii/web/filters/CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)

53      * @param CFilterChain $filterChain the filter chain that the filter is on.
54      */
55     public function filter($filterChain)
56     {
57         $method='filter'.$this->name;
58         $filterChain->controller->$method($filterChain);
59     }
60 }

#15     
–
 /var/www/html/protected/vendors/yii/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)

125     {
126         if($this->offsetExists($this->filterIndex))
127         {
128             $filter=$this->itemAt($this->filterIndex++);
129             Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain');
130             $filter->filter($this);
131         }
132         else
133             $this->controller->runAction($this->action);
134     }
135 }

#16     
–
 /var/www/html/protected/vendors/yii/web/CController.php(291): CFilterChain->run()

286             $this->runAction($action);
287         else
288         {
289             $priorAction=$this->_action;
290             $this->_action=$action;
291             CFilterChain::create($this,$action,$filters)->run();
292             $this->_action=$priorAction;
293         }
294     }
295 
296     /**

#17     
–
 /var/www/html/protected/vendors/yii/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("accessControl"))

260         {
261             if(($parent=$this->getModule())===null)
262                 $parent=Yii::app();
263             if($parent->beforeControllerAction($this,$action))
264             {
265                 $this->runActionWithFilters($action,$this->filters());
266                 $parent->afterControllerAction($this,$action);
267             }
268         }
269         else
270             $this->missingAction($actionID);

#18     
–
 /var/www/html/protected/vendors/yii/web/CWebApplication.php(282): CController->run("editLink")

277         {
278             list($controller,$actionID)=$ca;
279             $oldController=$this->_controller;
280             $this->_controller=$controller;
281             $controller->init();
282             $controller->run($actionID);
283             $this->_controller=$oldController;
284         }
285         else
286             throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
287                 array('{route}'=>$route===''?$this->defaultController:$route)));

#19     
–
 /var/www/html/protected/vendors/yii/web/CWebApplication.php(141): CWebApplication->runController("linklist/linklist/editLink")

136             foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
137                 $_GET[$name]=$value;
138         }
139         else
140             $route=$this->getUrlManager()->parseUrl($this->getRequest());
141         $this->runController($route);
142     }
143 
144     /**
145      * Registers the core application components.
146      * This method overrides the parent implementation by registering additional core components.

#20     
–
 /var/www/html/protected/vendors/yii/base/CApplication.php(180): CWebApplication->processRequest()

175     public function run()
176     {
177         if($this->hasEventHandler('onBeginRequest'))
178             $this->onBeginRequest(new CEvent($this));
179         register_shutdown_function(array($this,'end'),0,false);
180         $this->processRequest();
181         if($this->hasEventHandler('onEndRequest'))
182             $this->onEndRequest(new CEvent($this));
183     }
184 
185     /**

#21     
–
 /var/www/html/index.php(39): CApplication->run()

34 Yii::import('application.vendors.*');
35 EZendAutoloader::$prefixes = array('Zend', 'Custom');
36 Yii::import("ext.yiiext.components.zendAutoloader.EZendAutoloader", true);
37 Yii::registerAutoloader(array("EZendAutoloader", "loadClass"), true);
38 
39 $app->run();

2015-02-24 05:55:40 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.15

Max Length of Description

Long term of linkpreview's description get visibility down especially mobile browsing. I suggest setting maximum length for the description data if the link HTML have a long term for description meta tag data.

I think description can be cut in the controller getting the data, or omit it when view display it.

Example)
linkpreview/widgets/views/view.php line 29

<div class="description"><?= \humhub\modules\content\widgets\richtext\RichText::Preview(Html::encode($linkPreview->description), 180) ?></div>

Import Export

For sharing a linklist created with a group it would be nice to import or export this thing. In my opinion csv would be an easy format for this.

Option to use Topics for Categories

For consistency of experience, using Topics as Categories would help, and as search for a topic could also show the related links in the results.

Permissions for editing linklists

Linklist is a great module for humhub to store all relevant link in one place.

However, everyone can create, edit and delete links. How is it possible to limit permissions? For example:

  • everyone can create links or just moderators and admins can create links
  • everyone can edit & delete or just the creator of the link can edit & delete or just moderators can edit & delete

The permission function would be very valuable to reduce unintended changes. Thank you.

Option to move list to another space

Sometimes a list is generated in one space an than used in another. For this it would be nice to have an option to move a list to another space.

Permissions for Link List extension

Hi i use the Link List in version 0.7.3

I can't find any option in the security settings that prevents the modification or deletion of the registered links. It would be desirable to have it similar to the Files extension. There you can make the settings separately. It would be a pity if a maintained link collection can be deleted by any person.

Greetings A.B.

Error on edit category page

Using the latest version of the plugin, get this error:
`PHP Fatal Error – yii\base\ErrorException

Class 'humhub\modules\linklist\models\Yii' not found

  1. in protected\modules\humhub-modules-linklist-master\models\Category.php at line 76

    /**

    • @return array customized attribute labels (name=>label)
      */
      public function attributeLabels()
      {
      return array(
      'id' => 'ID',
      'title' => Yii::t('LinklistModule.models_Category', 'Title'),
      'description' => Yii::t('LinklistModule.models_Category', 'Description'),
      'sort_order' => Yii::t('LinklistModule.models_Category', 'Sort Order'),
      );
      }

}
2. yii\base\ErrorHandler::handleFatalError()`

Space member with read only permissions can still add link

A space member who has only read permissions can still add a link even though he/she is not even allowed to create posts/comments.

It looks as permissions are not implemented yet (subfolder permissions is absent in the module). I'd think one would have to add two permissions:

  • CreateLink
  • AddCategory

For the last one I am not completely sure... the availability of the button seems to be connected to some other security setting. Nevertheless I'd consider it as more transparent if both settings can be maintained in the space properties security tab.

Kind regards,
Michael

Add link permission

A normal user could add link in a space even if the permission in it was read only.
Would be useful to disable the "add link" button even without check the space's permission.

Just a static value like "disable link addtions to user" can increase dramatically the security of a space.

Sorting linklist

Currently, it is only possible to sort linklists with a number manually. Otherwise, it is sorted by due date (or what was created first is at the top).

It would be useful to have a sorting function for links in a category but also sort categories. The sorting function can be:

  • creation date
  • name (alphabetically)
  • manually (with a number as it is done right now)

Maybe there are also some other sorting options.

This would be useful to save time by sorting a greater number of links or categories. Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.