61
madDan
Re: xoops.js missing?
  • 2010/6/11 13:47

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


now I am confused

Why do unsized article images ie those without the
[img width=300]xxxxx[/img]
work and resize when logged in but not when logged out

have a look at

http://www.theroadster.net/trc/modules/articles/article.php?id=112


When logged in they scale automatically even with just
[img]xxxxxxxx[/img]



if you look at

http://www.theroadster.net/trc/modules/articles/article.php?id=129 this article uses the [img width=xxx]


if you take a look at www.theroadster.net/maddan/scaleissue.jpg


it will show what I am seeing as a logged in and none logged in person with regard to none scale specified image tags ie the width part.

If an article has the image tag with width it is fine, any idea why is auto scales logged in and not so when logged out?


Thought I was going mad for a while there


Obviously I can go through the articles and search and replace unspecified [img] tags to [img width=300] or whatever.



62
madDan
Re: xoops.js missing?
  • 2010/6/11 12:11

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Quote:

ghia wrote:
No, the link is OK, else the image would not show at all.

Only problem left is that the image is clickable, but nothing happens when you do.
This is because /class/textsanitizer/image/image.js is missing in the header.
What is in your /class/textsanitizer/image/config.php and did you make changes to it?



here is my /class/textsanitizer/image/config.php

<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * TextSanitizer extension
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         class
 * @subpackage      textsanitizer
 * @since           2.3.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: config.php 3575 2009-09-05 19:35:11Z trabis $
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

return 
$config = array(
    
// Click to open an image in a new window
    
'clickable' => 1,
    
// Resize the iamge
    
'resize' => 1,
    
// Maximum width of an image displayed on page, otherwise it will be resized
    
'max_width' => 300);

?>


class/textsanitizer/image/image.js is present and unaltered by me.

php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * TextSanitizer extension
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         class
 * @subpackage      textsanitizer
 * @since           2.3.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: image.php 3575 2009-09-05 19:35:11Z trabis $
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

class 
MytsImage extends MyTextSanitizerExtension
{
    function 
load(&$ts)
    {
        static 
$jsLoaded;

        
$config $this->loadConfig(dirname(__FILE__));
        
$ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1 width=(['"]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU";
        
$ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1]([^"()?&'<>]*)[/img]/sU";
        
$ts->patterns[] = "/[img width=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU";
        
$ts->patterns[] = "/[img]([^"()?&'<>]*)[/img]/sU";
        
// Added for script driven images
        
$ts->patterns[] = "/[img align=(left|right|center) width=([0-9]*)](.*)[/img]/sU";
        
$ts->patterns[] = "/[img width=([0-9]*) align=(left|right|center)](.*)[/img]/sU";
        
$ts->patterns[] = "/[img align=(left|right|center)](.*)[/img]/sU";
        
$ts->patterns[] = "/[img width=([0-9]*)](.*)[/img]/sU";
        
$ts->patterns[] = "/[img](.*)[/img]/sU";

        
$ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1 id=(['"]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU";
        
$ts->patterns[] = "/[img id=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU";

        if (empty(
$ts->config['allowimage'])) {
            
$ts->replacements[] = '<a href="\5" rel="external">\5</a>';
            
$ts->replacements[] = '<a href="\3" rel="external">\3</a>';
            
$ts->replacements[] = '<a href="\3" rel="external">\3</a>';
            
$ts->replacements[] = '<a href="\1" rel="external">\1</a>';
            // Added for script driven images
            
$ts->replacements[] = '<img align="\1" width="\2" src="\3">';
            
$ts->replacements[] = '<img align="\2" width="\1" src="\3">';
            
$ts->replacements[] = '<img align="\1" src="\2">';
            
$ts->replacements[] = '<img width="\1" src="\2">';
            
$ts->replacements[] = '<img src="\1">';

            
$ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\4" rel="external" title="\5">\5</a>';
            
$ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\2" rel="external" title="\3">\3</a>';

        } else {
            if (!empty(
$config['clickable']) && !empty($config['max_width']) && !empty($GLOBALS['xoTheme'])) {
                if (!
$jsLoaded) {
                    
$jsLoaded = true;
                    
$GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array(
                        'type' => 'text/javascript'));
                }
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\5");'><img src='\5' class='\2' alt='Open in new window' border='0' onload="JavaScript:if(this.width>\4)this.width=\4" /></a>";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\3");'><img src='\3' class='\2' alt='Open in new window' border='0' " . ($config['resize'] ? "onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\3");'><img src='\3' alt='Open in new window' border='0' onload="JavaScript:if(this.width>\2)this.width=\2" /></a><br />";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\1");'><img src='\1' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";

                // Added for script driven images
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\3");'><img align='\1' width='\2' src='\3' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";

                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\3");'><img align='\2' width='\1' src='\3' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\2");'><img align='\1' src='\2' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\2");'><img width='\1' src='\2' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                
$ts->replacements[] = "<a href='javascript:CaricaFoto("\1");'><img src='\1' alt='Open in new window' border='0'" . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";

            } else {
                
$ts->replacements[] = "<img src='\5' class='\2' border='0' alt='' onload="JavaScript:if(this.width>\4) this.width=\4" />";
                
$ts->replacements[] = "<img src='\3' class='\2' border='0' alt='' " . ($config['resize'] ? "onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                
$ts->replacements[] = "<img src='\3' border='0' alt='' onload="JavaScript:if(this.width>\2) this.width=\2" />";
                
$ts->replacements[] = "<img src='\1' border='0' alt='' " . ($config['resize'] ? " onload="javascript:imageResize(this, " $config['max_width'] . ")"" : "") . "/></a>";
                // Added for script driven images
                
$ts->replacements[] = '<img align="\1" width="\2" src="\3">';
                
$ts->replacements[] = '<img align="\2" width="\1" src="\3">';
                
$ts->replacements[] = '<img align="\1" src="\2">';
                
$ts->replacements[] = '<img width="\1" src="\2">';
                
$ts->replacements[] = '<img src="\1">';

            }
            
$ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\4" class="\2" alt="\5" />';
            
$ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\2" alt="\3" />';
        }
        return true;
    }
}

?>

I have not touched these files myself at all.



Had a nap, now back at home, the site works as advertised ie the images scale on the post or articles list first displaying without having to refresh.

On both Firefox 3.6.3 and IE 8.0.76, so the issue with scaling and refreshing must either be a browser related or browser settings or company security restrictions related issue.


I am sorry for wasting your time with this.

I have been trying to resolve various things, mybe I should stick to doing fault finding at home before confusing the issue?

So it looks as if the problem I posted last night is definately work related as is the debug window being blank, it works fine here at home with image.js in the standard place.

I can only appologise once more.



63
madDan
Re: xoops.js missing?
  • 2010/6/11 11:55

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1



Re the address it is absolutely fine, that is simply the address I use, itis nothing to do with the articles module, it is where I manually upload images to.



64
madDan
Re: xoops.js missing?
  • 2010/6/11 5:10

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I can't see the images as they are blocked at work

I'll test later at home.



65
madDan
Re: xoops.js missing?
  • 2010/6/11 3:00

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I have followed your advice above in #8

Is the fix you state when actually including it in viewtopic and viewpost any thing to do with refresh?

As I am finding images don't appear to scale unless I do a refresh after opening that post.

An example is

http://www.theroadster.net/trc/modules/articles/

When I view it (currently at work on IE7) the articles list opens with images at their full scale then scale down after doing a refresh, but if I navigate away and come back I have to refresh again, now for the index I can obviously make thumbnails but the main images within the articles and forum posts act the same..

Is this more likely to be a browser issue than the site software?



66
madDan
Re: xoops.js missing?
  • 2010/6/11 0:20

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


So If I read this correctly the Frameworks folder under my main directory for the site should no longer be present?

Would it be likely that other modules than CBB 3.08 be using Frameworks? such as Articles 1.03.

I am at work so can't access source forge to check files and can't browse the folderrs I downloaded as they at at home.



67
madDan
Re: Private messages bug
  • 2010/6/10 23:56

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Quote:

deka87 wrote:
i also had this issue on xoops.org when it showed me in the right block that i have an unread message though i had none.



I have found on my site that all the sortof realtime blocks and modules like PMs etc need the same cache ie little to none, as some users were a little impatient and if things were not updated on the fly they saw them as a bug and couldn't get their heads around the idea of caches.

Although I suppose it is our own faults I have three areas that highlight PM's the area under the banner the view your messages envelope icon, the user menu inbox and the MP Manager block, then I still get people asking how/where to send a PM etc? (Privately I am not sure some people should use the internet )



68
madDan
Re: xoops.js missing?
  • 2010/6/9 4:06

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I haven't found it in the source for a page yet, it is always the include/ one called .

However if it isn't in the textsanitizer/ I get blank debug windows, when clicking on several entries in my main menu.

It's very odd, more digging required I think



69
madDan
Re: xoops.js missing?
  • 2010/6/8 9:52

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I'll have to have a dig around tonight (on shifts) it was only my webstats that brought my attention to it, the site runs without throwing up an error when it wasn't there,

currently running

Under 2.4.4

Modules Administration
Module                     Version     
System                    2
User Profile             1.57    
Protector                3.4    
Forums                    3.08 
(cbb)
Members                    1
Happy Linux Framework    1.5
Guides 
and Articles        1.03 (articles)
Clock Calendar            2
Indexscan                2.03
Web Links                1.1
News                    1.65
Polls                    1.3
FAQ 
Terms of Use        1.1 (FAQ)
xForms                    1
Waiting Contents        0.95  
(waiting contents extensible)
Team Chat                4.07
Sections                1
Calendar                0.93
PM Manager                2.75 
(MP Manager)
Online History            1.2
Small ads                1.53 
(catads under test in background)



Slowly going through site and tidying up - but not being a programmer can catch one out



70
madDan
Re: Domain name change ... problem accessing admin areas
  • 2010/6/8 5:08

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Are you able to navigate to your prefs? try switching the backend gui and see if it updates the admin links urls?




TopTop
« 1 ... 4 5 6 (7) 8 9 »



Login

Who's Online

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


Members: 0


Guests: 193


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