21
Mamba
Re: XOOPS Basic Module Pack - Beta 1: marquee
  • 2011/8/19 9:12

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
Module marquee
No images in /Frameworks/moduleclasses/moduleadmin/images/admin and /action.

I've uploaded the updated files. Please download again Marquee from SourceForge SVN
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

22
zyspec
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/19 19:38

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Roby73, I just checked in a fix for the viewcat.php problem (titleA) and to fix the MySQL call in topten block(s).

You should be able to download the latest version from SVN to verify this fixes the problem.

Thanks for helping debug the modules!

23
Mamba
Re: XOOPS Basic Module Pack - Beta 1: MyLinks fix
  • 2011/8/19 20:13

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Thanks Zyspec for the fix!

BTW - this is the direct download link to MyLinks on SourceForge SVN
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

24
Roby73
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/19 23:07

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Thanks!!!

25
Roby73
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/20 0:35

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Other probable bug in mylinks.
The number of total links reported is not equal with the sum of the links displayed in the categories.

The total displayed is correct.

ES:

category1(4) category2(6) category3(6) <---- 16 links total wrong

Total links (20) <--- this is correct!

In the file myblocksadmin.php missing definition costant language. (search costants in /module/system/admin.)
_MI_MYLINKS_BNAME1
_MI_MYLINKS_BNAME2
_MI_MYLINKS_BNAME3

The costants are located in modinfo.php

Sorry for bad english

26
Roby73
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/21 0:50

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


The problem of the total link by category is in the file /include/funcions.php
in query:
$query "SELECT COUNT(*) FROM " $xoopsDB->prefix("mylinks_links") . " WHERE `cid` IN {$catIds}";
    if (
'' != $status){
        
$status  = (== intval($status)) ? 1;
        
$query .= " AND status='{$status}'";
    }

if status is equal to 2 (updated link) is not counted. Do not read the value in the database if is equal to 2.

If force control "AND status>0" the total is correct

27
zyspec
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/21 1:10

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Roby73,

I sent you a PM yesterday to let you know that I had found the problem and fixed it. If you can PM me your email address I'll send you the updated include/functions.php file for you to try. I wanted to see if you could try it before I checked the change into SVN.

28
Roby73
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/22 0:34

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Thank you very much, the file fix the problem.
There is another problem in mylinks.... Not true bug.... errors report with the /class/module.errorhandler.php is not very nice to see.
Ok for sql error but if missing title, url or description when submit form, is better another method.
What do you think?

29
zyspec
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/22 1:52

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


The fix has been checked into SVN so the link total in categories is now calculated correctly.

I agree that the form validation should probably be handled in a more user friendly manner (using javascript validation perhaps) but the current implementation does work. I'd recommend that this change be put as a feature request for a future release.

30
Roby73
Re: XOOPS Basic Module Pack - Beta 1: MyLinks
  • 2011/8/22 22:34

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


I try to modify the submit (submit.php) in:
if (!empty($_POST['submit'])) {

    include_once 
XOOPS_ROOT_PATH '/class/module.errorhandler.php';
    
$eh = new ErrorHandler//ErrorHandler object
    
$submitter = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0;

    
// RMV - why store submitter on form??
    /*
    if (!$_POST['submitter'] and $xoopsUser) {
       $submitter = $xoopsUser->uid();
    }elseif(!$_POST['submitter'] and !$xoopsUser) {
      $submitter = 0;
    }else{
      $submitter = intval($_POST['submitter']);
    }
  */
    // Check if Title exist
     
if ( !isset($_POST['title']) || ('' == $_POST['title']) ) {
         
$error[]=_MD_MYLINKS_ERRORTITLE;
     }
     
$title $myts->addSlashes($_POST['title']);

    
// Check if URL exist
    
$url $_POST['url'];
    if ( (!isset(
$url)) || ('' == $url) || ('http://' == $url)) {
        
$error[]=_MD_MYLINKS_ERRORURL;
    }
    
$url $myts->addSlashes($url);

    
// Check if Description exist
    
if ( '' == $_POST['message'] ) {
        
$error[]=_MD_MYLINKS_ERRORDESC;
    }
    if (isset(
$error)) {
    
$err=implode("",$error);
    
redirect_header('submit.php'2$err);
    exit();
    }

    
$notify      = !empty($_POST['notify']) ? 0;
    
$cid         mylinksUtility::mylinks_cleanVars($_POST'cid'0'int', array('min'=>0));
    
$description $myts->addSlashes($_POST['message']);
    
$date        time();
    
$newid       $xoopsDB->genId($xoopsDB->prefix('mylinks_links').'_lid_seq');

    
$mylinksAdmin = ( is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid()) ) ? true false;
    
$status       = ( ( == $xoopsModuleConfig['autoapprove'] ) || $mylinksAdmin ) ? 0;
    
$sql sprintf("INSERT INTO %s (lid, cid, title, url, logourl, submitter, status, date, hits, rating, votes, comments) VALUES (%u, %u, '%s', '%s', '%s', %u, %u, %u, %u, %u, %u, %u)"$xoopsDB->prefix("mylinks_links"), $newid$cid$title$url' '$submitter$status$date0000);
    
$xoopsDB->query($sql) or $eh->show('0013');
    if (
$newid == 0) {
        
$newid $xoopsDB->getInsertId();
    }
    
$sql sprintf("INSERT INTO %s (lid, description) VALUES (%u, '%s')"$xoopsDB->prefix("mylinks_text"), $newid$description);
    
$xoopsDB->query($sql) or $eh->show('0013');
    
// Notify of new link (anywhere) and new link in category.
    
$notification_handler =& xoops_gethandler('notification');
    
$tags = array();
    
$tags['LINK_NAME'] = $title;
    
$tags['LINK_URL'] = XOOPS_URL "/modules/" $xoopsModule->getVar('dirname') . "/singlelink.php?cid={$cid}&lid={$newid}";
    
$sql "SELECT title FROM " $xoopsDB->prefix("mylinks_cat") . " WHERE cid={$cid}";
    
$result $xoopsDB->query($sql);
    
$row $xoopsDB->fetchArray($result);
    
$tags['CATEGORY_NAME'] = $row['title'];
    
$tags['CATEGORY_URL'] = XOOPS_URL "/modules/" $xoopsModule->getVar('dirname') . "/viewcat.php?cid={$cid}";
    if ( 
== $xoopsModuleConfig['autoapprove'] ) {
        
$notification_handler->triggerEvent('global'0'new_link'$tags);
        
$notification_handler->triggerEvent('category'$cid'new_link'$tags);
        
redirect_header('index.php'2_MD_MYLINKS_RECEIVED "_MD_MYLINKS_ISAPPROVED "");
    } else {
        
$tags['WAITINGLINKS_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/admin/index.php?op=listNewLinks';
        
$notification_handler->triggerEvent('global'0'link_submit'$tags);
        
$notification_handler->triggerEvent('category'$cid'link_submit'$tags);
        if (
$notify) {
            include_once 
XOOPS_ROOT_PATH '/include/notification_constants.php';
            
$notification_handler->subscribe('link'$newid'approve'XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
        }
        
redirect_header('index.php'2_MD_MYLINKS_RECEIVED);
    }
    exit();
} else {

Is not very good solution but the errors display is better.

Login

Who's Online

374 user(s) are online (268 user(s) are browsing Support Forums)


Members: 0


Guests: 374


more...

Donat-O-Meter

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

Latest GitHub Commits