1
alain01
Bug : Grant access to Xoopstube
  • 2012/12/31 17:47

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Hi,

there is a bug with grant access on Xoopstube.

If i create a private category, category is visible just for the authorised group, but
the videos in this category are visibles for anonymous :
- in the last new video (on the main page on the module)
- in direct link to the videos (http://mysite.com/modules/xoopstube/singlevideo.php?cid=6&lid=16)

===============================
Moreover, in order to use internal video : (Big tx to Nikita in French Support)

- modules/xoopstube/submit.php
replace near line 254
109 => _MD_XTUBE_MEGAVIDEO
by
109 => _MD_XTUBE_MEGAVIDEO
200 => _MD_XTUBE_XOOPSTUBE


- Add the define "_MD_XTUBE_XOOPSTUBE" in the main.php language file

- In modules/xoopstube/admin/main.php
near line 117 replace
109 => _AM_XTUBE_MEGAVIDEO
by
109 => _AM_XTUBE_MEGAVIDEO
200 => _AM_XTUBE_XOOPSTUBE


Now,
in the submit page,
you can choose "Xoopstube" in the list then put in "Id-Code vidéo:" myvideo.flv
(Video in flv format located in the video directory, see the module preferences)



2
Mamba
Re: Bug : Grant access to Xoopstube
  • 2013/1/2 17:44

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Thanks, Alain!

I have added your/Nikita's addition, and have fixed the issue of individual direct private links being visible to everybody. The SVN is now updated. I also added the file to SourceForge File Repository as 1.051 RC1.

Please test it.

Reg. the "last new video", it seems to me that it would require a more serious rewriting, so unless somebody else could do it, we'll need to postpone for the next release.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
alain01
Re: Bug : Grant access to Xoopstube
  • 2013/1/2 23:53

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


ok, tested the 1.051 RC1.

- Can add an internal movie in flv format : => OK now
- Grant right and permission ok for catogory : => OK now

- Last new video : Not ok, but the link doesn't send to the video if permission is restricted

Please, change the all fr directory language for this module by this one :
http://dl.free.fr/nUSUtoL1N

Then, please, modifed your URL in news "Basic Module Pack for XOOPS 2.5.5 (recently updated Final releases)" and in your associated post in the forum.

4
Mamba
Re: Bug : Grant access to Xoopstube
  • 2013/1/3 1:40

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Alain, the translation and the download links are updated now.

Thanks for your help on this.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

5
alain01
Re: Bug : Grant access to Xoopstube
  • 2013/1/3 14:08

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Big Big thanks to nikita to solved the permission bug on "last videos" :

In modules/xoopstube/index.php

Remplacer
Quote:
while ($video_arr = $xoopsDB->fetchArray($result)) {
$res_type = 0;
$moderate = 0;
$cid = $video_arr['cid'];
require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/videoloadinfo.php';
$xoopsTpl->append('video', $video);
}


by

Quote:
while ($video_arr = $xoopsDB->fetchArray($result)) {
if (xtube_checkgroups($video_arr['cid']) == true) {
$res_type = 0;
$moderate = 0;
$cid = $video_arr['cid'];
require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/videoloadinfo.php';
$xoopsTpl->append('video', $video);
}
}


Tested and all for that is ok !

But found another bug :

if miniatures is enabled, the systeme generates pictures (for category for example) in a "thumbs" subdirectory but the new pictures lost transparence (png format)

6
Mamba
Re: Bug : Grant access to Xoopstube
  • 2013/1/3 14:44

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


First, I am very happy to see the contributions to bug fixing! This is great!

On this particular bug, I am not sure, I understand the fix?

In my case, I don't see a difference - it still lists all the days, and I can click on the link for a particular day, and see the thumb of the video. In both cases, when I click on the video thumb, it checks permissions, and if I don't have it, it creates an error message.

[EDIT]
OK, I see it now - it is related to the main page.

I was thinking that it is related to the "Latest Listings" link:

xoopstube/newlist.php?newvideoshowdays=7

which still needs to be fixed.

But on the front page, I don't see a difference with or without the fix. It still shows only categories the user is entitled to see, but when I click on a particular letter, it still shows the video thumbnail.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
alain01
Re: Bug : Grant access to Xoopstube
  • 2013/1/3 15:19

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Hoooo !

True, permission solved in index page

but not in :

- /xoopstube/viewcat.php?selectdate=xxxxxxx
- /xoopstube/viewcat.php?list=

8
alain01
Re: Bug : Grant access to Xoopstube
  • 2013/1/3 23:21

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


In the modules/xoopstube/viewcat.php file

Remplace
while ($video_arr $xoopsDB->fetchArray($result)) { 
        require 
XOOPS_ROOT_PATH '/modules/' $xoopsModule->getVar('dirname') . '/include/videoloadinfo.php'
        
$xoopsTpl->append('video'$video); 
    }

By
while ($video_arr $xoopsDB->fetchArray($result)) { 
    if (
xtube_checkgroups($video_arr['cid']) == true) { 
        require 
XOOPS_ROOT_PATH '/modules/' $xoopsModule->getVar('dirname') . '/include/videoloadinfo.php'
        
$xoopsTpl->append('video'$video); 
        } 
    }


It's ok with this code.
Nikita said that for multi page, there is a trouble, and that is complex to fix it...

9
Mamba
Re: Bug : Grant access to Xoopstube
  • 2013/1/4 3:53

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
It's ok with this code.

Yes, that works! Thanks!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

10
alain01
Re: Bug : Grant access to Xoopstube
  • 2013/1/4 8:20

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Yet that :

For singlevideo.php, for "other videos from : X"
Replace
while ($arr $xoopsDB->fetchArray($result)) { 
    
$videouid['title']     = $xtubemyts->htmlSpecialCharsStrip($arr['title']); 
    
$videouid['lid']       = $arr['lid']; 
    
$videouid['cid']       = $arr['cid']; 
    
$videouid['published'] = xoopstube_time(formatTimestamp($arr['published'], $xoopsModuleConfig['dateformat']));
    
$xoopsTpl->append('video_uid'$videouid); 
}

by
while ($arr $xoopsDB->fetchArray($result)) { 
    if (
xtube_checkgroups($arr['cid']) == true) { 
    
$videouid['title']     = $xtubemyts->htmlSpecialCharsStrip($arr['title']); 
    
$videouid['lid']       = $arr['lid']; 
    
$videouid['cid']       = $arr['cid']; 
    
$videouid['published'] = xoopstube_time(formatTimestamp($arr['published'], $xoopsModuleConfig['dateformat']));
    
$xoopsTpl->append('video_uid'$videouid); 
    } 
}



Login

Who's Online

197 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 197


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits