+ Antworten
Ergebnis 1 bis 4 von 4

Thema: Modul mod_s4jrandomprofile Thumbnail statt Originalbild!

  1. #1
    Neu an Board
    Registriert seit
    24.08.2005
    Beiträge
    29
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard Modul mod_s4jrandomprofile Thumbnail statt Originalbild!

    Hi das mod_s4jrandomprofile für den CB nimmt ja irgendwie die Originalbilder , was dann teilweise irgendwo unnöig Traffic frisst! Jetzt habe ich mir mal das Modul angeschaut aber nirgendswo gefunde wo ich das ändern kann ! Im Endefekt muss ich ja nur ein tn vor dem Dateinamen stellen!
    z.B.
    tn1526_4764192b97aa0.jpg
    statt
    1526_4764192b97aa0.jpg

    hier der Code vom Modul.
    PHP-Code:
    <?php

    /** ensure this file is being included by a parent file */
    defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


    global 
    $mosConfig_absolute_path$mosConfig_lang;
    $subpath "/modules/mod_s4jrandomprofile";
    require_once( 
    $mosConfig_absolute_path .$subpath."/helper.php" ); 

    //Language definitions
    if (file_exists($mosConfig_absolute_path.$subpath."/language/".$mosConfig_lang.".php")){ 
        include(
    $mosConfig_absolute_path.$subpath."/language/".$mosConfig_lang.".php");
    } else { 
        include(
    $mosConfig_absolute_path.$subpath."/language/english.php");
    }

    //if modul was copied, check the class
    if( !class_exists("s4jRandomProfile") ) {
            
        class 
    s4jRandomProfile {
            var 
    $_s4j    null;
            var 
    $_db    null;
            var 
    $_paramsnull;
            
            
            
    /**
             * Construnctor
             */
            
    function s4jRandomProfile( & $params ) {
                global 
    $database;
                
    $this->_db         $database;
                
    $this->_s4j        = new s4jLibRandomProfile$params2,  "mod_s4jrandomprofile" );
                
    $this->_params    = & $params;
            }
            
            
            function 
    GetDataRows() {
                
    $max_user_shown    $this->_params->get('max_user_shown'3); 
                
                
    $sql "SELECT DISTINCT
                            u.id, u.username, u.name,
                            s.userid as s4jonline"
    ;
                
    $sql .= $this->_s4j->GetFields();
                
    $sql .= " FROM
                            ( #__users u INNER JOIN #__comprofiler c ON u.id = c.user_id AND u.block =0 AND c.confirmed =1 AND c.approved =1 ) 
                            LEFT JOIN #__session s ON s.userid = u.id AND s.guest = 0"
    ;
                
    $sql .= $this->_s4j->GetFilter("c""u""WHERE");
                
    $sql .=    " ORDER BY RAND()
                          LIMIT 0, " 
    $max_user_shown;
                        
                
    $this->_db->setQuery$sql );
                
    $rows $this->_db->loadObjectList();
                return 
    $rows;
            }
            
            function 
    Show() {
                
    $columns_count    $this->_params->get('columns_count'5); 
                
    $rows            $this->GetDataRows();
                
                
    $tr             1;
                
    $ind            0;
                
    $rows_count        count($rows); //NOTE: Improve later
        
                
    $result         "<table border='0'>"// TODO: Change template
                
    foreach ($rows as $row) {
                    if( 
    $tr == 1
                        
    $result .= "<tr>";
                    
    $result .= "<td valign='top'>".$this->_s4j->GetUser$row )."</td>";
                    
                    if(
    $tr == $columns_count) {
                        
    $result .= "</tr>";
                        
    $tr=1;
                    } else if( 
    $ind == $rows_count ) {
                        for(
    $j $tr$j $columns_count$j++) {
                            
    $result .= "<td style='display:none;'>&nbsp;</td>";
                        }
                        
    $result .= "</tr>";
        
                    } else {
                        
    $tr++;
                    }
                    
    $ind++;
        
                }
        
                
    $result         .= "</table>";
                return 
    $result;
            }
        }

        function 
    s4jRandomProfileCaching( &$params ){
            
    $s4jRandomProfile = new s4jRandomProfile$params ); 
            echo 
    $s4jRandomProfile->Show();
        }
    }
        
        

    $enablecache $params->get('enablecache'0);
    if( 
    $enablecache == ) {
        
    $cache =& mosCache::getCache'mod_s4jrandomprofile' );
        
    $cache->call's4jRandomProfileCaching',  $params );
    } else {
        
    s4jRandomProfileCaching$params );


    ?>

  2. #2
    Neu an Board
    Registriert seit
    24.08.2005
    Beiträge
    29
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    keiner ein Plan!
    Wer benutzt denn das Modul , oder gibs vielleicht ähnliche Module die ein Vorschaubild zeigenm aber nur von Usern ,die ein Bild haben?

  3. #3
    Neu an Board
    Registriert seit
    22.05.2007
    Beiträge
    51
    Bedankte sich
    1
    Erhielt 5 Danksagungen
    in 5 Beiträgen

    Standard

    Hi buzzi22,

    in der helper.php findest du folgende Funktion GetAvatar, diese musst du anpassen.

    PS: Wir haben deine Anforderung auch bereits in unsere TODO Liste aufgenommen, die Erweiterung wird mitte Februar zur Verfügung stehen.

    Gruß
    S4J Team

  4. Erhielt Danksagungen von:


  5. #4
    Neu an Board
    Registriert seit
    24.08.2005
    Beiträge
    29
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Zeile 397 hab ich abgeändert und es geht
    $imagesrc = "$mosConfig_live_site/images/comprofiler/tn$tn$row->avatar";
    danke

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein