bug? "serendipity_event_categorytemplates"

Creating and modifying plugins.
Post Reply
m2.ag
Regular
Posts: 22
Joined: Sat May 06, 2006 9:17 pm
Location: Hamburg
Contact:

bug? "serendipity_event_categorytemplates"

Post by m2.ag »

Hi,

maybe someone has an idea?

My blog (http://www.trendquest.de) has 70 categories and a template based on the freshy template. There are 4 (or maybe later up to 7) categories I use in the horizontal button-menu-bar for which I want to assign each an own category-header-image - thus: an own template.

But: When using the plugin "serendipity_event_categorytemplates" it does not work as I hoped it would do.

I choose a template for a category and after this click on the button "Template options". And there shows up this bug:

"Fatal error: Cannot redeclare custom_imgsel() (previously declared in /home/kdn436/html/templates/trendquest2007/functions.custom_imgsel.inc.php:48) in /home/kdn436/html/templates/neueklassik/functions.custom_imgsel.inc.php on line 48"

Before as a basic thing I made a duplicate of my main-template because I only wanted to have a different category-headerpicture and thought about getting this by duplicate and slightly different templates. I changed the name of the duplicate in the "info.txt". Is this the reason? Do I have to change more than the "info.txt"-file?

Maybe someone has a clue how to solve this problem?

Addition: If I only use ONE template for all categories I still even can change header-images for each category.
The only bug is that the style.css now behaves different as if it were used without this "categorytemplates"-event-plugin. The menu buttons are displaced for about 4 pixels.
Very strange. Is this indeed a bug?
Or did I make something wrong?


Thank you for your help!

Matthias
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: bug? "serendipity_event_categorytemplates"

Post by garvinhicking »

Hi!

The freshy template is not able to exist moe than once with the same config.inc.php file because it uses a PHP function that cannot be declared more than once.

So you'd need to pick a template like bulletproof, or adapt each freshy-version so that it has its unique PHP function names.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
m2.ag
Regular
Posts: 22
Joined: Sat May 06, 2006 9:17 pm
Location: Hamburg
Contact:

Re: bug? "serendipity_event_categorytemplates"

Post by m2.ag »

Hi Garvin,

thanks for your reply!
garvinhicking wrote: The freshy template is not able to exist moe than once with the same config.inc.php file because it uses a PHP function that cannot be declared more than once.

So you'd need to pick a template like bulletproof, or adapt each freshy-version so that it has its unique PHP function names.
Well, as I see I am nearly at my goal:

1. My goal is a template, that gives me the ability, to give each category it's own header-image.

2. This works fine with my freshy-based style on www.trendquest.de.
a. I did not change any of the freshy-functions.
freshy already allows assigning each cat it's own header-image.
b. I only changed the CSS and some graphics to have my individual design.

3. Thus I am nearly at my goal.
But now the only remaining problem is the strange interpretation of the freshy-"style.css":
a. Menu buttons on main page look good.
b. Menu buttons on each following category-page (with individual header-image) are displaced for about 4 pixels. Very strange.

But this now should be somehow my fault in resizing the menu buttons or editing the CSS *sigh*

Original freshy works without CSS-faults - just tested
;-)



Garvin, thanxalot though!



Matthias
Post Reply