Gossamer Forum
Home : Products : Gossamer Links : Discussions :

static/dynamic - 2nd template set help required

Quote Reply
static/dynamic - 2nd template set help required
I run my site dynamically but display pages as static (/index.php instead of /page.cgi?p=whatever) by adding some lines to the .htaccess file.

Example:
Code:
RewriteRule ^(.*).php /cgi-bin/links/page.cgi?g=$1.php [L]

I now want to add a second template set but I can't get it to display using the dynamic URLs - /cgi-bin/links/page.cgi?t=luna2

It returns:
Quote:
Illegal modulus zero at
/home/mysite/public_html/cgi-bin/links/admin/Links/Utils.pm
line 547.

Do I need to add another rewrite rule to the .htaccess?

Thanks
Quote Reply
Re: [MJB] static/dynamic - 2nd template set help required In reply to
Hi,

What is line 547 in Utils.pm? Can't sayt I've seen that error before - but the chances are its just a mis-configured template set or something

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] static/dynamic - 2nd template set help required In reply to
Code:

542 sub column_split {
543 # -------------------------------------------------------------------
544 # Calculate where the columns should be
545 #
546 my ($items, $columns) = @_;
547 if ($items % $columns > 0) {
548 $items += ($columns - $items % $columns);
549 }
550 return $items / $columns;
551 }
Quote Reply
Re: [MJB] static/dynamic - 2nd template set help required In reply to
Mmm, does globals.txt exist? Sounds like $columns is 0 (thus the error). AFAIK that would only occur when globals.txt doesn't exist in your template set (although normally you would get a fatal error about it, and the same if language.txt doesn't exist).

Shoot me over logins if you want and I'll have a quick look. Probably quicker than trying to debug over the forum Whistle

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] static/dynamic - 2nd template set help required In reply to
Thanks for the hint. I wouldn't have known where to start with that one.

I did have a copy of the existing globals.txt in there but for some strange reason it didn't like it. When I changed it for a default copy it worked OK.

Odd. Unsure
Quote Reply
Re: [MJB] static/dynamic - 2nd template set help required In reply to
No problem - It was probably cos you were missing a require value (something like home_col_split or something; can't remember it off by heart :))

Anyway - glad that fixed it

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates