Others - Short URL and Projects

shoplinks - Jun 30, 2005 - 10:00 PM
Post subject: Short URL and Projects
Hi.
I noticed that you are using MagicXīs module projects on your site as we are in ours.
Iv'e been playing with short urlīs and came across a problem.
We cannīt see the progressbar in our block.
Comparing your link to the gd-process that controls the imagemaking.
Your looks like
Code:

module-projects-progress_gd-width-140-done-40-total-100.html

and our looks like
Code:

mod-projects-progress_gd-width-140-done-5--total.html

I noticed the diferens but don't understand why.
We are using dev-postnuke.com's short url mod and I asume that the project module falls under same general rules there.
Code:

# 24: General rules for modules with index.php?module=...
RewriteRule ^mod-([a-zA-Z0-9_+]+)\.html$ index.php?module=$1 [L]
RewriteRule ^mod-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L]

Now we wonder what you have done to successfully bring fram the gd-function in that block.
Chestnut - Jun 30, 2005 - 11:03 PM
Post subject: Re: Short URL and Projects
mmm I don't remember doing anything special aside maybe bugfixes on my version... I'm using the rewrite rules from the xanthia pndocs folder (include the shorturls rewrite from the Xanthia's plugins folder)...

Here goes mine :

Code:

RewriteRule ^module-([^-]+)\.html$ index.php?module=$1&func=main [L,NC,NS]
RewriteRule ^module-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2 [L,NC,NS]
RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4 [L,NC,NS]
RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6 [L,NC,NS]
RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8 [L,NC,NS]
RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L,NC,NS]


The problem might be in the other file, for me it's the ouputfilter.shorturls.php, might be different on yours.

Code:

$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)[#]([\w\d]*)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=main"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=main[#]([\w\d]*)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)[#]([\w\d]*)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)[#]([\w\d]*)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)[#]([\w\d]*)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"[#]([\w\d]*)|',
$prefix . 'index.php\?module=([\w\d\.\:\_\/]+)&(?:amp;)?func=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)&(?:amp;)?([\w\d\.\:\_\/]+)=([\w\d\.\:\_\/]+)"|',


GD can be a real pain sometimes... working sometimes on some browsers at home and not working on the same browser at work... I'll get rid of it soon anyway. Laughing
Chestnut - Jun 30, 2005 - 11:07 PM
Post subject: Re: Short URL and Projects
Also check in the block file i-lastxprojects.php if this line is the same :

Code:

$progress_image = "<img src=\"index.php?module=projects&amp;func=progress_gd&amp;width=140&amp;done=". $progress . "&amp;total=100\" alt=\"\" />";


Your line apparently lacks the total while mine has it. In my block file, the 100 is hardcoded... might be me but I don't have the original anymore to compare.
shoplinks - Jul 02, 2005 - 11:33 AM
Post subject:
Thanks for the reply.
Might have to take a look at xanthia then.
All times are GMT + 1 Hour
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits