5661
Mamba
Re: Images width
  • 2015/6/27 18:51

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Quote:
I have problem with images width on Microsoft Internet Explorer.
On older versions of Xoops MIE respect maximum width and resize bigger images.

You have NOT mentioned which versions of IE are you using, and on which is it working and which it doesn't

How should we then test it?

I have tested it in my IE 11 and it worked OK.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



5662
Zirafka
Images width
  • 2015/6/26 19:21

  • Zirafka

  • Just popping in

  • Posts: 70

  • Since: 2008/8/9 1


I have problem with images width on Microsoft Internet Explorer.

On Fire Fox and Opera is all ok, but MIE do not respect maximum width of images. Like this (http://www.zirafoviny.cz/modules/news/article.php?storyid=204):

Resized Image
Opera


Resized Image
Firefox


Resized Image
Microsof Internet Explorer


Green header meaning that user is logged. On older versions of Xoops MIE respect maximum width and resize bigger images.

Theme: modified theme BlueX.

XOOPS: XOOPS 2.5.7.1
PHP: 5.3.2-1ubuntu4.30
mySQL: 5.1.73-0ubuntu0.10.04.1-log
Server: apache2handler
OS: Linux
safe_mode Off
register_globals Off
magic_quotes_gpc Off
allow_url_fopen On
fsockopen On
post_max_size 100M
max_input_time 60
output_buffering 4096
max_execution_time 30
memory_limit 128M
file_uploads On
upload_max_filesize 100M



5663
brutalicuss
Re: Rating system in publisher module

ops :)

for
xoops_version.php

replace
$modversion['config'][] = array(
    
'name'        => 'format_order_by',
    
'title'       => '_MI_PUBLISHER_ORDERBY',
    
'description' => '_MI_PUBLISHER_ORDERBYDSC',
    
'formtype'    => 'select',
    
'valuetype'   => 'text',
    
'options'     => array(
        
_MI_PUBLISHER_ORDERBY_TITLE  => 'title',
        
_MI_PUBLISHER_ORDERBY_DATE   => 'date',
        
_MI_PUBLISHER_ORDERBY_WEIGHT => 'weight'),
    
'default'     => 'date',
    
'category'    => 'format'
);


with
$modversion['config'][] = array(
    
'name'        => 'format_order_by',
    
'title'       => '_MI_PUBLISHER_ORDERBY',
    
'description' => '_MI_PUBLISHER_ORDERBYDSC',
    
'formtype'    => 'select',
    
'valuetype'   => 'text',
    
'options'     => array(
        
_MI_PUBLISHER_ORDERBY_TITLE  => 'title',
        
_MI_PUBLISHER_ORDERBY_DATE   => 'date',
        
_MI_PUBLISHER_ORDERBY_RATING => 'rating',
        
_MI_PUBLISHER_ORDERBY_VOTES  => 'votes',
        
_MI_PUBLISHER_ORDERBY_COMMENTS  => 'comments',
        
_MI_PUBLISHER_ORDERBY_WEIGHT => 'weight'),
    
'default'     => 'date',
    
'category'    => 'format'
);



for older ver of publisher
include/functions.php

this:
function publisherGetOrderBy($sort)
must be:
function publisher_GetOrderBy($sort)



5664
brutalicuss
Re: Rating system in publisher module

lol I did it

But this is not professional work and I think shouldnt use in official ver.
This is only for who wants to have all sorting option like me.

language/english/modinfo.php
add bellow:
define("_MI_PUBLISHER_ORDERBY_RATING","Rating DESC");
define("_MI_PUBLISHER_ORDERBY_VOTES","Votes DESC");
define("_MI_PUBLISHER_ORDERBY_COMMENTS","COMMENTS DESC");


xoops_version.php

replace:
$modversion['config'][$i]['options'] = array(_MI_PUBLISHER_PUBLISHED => _PUBLISHER_STATUS_PUBLISHED,
                                             
_MI_PUBLISHER_OFFLINE => _PUBLISHER_STATUS_OFFLINE,
                                             
_MI_PUBLISHER_SUBMITTED => _PUBLISHER_STATUS_SUBMITTED,
                                             
_MI_PUBLISHER_REJECTED => _PUBLISHER_STATUS_REJECTED);


with:
$modversion['config'][] = array(
    
'name'        => 'format_order_by',
    
'title'       => '_MI_PUBLISHER_ORDERBY',
    
'description' => '_MI_PUBLISHER_ORDERBYDSC',
    
'formtype'    => 'select',
    
'valuetype'   => 'text',
    
'options'     => array(
        
_MI_PUBLISHER_ORDERBY_TITLE  => 'title',
        
_MI_PUBLISHER_ORDERBY_DATE   => 'date',
        
_MI_PUBLISHER_ORDERBY_RATING => 'rating',
        
_MI_PUBLISHER_ORDERBY_VOTES  => 'votes',
        
_MI_PUBLISHER_ORDERBY_COMMENTS  => 'comments',
        
_MI_PUBLISHER_ORDERBY_WEIGHT => 'weight'),
    
'default'     => 'date',
    
'category'    => 'format'
);



item.php

replace:
switch ($publisher->getConfig('format_order_by')) {
    case 
'title' :
        
$sort 'title';
        
$order 'ASC';
        break;

    case 
'date' :
        
$sort 'datesub';
        
$order 'DESC';
        break;

    default :
        
$sort 'weight';
        
$order 'ASC';
        break;
}


with:
switch ($publisher->getConfig('format_order_by')) {
    case 
'title':
        
$sort  'title';
        
$order 'ASC';
        break;

    case 
'date':
        
$sort  'datesub';
        
$order 'DESC';
        break;

    case 
'rating' :
        
$sort 'rating';
        
$order 'DESC';
        break;
        
    case 
'votes' :
        
$sort 'votes';
        
$order 'DESC';
        break;
        
    case 
'comments' :
        
$sort 'comments';
        
$order 'DESC';
        break;

    default :
        
$sort  'weight';
        
$order 'ASC';
        break;
}




index.php

replace:
switch ($publisher->getConfig('format_order_by')) {
        case 
'title' :
            
$sort 'title';
            
$order 'ASC';
            break;

        case 
'date' :
            
$sort 'datesub';
            
$order 'DESC';
            break;

        default :
            
$sort 'weight';
            
$order 'ASC';
            break;
    }


with:
switch ($publisher->getConfig('format_order_by')) {
        case 
'title':
            
$sort  'title';
            
$order 'ASC';
            break;

        case 
'date':
            
$sort  'datesub';
            
$order 'DESC';
            break;

        case 
'rating' :
            
$sort 'rating';
            
$order 'DESC';
            break;
            
        case 
'votes' :
            
$sort 'votes';
            
$order 'DESC';
            break;
            
        case 
'comments' :
            
$sort 'comments';
            
$order 'DESC';
            break;
        default:
            
$sort  'weight';
            
$order 'ASC';
            break;
    }



category.php

replace:
switch ($publisher->getConfig('format_order_by')) {
    case 
'title' :
        
$sort 'title';
        
$order 'ASC';
        break;

    case 
'date' :
        
$sort 'datesub';
        
$order 'DESC';
        break;

    default :
        
$sort 'weight';
        
$order 'ASC';
        break;
}


with:
switch ($publisher->getConfig('format_order_by')) {
    case 
'title' :
        
$sort  'title';
        
$order 'ASC';
        break;

    case 
'date' :
        
$sort  'datesub';
        
$order 'DESC';
        break;

    case 
'rating' :
        
$sort 'rating';
        
$order 'DESC';
        break;

    case 
'votes' :
        
$sort 'votes';
        
$order 'DESC';
        break;
            case 
'comments' :
        
$sort 'comments';
        
$order 'DESC';
        break;

    default:
        
$sort  'weight';
        
$order 'ASC';
        break;
}



BLOCKS
blocks/item_new.php

replace:
$item['title'] = $itemsObj[$i]->title();

            if (
$sort == "datesub") {
                
$item['new'] = $itemsObj[$i]->datesub();
            } elseif (
$sort == "counter") {
                
$item['new'] = $itemsObj[$i]->counter();
            } elseif (
$sort == "weight") {
                
$item['new'] = $itemsObj[$i]->weight();
            }

            
$block['newitems'][] = $item;



with:
$item['title'] = $itemsObj[$i]->title();

            if (
$sort == "datesub") {
                
$item['new'] = $itemsObj[$i]->datesub();
            } elseif (
$sort == "counter") {
                
$item['new'] = $itemsObj[$i]->counter();
            } elseif (
$sort == "weight") {
                
$item['new'] = $itemsObj[$i]->weight();
                } elseif (
$sort == "rating") {
                
$item['new'] = $itemsObj[$i]->rating();
                } elseif (
$sort == "votes") {
                
$item['new'] = $itemsObj[$i]->votes();
                }
                elseif (
$sort == "comments") {
                
$item['new'] = $itemsObj[$i]->comments();
                }
            
            
$block['newitems'][] = $item;



replace:
$orderEle->addOptionArray(array(
                                  
'datesub' => _MB_PUBLISHER_DATE,
                                  
'counter' => _MB_PUBLISHER_HITS,
                                  
'weight'  => _MB_PUBLISHER_WEIGHT,
                              ));


with:
$orderEle->addOptionArray(array(
                                  
'datesub' => _MB_PUBLISHER_DATE,
                                  
'counter' => _MB_PUBLISHER_HITS,
                                  
'weight'  => _MB_PUBLISHER_WEIGHT,
                                  
'rating'  => _MI_PUBLISHER_ORDERBY_RATING,
                                  
'votes'   => _MI_PUBLISHER_ORDERBY_VOTES,
                                  
'comments'   => _MI_PUBLISHER_ORDERBY_COMMENTS,
                              ));


include/functions.php

replace:
function publisherGetOrderBy($sort)
{
    if (
$sort == "datesub") {
        return 
"DESC";
    } elseif (
$sort == "counter") {
        return 
"DESC";
    } elseif (
$sort == "weight") {
        return 
"ASC";
    }

    return 
null;
}


with:
function publisherGetOrderBy($sort)
{
    if (
$sort == "datesub") {
        return 
"DESC";
    } elseif (
$sort == "counter") {
        return 
"DESC";
    } elseif (
$sort == "weight") {
        return 
"ASC";
    }
    elseif (
$sort == "votes") {
        return 
"DESC";
    }
    elseif (
$sort == "rating") {
        return 
"DESC";
    }
        elseif (
$sort == "comments") {
        return 
"DESC";
    }

    return 
null;
}



Thas all!
Working well for both: starting page and block "recent items list"
If you want to have more than one option in this block, just clone it
If you want to have these sortings on whole or many pages, just use cloned block in dummy module

10x Mamba, It would not happen without you



5665
brutalicuss
Re: Rating system in publisher module

Quote:

If the users want to vote for it, then they rate it, and based on the rating, the highest rated articles will come up first.


Thats I mean Mamba, users will define which article is important, and if we havent rating sort system this will be impossible, isnt it
But we must have other sorting option also, like time, hits and etc. I think it is normal for any publisher site. Just option: "show most rated", "show most visited" "votes", "comments"..etc These are just features. Good features!

As for "ASC" to "DESC" sorting I tried everything :) Something buggy, and I really cant, because im not programmer

In this context, I tried to set your fix to sort by ASC not DESC and nothing happens - order still was by DESC. You shouldnt upload this before closely testing I think



5666
Mamba
Re: Rating system in publisher module
  • 2015/6/25 18:17

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Quote:
Yes, you are right in principle - if we using publisher module for news, but if we makes article directory (in example) I think it is necessary, because you know some articles are important for the users months even years. In that case we really need of all sorting option.

I am not sure, I understand it. Can you give me a concrete example?
Let's say, I have 200 articles, 20 per year, and one article from 7 year ago is important.

In my thinking, I just give it the highest weight, so when sorted by weight, it will come up as first.

If the users want to vote for it, then they rate it, and based on the rating, the highest rated articles will come up first.

What am I missing?

Quote:
Im already done new sorting in publisher blocks (its easy) based of your examples, BUT the sorting is not correct :) from 0 to 5, not 5 to 0. But im not programmer, just testing

You probably have to change from "ASC" to "DESC"

Show your code and maybe somebody could help...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



5667
Mamba
Re: Testing PHP 7 on WAMP
  • 2015/6/25 18:03

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


PHP 7 development is moving fast!!!

Posted today on Internet:

Quote:
This is a quick heads up that we plan to have the next release of 7.0.0 be Beta 1, this marks a feature freeze and from there on, we will switch focus on to stabilization, regressions and other bug fixes.

Beta 1 is schedule to be tagged and packaged on July 7th and released on July 9th which is a small 2 weeks from now to get any remaining changes of such in.

If you are in doubt about whether or not your change would be considered a 'feature' or have any other questions, then feel free to mail us RMs or reply here.

Thanks,
Kalle, Anatol & Ferenc
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



5668
brutalicuss
Re: Rating system in publisher module

Yes, you are right in principle - if we using publisher module for news, but if we makes article directory (in example) I think it is necessary, because you know some articles are important for the users months even years. In that case we really need of all sorting option.

Your example with extgallery and wt-download is very good, the same we have in weblinks also. Weblinks has all possible sorting option, not only in blocks (my favorite module ever)

Im already done new sorting in publisher blocks (its easy) based of your examples, BUT the sorting is not correct :) from 0 to 5, not 5 to 0. But im not programmer, just testing :)



5669
Mamba
Testing PHP 7 on WAMP
  • 2015/6/25 15:07

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


If you're using WAMP on your Windows (as I do), there are instructions on required changes to run the PHP 7 Alpha 1

What's even better, there is also work being done by one of the moderators, Otomatic, on updating WAMP, and he's been adding some very cool features. You can read it here

The changes that he is making, you can download from him directly. I am posting this link, because it is not very visible in the above thread.

Good luck and have fun discovering PHP 7
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



5670
Mamba
Re: Rating system in publisher module
  • 2015/6/25 14:08

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Quote:
But I have still trouble (maybe personal) because I want to have more than one option for sorting, at the same time.

I am not sure if it makes much sense for Publisher and if is worth the effort. If you have 1,000 articles posted on the same date, and want to sort them by rating on that date, then it would make sense.

But if you have 2-10 articles on a given day, you can see it by just looking at them. Am I missing something?

But what we could do in the future is to add the sorting options on the front end, as it is already done in extGallery (see example) and WF-Downloads (see example). I believe that all XOOPS Module should have such a feature in the future....

However, I don't want to stop you from doing what you want to do. If you solve it and it's working, please submit the code for inclusion in the next version of Publisher...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs




TopTop
« 1 ... 564 565 566 (567) 568 569 570 ... 29425 »



Login

Who's Online

658 user(s) are online (553 user(s) are browsing Support Forums)


Members: 0


Guests: 658


more...

Donat-O-Meter

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

Latest GitHub Commits